Skip to content

Commit

Permalink
Modified esis.flights.f1.optics.models.design_full() to include the…
Browse files Browse the repository at this point in the history
… grating efficiency model. (#8)
  • Loading branch information
byrdie authored Jul 20, 2024
1 parent 5bd48bb commit e8c7e83
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion esis/flights/f1/optics/gratings/rulings/_rulings.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def ruling_design(
width=0.1,
num_distribution=num_distribution,
),
diffraction_order=1,
diffraction_order=-1,
)


Expand Down
7 changes: 4 additions & 3 deletions esis/flights/f1/optics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import optika
import esis
from . import primaries
from . import gratings

__all__ = [
"design_full",
Expand Down Expand Up @@ -144,7 +145,7 @@ def design_full(
angle_output=8.057 * u.deg,
sag=optika.sags.SphericalSag(
radius=na.UniformUncertainScalarArray(
nominal=radius_grating,
nominal=-radius_grating,
width=radius_grating * error_radius_grating,
num_distribution=num_distribution,
),
Expand All @@ -161,8 +162,8 @@ def design_full(
period_max=2 * u.um,
),
),
material=optika.materials.Mirror(),
rulings=esis.flights.f1.optics.gratings.rulings.ruling_design(
material=gratings.materials.multilayer_design(),
rulings=gratings.rulings.ruling_design(
num_distribution=num_distribution,
),
num_folds=num_folds,
Expand Down
5 changes: 5 additions & 0 deletions esis/optics/_gratings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ def width_border_inner(self) -> u.Quantity | na.AbstractScalar:
def clearance(self) -> u.Quantity | na.AbstractScalar:
"""minimum distance between adjacent physical gratings"""

@property
def transformation(self) -> na.transformations.AbstractTransformation:
rotation = na.transformations.Cartesian3dRotationX(180 * u.deg)
return super().transformation @ rotation

@property
def surface(self) -> optika.surfaces.Surface:
angle_aperture = self.angle_aperture
Expand Down
2 changes: 1 addition & 1 deletion esis/optics/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _wavelength_test_grid(self) -> na.AbstractScalar:
d = grating.rulings.spacing_(position).length
a = self.angle_grating_input
b = self.angle_grating_output
result = (np.sin(a) + np.sin(b)) * d / m
result = np.abs((np.sin(a) + np.sin(b)) * d / m)
return result.to(u.AA)

@property
Expand Down

0 comments on commit e8c7e83

Please sign in to comment.