coating_witness_fit#
- furst.feed_optics.materials.coating_witness_fit()[source]#
A coating fitted to the
coating_witness_measured()measurement.Examples
Plot the fitted vs. measured reflectivity of the feed optic witness sample.
import numpy as np import matplotlib.pyplot as plt import named_arrays as na import optika from furst import feed_optics # Load the measured reflectivity of the witness sample multilayer_measured = feed_optics.materials.coating_witness_measured() measurement = multilayer_measured.efficiency_measured # Isolate the angle of incidence of the measurement angle_incidence = measurement.inputs.direction # Fit a MgF2+Al coating to the measured reflectivity coating = feed_optics.materials.coating_witness_fit() # Define the rays incident on the coating that will be used to # compute the reflectivity rays = optika.rays.RayVectorArray( wavelength=measurement.inputs.wavelength, direction=na.Cartesian3dVectorArray( x=np.sin(angle_incidence), y=0, z=np.cos(angle_incidence), ), ) # Compute the reflectivity of the fitted multilayer stack reflectivity_fit = coating.efficiency( rays=rays, normal=na.Cartesian3dVectorArray(0, 0, -1), ) # Plot the fitted vs. measured reflectivity fig, ax = plt.subplots(constrained_layout=True) na.plt.scatter( measurement.inputs.wavelength, measurement.outputs, ax=ax, label="measured" ); na.plt.plot( rays.wavelength, reflectivity_fit, ax=ax, label="fitted", color="tab:orange", ); ax.set_xlabel(f"wavelength ({rays.wavelength.unit:latex_inline})") ax.set_ylabel("reflectivity") ax.legend(); # Print the fitted coating coating
MultilayerMirror( layers=[ Layer( chemical='MgF2', thickness=25.12932588 nm, interface=ErfInterfaceProfile( width=3.44864186 nm, ), kwargs_plot={'color': 'tab:blue', 'alpha': 0.3}, x_label=None, ), Layer( chemical='Al', thickness=59.98390658 nm, interface=ErfInterfaceProfile( width=3.44864186 nm, ), kwargs_plot={'color': 'tab:blue', 'alpha': 0.5}, x_label=None, ), ], substrate=Layer( chemical='SiO2', thickness=3. mm, interface=ErfInterfaceProfile( width=3.44864186 nm, ), kwargs_plot={'color': 'gray', 'alpha': 0.5}, x_label=None, ), )
- Return type: