pspipe 0.13__tar.gz → 0.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pspipe-0.13 → pspipe-0.14}/PKG-INFO +1 -1
- {pspipe-0.13 → pspipe-0.14}/pspipe/tasks.py +20 -8
- {pspipe-0.13 → pspipe-0.14}/pyproject.toml +1 -1
- {pspipe-0.13 → pspipe-0.14}/LICENSE +0 -0
- {pspipe-0.13 → pspipe-0.14}/README.md +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/__init__.py +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/database.py +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/obsdata.py +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/settings.py +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/eor_bins_a12.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/eor_bins_alo.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/eor_bins_hba.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/eor_bins_nenufar.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/flagger.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/flagger_pre_combine.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/gpr_config_a12.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/gpr_config_hba.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/gpr_config_nenufar.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/gpr_config_v.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/ps_config_a12.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/ps_config_alo.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/ps_config_hba.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/config/ps_config_nenufar.parset +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/default_a12.toml +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/default_alo.toml +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/default_hba.toml +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/default_nenufar.toml +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/templates/default_settings.toml +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/tools/__init__.py +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/tools/psdb.py +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/tools/pspipe.py +0 -0
- {pspipe-0.13 → pspipe-0.14}/pspipe/utils.py +0 -0
|
@@ -191,10 +191,8 @@ class ImagingSubTask(AbstractSubTask):
|
|
|
191
191
|
odd=self.odd if odd is None else odd, img_name=img_name)
|
|
192
192
|
meta.save()
|
|
193
193
|
|
|
194
|
-
def
|
|
195
|
-
for
|
|
196
|
-
os.remove(file)
|
|
197
|
-
|
|
194
|
+
def fits_keywords(self):
|
|
195
|
+
'''Integration time, total time and channel width of the images, for their headers.'''
|
|
198
196
|
img = self.settings.image
|
|
199
197
|
|
|
200
198
|
if img.time_start_index != img.time_end_index:
|
|
@@ -204,6 +202,15 @@ class ImagingSubTask(AbstractSubTask):
|
|
|
204
202
|
else:
|
|
205
203
|
total_time = self.obs_meta.total_time
|
|
206
204
|
|
|
205
|
+
return {'PEINTTIM': int(self.obs_meta.int_time), 'PETOTTIM': int(total_time),
|
|
206
|
+
'PECHWIDT': int(self.obs_meta.chan_width)}
|
|
207
|
+
|
|
208
|
+
def done_callback(self):
|
|
209
|
+
for file in glob.glob(f'{self.get_fits_prefix()}*-MFS-*.fits'):
|
|
210
|
+
os.remove(file)
|
|
211
|
+
|
|
212
|
+
img = self.settings.image
|
|
213
|
+
|
|
207
214
|
if self.even_odd:
|
|
208
215
|
parts = [('-even', True, False), ('-odd', False, True)]
|
|
209
216
|
else:
|
|
@@ -220,10 +227,12 @@ class ImagingSubTask(AbstractSubTask):
|
|
|
220
227
|
files = glob.glob(f'{prefix}*.fits')
|
|
221
228
|
img_name = 'image'
|
|
222
229
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
230
|
+
# psimager writes the keywords with the files (-fits-keyword)
|
|
231
|
+
if img.imager != 'psimager':
|
|
232
|
+
keywords = self.fits_keywords()
|
|
233
|
+
for file in files:
|
|
234
|
+
with pf.open(file, mode='update') as hdul:
|
|
235
|
+
hdul[0].header.update(keywords)
|
|
227
236
|
|
|
228
237
|
if not img.lst_bins:
|
|
229
238
|
self.register_files(files, img_name=img_name, even=even, odd=odd)
|
|
@@ -278,6 +287,9 @@ class ImagingSubTask(AbstractSubTask):
|
|
|
278
287
|
|
|
279
288
|
args.append(f'-temp-dir {self.temp_dir}')
|
|
280
289
|
|
|
290
|
+
if img.imager == 'psimager':
|
|
291
|
+
args.append(' '.join(f'-fits-keyword {k}={v}' for k, v in self.fits_keywords().items()))
|
|
292
|
+
|
|
281
293
|
if self.even_odd:
|
|
282
294
|
args.append('-even-odd')
|
|
283
295
|
elif self.even:
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pspipe"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.14"
|
|
8
8
|
description = "Power spectra pipeline for Cosmic Dawn, Epoch of Reionization radio interferometric experiments"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "GPL-3.0-or-later"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|