diff --git a/esis/flights/f1/optics/__init__.py b/esis/flights/f1/optics/__init__.py index f760bbd..06b560f 100644 --- a/esis/flights/f1/optics/__init__.py +++ b/esis/flights/f1/optics/__init__.py @@ -4,4 +4,5 @@ from . import primaries from . import gratings +from . import filters from . import models diff --git a/esis/flights/f1/optics/filters/__init__.py b/esis/flights/f1/optics/filters/__init__.py new file mode 100644 index 0000000..089e2a2 --- /dev/null +++ b/esis/flights/f1/optics/filters/__init__.py @@ -0,0 +1,5 @@ +""" +Models of thin-film filters used to block visible light +""" + +from . import materials diff --git a/esis/flights/f1/optics/filters/materials/__init__.py b/esis/flights/f1/optics/filters/materials/__init__.py new file mode 100644 index 0000000..67fe46a --- /dev/null +++ b/esis/flights/f1/optics/filters/materials/__init__.py @@ -0,0 +1,5 @@ +""" +Models of the visible light filter materials. +""" + +from ._materials import * diff --git a/esis/flights/f1/optics/filters/materials/_materials.py b/esis/flights/f1/optics/filters/materials/_materials.py new file mode 100644 index 0000000..dd7a65f --- /dev/null +++ b/esis/flights/f1/optics/filters/materials/_materials.py @@ -0,0 +1,65 @@ +import astropy.units as u +import optika + +__all__ = ["thin_film_design"] + + +def thin_film_design() -> optika.materials.ThinFilmFilter: + """ + The as-designed thin-film visible light filter material for the ESIS instrument. + + Examples + -------- + + Plot the transmissivity of the thin-film filter over the EUV wavelength + range. + + .. jupyter-execute:: + + 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 filters + + # Define an array of wavelengths with which to sample the efficiency + wavelength = na.geomspace(100, 1000, axis="wavelength", num=1001) * u.AA + + # Define the incident rays from the wavelength array + rays = optika.rays.RayVectorArray( + wavelength=wavelength, + direction=na.Cartesian3dVectorArray(0, 0, 1), + ) + + # Initialize the ESIS diffraction grating material + material = filters.materials.thin_film_design() + + # Compute the reflectivity of the primary mirror + transmissivity = material.efficiency( + rays=rays, + normal=na.Cartesian3dVectorArray(0, 0, -1), + ) + + # Plot the transmissivity vs wavelength + fig, ax = plt.subplots(constrained_layout=True) + na.plt.plot(wavelength, transmissivity, ax=ax); + ax.set_xlabel(f"wavelength ({wavelength.unit:latex_inline})"); + ax.set_ylabel("transmissivity"); + """ + + return optika.materials.ThinFilmFilter( + layer=optika.materials.Layer( + chemical="Al", + thickness=100 * u.nm, + ), + layer_oxide=optika.materials.Layer( + chemical="Al2O3", + thickness=4 * u.nm, + ), + mesh=optika.materials.meshes.Mesh( + chemical="Ni", + efficiency=0.82, + pitch=70 / u.imperial.inch, + ), + ) diff --git a/esis/flights/f1/optics/filters/materials/_materials_test.py b/esis/flights/f1/optics/filters/materials/_materials_test.py new file mode 100644 index 0000000..acfbfb7 --- /dev/null +++ b/esis/flights/f1/optics/filters/materials/_materials_test.py @@ -0,0 +1,7 @@ +import optika +import esis + + +def test_thin_film_design(): + r = esis.flights.f1.optics.filters.materials.thin_film_design() + assert isinstance(r, optika.materials.ThinFilmFilter)