Skip to content

Commit

Permalink
Added an example of how to plot the filter schematic to the documenta…
Browse files Browse the repository at this point in the history
…tion of `esis.flights.f1.optics.filters.materials.thin_film_design()`.
  • Loading branch information
byrdie committed Mar 22, 2024
1 parent c48eded commit a9bbf04
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions esis/flights/f1/optics/filters/materials/_materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,27 @@ def thin_film_design() -> optika.materials.ThinFilmFilter:
na.plt.plot(wavelength, transmissivity, ax=ax);
ax.set_xlabel(f"wavelength ({wavelength.unit:latex_inline})");
ax.set_ylabel("transmissivity");
Plot the schematic of the layers composing the filter
.. jupyter-execute::
with astropy.visualization.quantity_support():
fig, ax = plt.subplots()
material.plot_layers(
ax=ax,
)
ax.set_axis_off()
ax.autoscale()
"""

return optika.materials.ThinFilmFilter(
layer=optika.materials.Layer(
chemical="Al",
thickness=100 * u.nm,
kwargs_plot=dict(
color="lightgray",
),
),
layer_oxide=optika.materials.Layer(
chemical=optika.chemicals.Chemical(
Expand All @@ -60,6 +75,10 @@ def thin_film_design() -> optika.materials.ThinFilmFilter:
table="palik",
),
thickness=4 * u.nm,
kwargs_plot=dict(
color="gray",
),
x_label=1.1,
),
mesh=optika.materials.meshes.Mesh(
chemical="Ni",
Expand Down

0 comments on commit a9bbf04

Please sign in to comment.