ruling_design#

esis.flights.f1.optics.gratings.rulings.ruling_design(num_distribution=11)[source]#

Load a model of the as-designed rulings for the diffraction gratings.

Parameters:

num_distribution (int) – The number of Monte Carlo samples to draw when computing uncertainties.

Return type:

AbstractRulings

Examples

Plot the efficiency of the rulings over the EUV wavelength range.

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 gratings

# Define an array of wavelengths with which to sample the efficiency
wavelength = na.geomspace(500, 700, axis="wavelength", num=1001) * u.AA

# Define the incidence angle to be the same as the Horiba technical proposal
angle = 1.3 * u.deg

# Define the incident rays from the wavelength array
rays = optika.rays.RayVectorArray(
    wavelength=wavelength,
    position=0 * u.mm,
    direction=na.Cartesian3dVectorArray(
        x=np.sin(angle),
        y=0,
        z=np.cos(angle),
    ),
)

# Initialize the ESIS diffraction grating ruling model
rulings = gratings.rulings.ruling_design()

# Compute the efficiency of the grating rulings
efficiency = rulings.efficiency(
    rays=rays,
    normal=na.Cartesian3dVectorArray(0, 0, -1),
)

# Plot the efficiency vs wavelength
with astropy.visualization.quantity_support():
    fig, ax = plt.subplots(constrained_layout=True)
    na.plt.plot(wavelength, efficiency, ax=ax);
    ax.set_xlabel(f"wavelength ({ax.get_xlabel()})");
    ax.set_ylabel("efficiency");
../_images/esis.flights.f1.optics.gratings.rulings.ruling_design_0_0.png