File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -162,9 +162,21 @@ def import_fits(name: str, hdul: pf.HDUList) -> 'TSData':
162
162
data = hdul [f'DATA_{ name } ' ].data .astype ('d' )
163
163
ootm = hdul [f'OOTM_{ name } ' ].data .astype (bool )
164
164
mask = hdul [f'MASK_{ name } ' ].data .astype (bool )
165
- noise_group = hdul [f'DATA_{ name } ' ].header ['NGROUP' ]
166
- ephemeris_group = hdul [f'DATA_{ name } ' ].header ['EPGROUP' ]
167
- offset_group = hdul [f'DATA_{ name } ' ].header ['OFFGROUP' ]
165
+
166
+ try :
167
+ noise_group = hdul [f'DATA_{ name } ' ].header ['NGROUP' ]
168
+ except KeyError :
169
+ noise_group = 0
170
+
171
+ try :
172
+ ephemeris_group = hdul [f'DATA_{ name } ' ].header ['EPGROUP' ]
173
+ except KeyError :
174
+ ephemeris_group = 0
175
+
176
+ try :
177
+ offset_group = hdul [f'DATA_{ name } ' ].header ['OFFGROUP' ]
178
+ except KeyError :
179
+ offset_group = 0
168
180
169
181
try :
170
182
n_baseline = hdul [f'DATA_{ name } ' ].header ['NBASEL' ]
You can’t perform that action at this time.
0 commit comments