multilayer_fit#

esis.flights.f1.optics.primaries.materials.multilayer_fit(time=<Time object: scale='utc' format='iso' value=2019-09-30 00:00:00.000>)[source]#

Model the coating of the primary mirror at a given time.

The model is based on multilayer_witness_fit(). The witness sample has a silicon substrate and the primary has a glass substrate. So this function changes the substrate from silicon to glass and modifies the roughness to be consistent with the actual primary mirror.

The SiC on top of the coating kept oxidizing after the witness was measured, the day after it was coated, so this function puts the SiO2 which grew between time_measurement and time on top of the fit. The oxide grows by about the same thickness in each decade of time since the coating, at a rate derived from the aging of sputtered SiC measured by Schwarcz and Keski-Kuha [1994], which gives about 0.5 nm by the flight. The oxide the witness already had when it was measured is part of the fit. The new oxide takes the interface width of the top of the fit, so that the coating tends to the fit as the oxide thins to nothing.

Parameters:

time (Time) – When to model the coating. It must not be before time_measurement. The default is the day of the flight, 2019 September 30.

Return type:

MultilayerMirror

Examples

Plot the theoretical reflectivity of this multilayer stack, when the witness was measured and at the flight, vs. the theoretical reflectivity of multilayer_witness_fit().

import numpy as np
import matplotlib.pyplot as plt
import astropy.units as u
import astropy.visualization
import named_arrays as na
import optika
from esis.flights.f1.optics import primaries

# Define a grid of wavelength samples
wavelength = na.geomspace(100, 1000, axis="wavelength", num=1001) * u.AA

# Define a grid of incidence angles
angle = 4 * u.deg

# Define the light rays incident on the multilayer stack
rays = optika.rays.RayVectorArray(
    wavelength=wavelength,
    direction=na.Cartesian3dVectorArray(
        x=np.sin(angle),
        y=0,
        z=np.cos(angle),
    ),
)

# Initialize the multilayer stacks
multilayer_witness_fit = primaries.materials.multilayer_witness_fit()
multilayer_measured = primaries.materials.multilayer_fit(
    time=primaries.materials.time_measurement,
)
multilayer_fit = primaries.materials.multilayer_fit()

# Define the vector normal to the multilayer stack
normal = na.Cartesian3dVectorArray(0, 0, -1)

# Compute the reflectivity of the multilayer for the given incident rays
reflectivity_witness = multilayer_witness_fit.efficiency(rays, normal)
reflectivity_measured = multilayer_measured.efficiency(rays, normal)
reflectivity_fit = multilayer_fit.efficiency(rays, normal)

# Plot the reflectivities as a function of wavelength
with astropy.visualization.quantity_support():
    fig, ax = plt.subplots(constrained_layout=True)
    na.plt.plot(
        wavelength,
        reflectivity_witness,
        ax=ax,
        axis="wavelength",
        label="witness fit",
    );
    na.plt.plot(
        wavelength,
        reflectivity_measured,
        ax=ax,
        axis="wavelength",
        label="primary fit, when the witness was measured",
    );
    na.plt.plot(
        wavelength,
        reflectivity_fit,
        ax=ax,
        axis="wavelength",
        label="primary fit, at the flight",
    );
    ax.set_xlabel(f"wavelength ({ax.get_xlabel()})");
    ax.set_ylabel("reflectivity");
    ax.legend();

# Print the fitted multilayer stack
multilayer_fit
MultilayerMirror(
    layers=[
        Layer(
            chemical='SiO2',
            thickness=0.47302623 nm,
            interface=ErfInterfaceProfile(
                width=3.41994657 nm,
            ),
            kwargs_plot={'color': 'tab:blue', 'alpha': 0.3},
            x_label=None,
        ),
        Layer(
            chemical='SiC',
            thickness=21.36857225 nm,
            interface=ErfInterfaceProfile(
                width=3.41994657 nm,
            ),
            kwargs_plot={'color': 'tab:blue', 'alpha': 0.5},
            x_label=None,
        ),
        Layer(
            chemical='Cr',
            thickness=5. nm,
            interface=ErfInterfaceProfile(
                width=0. nm,
            ),
            kwargs_plot={'color': 'tab:orange', 'alpha': 0.5},
            x_label=None,
        ),
    ],
    substrate=Layer(
        chemical='SiO2',
        thickness=30. mm,
        interface=ErfInterfaceProfile(
            width=5.53 Angstrom,
        ),
        kwargs_plot={'color': 'gray', 'alpha': 0.5},
        x_label=None,
    ),
    num_interpolation=32,
)
../_images/esis.flights.f1.optics.primaries.materials.multilayer_fit_0_1.png

Plot the reflectivity of this multilayer stack as a function of incidence angle.

import numpy as np
import matplotlib.pyplot as plt
import astropy.units as u
import astropy.visualization
import named_arrays as na
import optika
from esis.flights.f1.optics import primaries

# Define a grid of wavelength samples
wavelength = na.geomspace(100, 1000, axis="wavelength", num=1001) * u.AA

# Define a grid of incidence angles
angle = na.linspace(0, 20, axis="angle", num=3) * u.deg

# Define the light rays incident on the multilayer stack
rays = optika.rays.RayVectorArray(
    wavelength=wavelength,
    direction=na.Cartesian3dVectorArray(
        x=np.sin(angle),
        y=0,
        z=np.cos(angle),
    ),
)

# Initialize the multilayer stack
multilayer = primaries.materials.multilayer_fit()

# Compute the reflectivity of the multilayer for the given incident rays
reflectivity = multilayer.efficiency(
    rays=rays,
    normal=na.Cartesian3dVectorArray(0, 0, -1),
)

# Plot the reflectivity of the multilayer as a function of wavelength
with astropy.visualization.quantity_support():
    fig, ax = plt.subplots(constrained_layout=True)
    na.plt.plot(
        wavelength,
        reflectivity,
        ax=ax,
        axis="wavelength",
        label=angle,
    );
    ax.set_xlabel(f"wavelength ({ax.get_xlabel()})");
    ax.set_ylabel("reflectivity");
    ax.legend();
../_images/esis.flights.f1.optics.primaries.materials.multilayer_fit_1_0.png