@@ -37,11 +37,15 @@ class InstrumentBase:
37
37
Parameters
38
38
----------
39
39
observing_time : `~astropy.units.Quantity`
40
- Tuple of start and end observing times
41
- observer_coordinate : `~astropy.coordinates.SkyCoord`
40
+ If cadence is also provided and this has a length of 2, this is interpreted as
41
+ the start and end time of the observation period and an observing time is
42
+ constructed based on this interval and the cadence. Otherwise, this is interpreted
43
+ as the times at which the observations should be forward modeled.
44
+ observer : `~astropy.coordinates.SkyCoord`
42
45
Coordinate of the observing instrument
43
- cadence : `~astropy.units.Quantity`
44
46
resolution : `~astropy.units.Quantity`
47
+ cadence : `~astropy.units.Quantity`, optional
48
+ If specified, this is used to construct the observing time
45
49
pad_fov : `~astropy.units.Quantity`, optional
46
50
Two-dimensional array specifying the padding to apply to the field of view of the synthetic
47
51
image in both directions. If None, no padding is applied and the field of view is defined
@@ -55,13 +59,17 @@ class InstrumentBase:
55
59
def __init__ (self ,
56
60
observing_time : u .s ,
57
61
observer ,
62
+ resolution : u .Unit ('arcsec/pix' ),
63
+ cadence : u .s = None ,
58
64
pad_fov : u .arcsec = None ,
59
65
fov_center = None ,
60
66
fov_width : u .arcsec = None ,
61
67
average_over_los = False ):
62
68
self .observer = observer
69
+ self .cadence = cadence
63
70
self .observing_time = observing_time
64
- self .pad_fov = (0 , 0 ) * u .arcsec if pad_fov is None else pad_fov
71
+ self .resolution = resolution
72
+ self .pad_fov = pad_fov
65
73
self .fov_center = fov_center
66
74
self .fov_width = fov_width
67
75
self .average_over_los = average_over_los
@@ -72,19 +80,27 @@ def observing_time(self) -> u.s:
72
80
73
81
@observing_time .setter
74
82
def observing_time (self , value ):
75
- if self .cadence is None or len (value ) > 2 :
76
- self ._observing_time = value
77
- else :
83
+ if self .cadence is not None and len (value ) == 2 :
78
84
self ._observing_time = np .arange (* value .to_value ('s' ),
79
85
self .cadence .to_value ('s' )) * u .s
86
+ else :
87
+ self ._observing_time = value
80
88
81
89
@property
82
90
def cadence (self ):
83
- return None
91
+ return self ._cadence
92
+
93
+ @cadence .setter
94
+ def cadence (self , value ):
95
+ self ._cadence = value
84
96
85
97
@property
86
98
def resolution (self ) -> u .arcsec / u .pix :
87
- return (1 , 1 ) * u .arcsec / u .pix
99
+ return self ._resolution
100
+
101
+ @resolution .setter
102
+ def resolution (self , value ):
103
+ self ._resolution = value
88
104
89
105
@property
90
106
def observer (self ):
@@ -94,6 +110,16 @@ def observer(self):
94
110
def observer (self , value ):
95
111
self ._observer = value
96
112
113
+ @property
114
+ def pad_fov (self ) -> u .arcsec :
115
+ return self ._pad_fov
116
+
117
+ @pad_fov .setter
118
+ def pad_fov (self , value ):
119
+ if value is None :
120
+ value = [0 , 0 ] * u .arcsec
121
+ self ._pad_fov = value
122
+
97
123
@property
98
124
def telescope (self ):
99
125
return self .name
@@ -108,7 +134,11 @@ def observatory(self):
108
134
109
135
@property
110
136
def _expected_unit (self ):
111
- return None
137
+ raise NotImplementedError
138
+
139
+ @property
140
+ def channels (self ):
141
+ raise NotImplementedError
112
142
113
143
def get_instrument_name (self , channel ):
114
144
return self .name
0 commit comments