Skip to content

Commit

Permalink
Introduce z_order 1000 range for FITS header effects
Browse files Browse the repository at this point in the history
  • Loading branch information
teutoburg committed Nov 13, 2024
1 parent 571ff0e commit 8f51652
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions scopesim/effects/fits_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class ExtraFitsKeywords(Effect):
"""

z_order: ClassVar[tuple[int, ...]] = (999,)
z_order: ClassVar[tuple[int, ...]] = (1050,)

def __init__(self, cmds=None, **kwargs):
# don't pass kwargs, as DataContainer can't handle yaml files
Expand Down Expand Up @@ -432,7 +432,7 @@ class EffectsMetaKeywords(ExtraFitsKeywords):
"""

z_order: ClassVar[tuple[int, ...]] = (998,)
z_order: ClassVar[tuple[int, ...]] = (1040,)

def __init__(self, cmds=None, **kwargs):
super(ExtraFitsKeywords, self).__init__(cmds=cmds, **kwargs)
Expand Down Expand Up @@ -520,7 +520,7 @@ class SourceDescriptionFitsKeywords(ExtraFitsKeywords):
"""

z_order: ClassVar[tuple[int, ...]] = (997,)
z_order: ClassVar[tuple[int, ...]] = (1030,)

def __init__(self, cmds=None, **kwargs):
super(ExtraFitsKeywords, self).__init__(cmds=cmds, **kwargs)
Expand Down Expand Up @@ -605,7 +605,7 @@ class SimulationConfigFitsKeywords(ExtraFitsKeywords):
"""

z_order: ClassVar[tuple[int, ...]] = (996,)
z_order: ClassVar[tuple[int, ...]] = (1020,)

def __init__(self, cmds=None, **kwargs):
super(ExtraFitsKeywords, self).__init__(cmds=cmds, **kwargs)
Expand Down
8 changes: 7 additions & 1 deletion scopesim/optics/optics_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ def get_z_order_effects(self, z_level: int):
- Apply lambda-independent 2D image plane effects - z_order = 700..799
- Apply detector effects - z_order = 800..899
- Apply detector array effects - z_order = 900..999
- Apply FITS header effects - z_order = 1000...1100
Parameters
----------
z_level : {0, 100, 200, 300, 400, 500, 600, 700, 800, 900}
z_level : {0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}
100-range of z_orders.
Returns
Expand Down Expand Up @@ -198,6 +199,11 @@ def image_plane_headers(self):

return [det_list.image_plane_header for det_list in detector_lists]

@property
def fits_header_effects(self):
"""Get effects with z_order = 1000...1099."""
return self.get_z_order_effects(1000)

Check warning on line 205 in scopesim/optics/optics_manager.py

View check run for this annotation

Codecov / codecov/patch

scopesim/optics/optics_manager.py#L205

Added line #L205 was not covered by tests

@property
def detector_array_effects(self):
"""Get effects with z_order = 900...999."""
Expand Down

0 comments on commit 8f51652

Please sign in to comment.