26
26
from pymetis .base .product import PipelineProduct , TargetSpecificProduct
27
27
from pymetis .inputs import SinglePipelineInput
28
28
from pymetis .inputs .common import RawInput , MasterDarkInput , LinearityInput , PersistenceMapInput
29
+ from pymetis .inputs .mixins import PersistenceInputSetMixin , GainMapInputSetMixin
29
30
30
31
from pymetis .prefab .darkimage import DarkImageProcessor
31
32
32
33
33
34
class MetisIfuReduceImpl (DarkImageProcessor ):
34
35
target : Literal ["SCI" ] | Literal ["STD" ] = None
35
36
36
- class InputSet (DarkImageProcessor .InputSet ):
37
+ class InputSet (GainMapInputSetMixin , PersistenceInputSetMixin , DarkImageProcessor .InputSet ):
37
38
detector = "IFU"
38
39
39
40
class RawInput (RawInput ):
40
41
_tags = re .compile (r"IFU_(?P<target>SCI|STD)_RAW" )
41
42
43
+ class RawSkyInput (RawInput ):
44
+ _tags = re .compile (r"IFU_SKY_RAW" )
45
+ _title = "blank sky image"
46
+
42
47
class MasterDarkInput (MasterDarkInput ):
43
48
_group : cpl .ui .Frame .FrameGroup = cpl .ui .Frame .FrameGroup .RAW
44
49
@@ -52,18 +57,24 @@ class DistortionTableInput(SinglePipelineInput):
52
57
_group = cpl .ui .Frame .FrameGroup .CALIB
53
58
_title = "Distortion table"
54
59
60
+ class RsrfInput (SinglePipelineInput ):
61
+ _tags = re .compile (r"RSRF_IFU" )
62
+ _group = cpl .ui .Frame .FrameGroup .CALIB
63
+ _title = "RSRF"
64
+
55
65
def __init__ (self , frameset : cpl .ui .FrameSet ):
56
66
"""
57
67
Here we also define all input frames specific for this recipe, except those handled by mixins.
58
68
"""
59
69
super ().__init__ (frameset )
60
70
self .raw = self .RawInput (frameset )
71
+ self .sky = self .RawSkyInput (frameset )
61
72
self .linearity_map = LinearityInput (frameset )
62
- self .persistence_map = PersistenceMapInput (frameset )
63
73
self .master_dark = self .MasterDarkInput (frameset )
64
74
self .ifu_wavecal = self .WavecalInput (frameset )
75
+ self .rsrf = self .RsrfInput (frameset )
65
76
self .ifu_distortion_table = self .DistortionTableInput (frameset )
66
- self .inputs += [ self .linearity_map , self .persistence_map , self .master_dark , self .ifu_wavecal , self .ifu_distortion_table ]
77
+ self .inputs |= { self .sky , self .linearity_map , self .rsrf , self .ifu_wavecal , self .ifu_distortion_table }
67
78
68
79
class ProductReduced (TargetSpecificProduct ):
69
80
level = cpl .ui .Frame .FrameLevel .FINAL
0 commit comments