From 8f5165254e68e0e0ef83547e01a7118cf621f4db Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 5 Nov 2024 17:17:31 +0100 Subject: [PATCH] Introduce z_order 1000 range for FITS header effects --- scopesim/effects/fits_headers.py | 8 ++++---- scopesim/optics/optics_manager.py | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scopesim/effects/fits_headers.py b/scopesim/effects/fits_headers.py index f3e7e21e..7fc6de56 100644 --- a/scopesim/effects/fits_headers.py +++ b/scopesim/effects/fits_headers.py @@ -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 @@ -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) @@ -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) @@ -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) diff --git a/scopesim/optics/optics_manager.py b/scopesim/optics/optics_manager.py index a9316ff8..6bb3ad20 100644 --- a/scopesim/optics/optics_manager.py +++ b/scopesim/optics/optics_manager.py @@ -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 @@ -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) + @property def detector_array_effects(self): """Get effects with z_order = 900...999."""