multilayer_SiSc_sample_fit#

esis.flights.f2.optics.materials.multilayer_SiSc_sample_fit()[source]#

Fit a model of the sample to multilayer_SiSc_sample_measured().

The model is the stack Eric Gullikson described: 10 periods of amorphous Si and Sc, with Sc 0.4 of each period, on a Si substrate, and a top Si layer 16 nm thick before 1.5 nm of native oxide grew on it. The fit finds the period and the widths of the erf interfaces on top of the Si layers and on top of the Sc layers. It minimizes the RMS of the logarithm of the ratio of the measured reflectivity to that of the model, for the polarization of the beam, at the angle of the measurement.

The last point, at 50.0 nm, is left out. It is 29% below the point before it, a drop much steeper than that of any of these models.

Examples

Plot the reflectivity of the fit against the measurement.

import numpy as np
import matplotlib.pyplot as plt
import astropy.visualization
import named_arrays as na
import optika
import esis

materials = esis.flights.f2.optics.materials

# Load the measured reflectivity of the sample
measurement = materials.multilayer_SiSc_sample_measured().efficiency_measured
angle = measurement.inputs.direction

# Fit the model of the sample to the measurement
multilayer = materials.multilayer_SiSc_sample_fit()

# Compute the reflectivity of the fit, unpolarized
rays = optika.rays.RayVectorArray(
    wavelength=measurement.inputs.wavelength,
    direction=na.Cartesian3dVectorArray(np.sin(angle), 0, np.cos(angle)),
)
reflectivity = multilayer.efficiency(
    rays=rays,
    normal=na.Cartesian3dVectorArray(0, 0, -1),
)

# Plot the fit against the measurement
with astropy.visualization.quantity_support():
    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,
        ax=ax,
        label="fit",
        color="tab:orange",
    );
    ax.set_xlabel(f"wavelength ({ax.get_xlabel()})");
    ax.set_ylabel("reflectivity");
    ax.legend();

# Print the fitted multilayer stack
multilayer
MultilayerMirror(
    layers=[
        Layer(
            chemical=Chemical(
                formula='SiO2',
                is_amorphous=True,
                table=None,
            ),
            thickness=1.5 nm,
            interface=ErfInterfaceProfile(
                width=7. Angstrom,
            ),
            kwargs_plot={'color': 'tab:blue', 'alpha': 0.3},
            x_label=1.1,
        ),
        Layer(
            chemical=Chemical(
                formula='Si',
                is_amorphous=True,
                table=None,
            ),
            thickness=15.34 nm,
            interface=ErfInterfaceProfile(
                width=1.91379378 nm,
            ),
            kwargs_plot={'color': 'tab:blue', 'alpha': 0.5},
            x_label=None,
        ),
        Layer(
            chemical='Sc',
            thickness=10.26748016 nm,
            interface=ErfInterfaceProfile(
                width=0.77699063 nm,
            ),
            kwargs_plot={'color': 'tab:orange', 'alpha': 0.5},
            x_label=None,
        ),
        PeriodicLayerSequence(
            layers=[
                Layer(
                    chemical=Chemical(
                        formula='Si',
                        is_amorphous=True,
                        table=None,
                    ),
                    thickness=15.40122024 nm,
                    interface=ErfInterfaceProfile(
                        width=1.91379378 nm,
                    ),
                    kwargs_plot={'color': 'tab:blue', 'alpha': 0.5},
                    x_label=None,
                ),
                Layer(
                    chemical='Sc',
                    thickness=10.26748016 nm,
                    interface=ErfInterfaceProfile(
                        width=0.77699063 nm,
                    ),
                    kwargs_plot={'color': 'tab:orange', 'alpha': 0.5},
                    x_label=None,
                ),
            ],
            num_periods=9,
        ),
    ],
    substrate=Layer(
        chemical='Si',
        thickness=None,
        interface=ErfInterfaceProfile(
            width=7. Angstrom,
        ),
        kwargs_plot={'color': 'gray', 'alpha': 0.5},
        x_label=None,
    ),
    num_interpolation=32,
)
../_images/esis.flights.f2.optics.materials.multilayer_SiSc_sample_fit_0_1.png

Return type:

MultilayerMirror