-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added
esis.flights.f1.optics.filters.materials.thin_film_design()
f…
…actory function.
- Loading branch information
Showing
5 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
|
||
from . import primaries | ||
from . import gratings | ||
from . import filters | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
""" | ||
Models of thin-film filters used to block visible light | ||
""" | ||
|
||
from . import materials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
""" | ||
Models of the visible light filter materials. | ||
""" | ||
|
||
from ._materials import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |