pspipe 0.11__tar.gz → 0.13__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.11 → pspipe-0.13}/PKG-INFO +2 -2
- {pspipe-0.11 → pspipe-0.13}/pspipe/settings.py +21 -2
- {pspipe-0.11 → pspipe-0.13}/pspipe/tasks.py +140 -59
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/default_settings.toml +8 -0
- {pspipe-0.11 → pspipe-0.13}/pyproject.toml +2 -2
- {pspipe-0.11 → pspipe-0.13}/LICENSE +0 -0
- {pspipe-0.11 → pspipe-0.13}/README.md +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/__init__.py +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/database.py +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/obsdata.py +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/eor_bins_a12.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/eor_bins_alo.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/eor_bins_hba.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/eor_bins_nenufar.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/flagger.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/flagger_pre_combine.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/gpr_config_a12.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/gpr_config_hba.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/gpr_config_nenufar.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/gpr_config_v.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/ps_config_a12.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/ps_config_alo.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/ps_config_hba.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/config/ps_config_nenufar.parset +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/default_a12.toml +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/default_alo.toml +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/default_hba.toml +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/templates/default_nenufar.toml +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/tools/__init__.py +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/tools/psdb.py +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/tools/pspipe.py +0 -0
- {pspipe-0.11 → pspipe-0.13}/pspipe/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pspipe
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13
|
|
4
4
|
Summary: Power spectra pipeline for Cosmic Dawn, Epoch of Reionization radio interferometric experiments
|
|
5
5
|
License-Expression: GPL-3.0-or-later
|
|
6
6
|
License-File: LICENSE
|
|
@@ -18,7 +18,7 @@ Provides-Extra: docs
|
|
|
18
18
|
Provides-Extra: ml-gpr
|
|
19
19
|
Requires-Dist: astropy (>6.0)
|
|
20
20
|
Requires-Dist: click (>=8.0)
|
|
21
|
-
Requires-Dist: libpipe (>=0.
|
|
21
|
+
Requires-Dist: libpipe (>=0.9)
|
|
22
22
|
Requires-Dist: myst-parser (>=2) ; extra == "docs"
|
|
23
23
|
Requires-Dist: ps-eor (>=1.0)
|
|
24
24
|
Requires-Dist: ps-eor[ml-gpr] (>=1.0) ; extra == "ml-gpr"
|
|
@@ -5,13 +5,20 @@
|
|
|
5
5
|
import os
|
|
6
6
|
|
|
7
7
|
import astropy.units as u
|
|
8
|
-
from libpipe import futils
|
|
8
|
+
from libpipe import futils, worker
|
|
9
9
|
from libpipe.settings import BaseSettings
|
|
10
10
|
|
|
11
11
|
# Lazy loaded:
|
|
12
12
|
# - ps_eor.datacube in Settings.validate_vis_cube()
|
|
13
13
|
from . import utils
|
|
14
14
|
|
|
15
|
+
|
|
16
|
+
def worker_resources(s_worker):
|
|
17
|
+
'''worker.resources as {category: {'cpus': .., 'mem': ..}}, or None.'''
|
|
18
|
+
resources = s_worker.get('resources') or {}
|
|
19
|
+
return {k: dict(v) for k, v in resources.items()} or None
|
|
20
|
+
|
|
21
|
+
|
|
15
22
|
TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
|
16
23
|
|
|
17
24
|
TEMPLATE_NAMES = ['a12', 'nenufar', 'hba', 'alo']
|
|
@@ -25,6 +32,8 @@ class Settings(BaseSettings):
|
|
|
25
32
|
BaseSettings.__init__(self, file, d)
|
|
26
33
|
|
|
27
34
|
def validate_image(self, val_fct):
|
|
35
|
+
val_fct(self.image.imager in ('wsclean', 'psimager'), 'imager')
|
|
36
|
+
val_fct(self.image.imager == 'wsclean' or not self.image.clean_niter, 'clean_niter')
|
|
28
37
|
val_fct(u.Unit(self.image.scale).is_equivalent((u.rad, u.s)), 'scale')
|
|
29
38
|
val_fct(len(self.image.size.split()) == 2
|
|
30
39
|
and all(k.isdigit() for k in self.image.size.split()), 'size')
|
|
@@ -49,9 +58,19 @@ class Settings(BaseSettings):
|
|
|
49
58
|
def validate_worker(self, val_fct):
|
|
50
59
|
val_fct(isinstance(self.worker.max_concurrent, int), 'max_concurrent')
|
|
51
60
|
val_fct(not self.worker.env_file or futils.is_file(self.worker.env_file), 'env_file')
|
|
52
|
-
val_fct(self.worker.get('max_time')
|
|
61
|
+
val_fct(not self.worker.get('max_time')
|
|
53
62
|
or (isinstance(self.worker.max_time, (int, float)) and self.worker.max_time > 0),
|
|
54
63
|
'max_time')
|
|
64
|
+
slurm_nodes = self.worker.get('slurm_nodes') or 0
|
|
65
|
+
val_fct(isinstance(slurm_nodes, int) and slurm_nodes >= 0, 'slurm_nodes')
|
|
66
|
+
try:
|
|
67
|
+
resources = worker.resolve_resources(worker_resources(self.worker))
|
|
68
|
+
except (ValueError, TypeError):
|
|
69
|
+
resources = None
|
|
70
|
+
val_fct(resources is not None, 'resources')
|
|
71
|
+
categories = self.worker.get('categories') or {}
|
|
72
|
+
val_fct(resources is None or all(c in resources for c in categories.values()),
|
|
73
|
+
'categories')
|
|
55
74
|
|
|
56
75
|
def validate_merge_ms(self, val_fct):
|
|
57
76
|
val_fct(isinstance(self.merge_ms.apply_aoflagger, bool), 'apply_aoflagger')
|
|
@@ -14,7 +14,7 @@ import astropy.io.fits as pf
|
|
|
14
14
|
import numpy as np
|
|
15
15
|
from libpipe import futils, worker
|
|
16
16
|
|
|
17
|
-
from . import database, utils
|
|
17
|
+
from . import database, settings, utils
|
|
18
18
|
|
|
19
19
|
CWD = os.getcwd()
|
|
20
20
|
|
|
@@ -48,6 +48,11 @@ def get_target_host(in_file, worker_settings):
|
|
|
48
48
|
|
|
49
49
|
class AbstractSubTask:
|
|
50
50
|
|
|
51
|
+
# Task type (worker.categories key, usage summary) and resource category as a job step of an
|
|
52
|
+
# allocation (worker.slurm_nodes): small, medium, high_mem, cpu or heavy
|
|
53
|
+
label = None
|
|
54
|
+
category = 'heavy'
|
|
55
|
+
|
|
51
56
|
def __init__(self, settings_obj, exec_name):
|
|
52
57
|
self.settings = settings_obj
|
|
53
58
|
self.exec_name = exec_name
|
|
@@ -74,23 +79,24 @@ class AbstractTask:
|
|
|
74
79
|
self.name = name
|
|
75
80
|
self.settings = settings_obj.copy()
|
|
76
81
|
self.settings.worker.update(worker_kargs)
|
|
77
|
-
s_worker = self.settings.worker
|
|
78
82
|
|
|
79
83
|
if not self.settings.validate('worker'):
|
|
80
84
|
raise ValueError('Invalid worker settings.')
|
|
81
85
|
|
|
82
|
-
self.worker =
|
|
86
|
+
self.worker = self._worker_pool(name)
|
|
87
|
+
|
|
88
|
+
def _worker_pool(self, name):
|
|
89
|
+
s_worker = self.settings.worker
|
|
90
|
+
# 0 and '' (the defaults) leave max_time unset and slurm_options from the environment
|
|
91
|
+
return worker.get_worker_pool(
|
|
83
92
|
name, nodes=s_worker.nodes, max_concurrent=s_worker.max_concurrent,
|
|
84
|
-
env_file=s_worker.env_file, max_time=s_worker.get('max_time'),
|
|
85
|
-
slurm_options=s_worker.get('slurm_options')
|
|
93
|
+
env_file=s_worker.env_file, max_time=s_worker.get('max_time') or None,
|
|
94
|
+
slurm_options=s_worker.get('slurm_options') or None,
|
|
95
|
+
slurm_nodes=s_worker.get('slurm_nodes') or None,
|
|
96
|
+
resources=settings.worker_resources(s_worker))
|
|
86
97
|
|
|
87
98
|
def init_for_new_task(self, post_task_name):
|
|
88
|
-
|
|
89
|
-
self.worker = worker.get_worker_pool(post_task_name, nodes=s_worker.nodes,
|
|
90
|
-
max_concurrent=s_worker.max_concurrent,
|
|
91
|
-
env_file=s_worker.env_file,
|
|
92
|
-
max_time=s_worker.get('max_time'),
|
|
93
|
-
slurm_options=s_worker.get('slurm_options'))
|
|
99
|
+
self.worker = self._worker_pool(post_task_name)
|
|
94
100
|
|
|
95
101
|
def add_sub_task(self, sub_task, run_on_host=None):
|
|
96
102
|
log_file = sub_task.get_log_file()
|
|
@@ -103,8 +109,10 @@ class AbstractTask:
|
|
|
103
109
|
cmd = sub_task.build_command()
|
|
104
110
|
if self.settings.debug:
|
|
105
111
|
print(cmd)
|
|
112
|
+
label = sub_task.label or sub_task.exec_name
|
|
113
|
+
category = (self.settings.worker.get('categories') or {}).get(label, sub_task.category)
|
|
106
114
|
self.worker.add(cmd, output_file=log_file, done_callback=sub_task.done_callback,
|
|
107
|
-
run_on_host=run_on_host)
|
|
115
|
+
run_on_host=run_on_host, category=category, label=label)
|
|
108
116
|
|
|
109
117
|
def run(self, obs_ids):
|
|
110
118
|
raise NotImplementedError()
|
|
@@ -128,12 +136,18 @@ class AbstractTask:
|
|
|
128
136
|
|
|
129
137
|
class ImagingSubTask(AbstractSubTask):
|
|
130
138
|
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
label = 'image'
|
|
140
|
+
category = 'heavy'
|
|
141
|
+
|
|
142
|
+
def __init__(self, settings_obj, obs_id, inp_ms_files, even=False, odd=False, index=0,
|
|
143
|
+
even_odd=False):
|
|
144
|
+
AbstractSubTask.__init__(self, settings_obj, settings_obj.image.imager)
|
|
133
145
|
self.inp_ms_files = inp_ms_files
|
|
134
146
|
self.obs_id = obs_id
|
|
135
147
|
self.even = even
|
|
136
148
|
self.odd = odd
|
|
149
|
+
# psimager only: even and odd time steps in one call
|
|
150
|
+
self.even_odd = even_odd
|
|
137
151
|
self.index = index
|
|
138
152
|
self.img_rev = database.ImageRevision(self.settings)
|
|
139
153
|
self.obs_meta = database.Database(self.settings).get_obs_id_meta(self.obs_id)
|
|
@@ -169,11 +183,12 @@ class ImagingSubTask(AbstractSubTask):
|
|
|
169
183
|
|
|
170
184
|
return out_prefix
|
|
171
185
|
|
|
172
|
-
def register_files(self, files, lst_idx=None, img_name='image'):
|
|
186
|
+
def register_files(self, files, lst_idx=None, img_name='image', even=None, odd=None):
|
|
173
187
|
meta = self.img_rev.get_meta(self.obs_id, lst_idx=lst_idx)
|
|
174
188
|
if meta is None:
|
|
175
189
|
meta = self.img_rev.new_obs_id(self.obs_id, lst_idx=lst_idx)
|
|
176
|
-
meta.add_fits(files, even=self.even
|
|
190
|
+
meta.add_fits(files, even=self.even if even is None else even,
|
|
191
|
+
odd=self.odd if odd is None else odd, img_name=img_name)
|
|
177
192
|
meta.save()
|
|
178
193
|
|
|
179
194
|
def done_callback(self):
|
|
@@ -189,32 +204,42 @@ class ImagingSubTask(AbstractSubTask):
|
|
|
189
204
|
else:
|
|
190
205
|
total_time = self.obs_meta.total_time
|
|
191
206
|
|
|
192
|
-
if
|
|
193
|
-
|
|
194
|
-
files.extend(glob.glob(f'{self.get_fits_prefix()}*residual.fits'))
|
|
195
|
-
img_name = 'residual'
|
|
196
|
-
else:
|
|
197
|
-
files = glob.glob(f'{self.get_fits_prefix()}*.fits')
|
|
198
|
-
img_name = 'image'
|
|
199
|
-
|
|
200
|
-
for file in files:
|
|
201
|
-
pf.setval(file, 'PEINTTIM', value=int(self.obs_meta.int_time))
|
|
202
|
-
pf.setval(file, 'PETOTTIM', value=int(total_time))
|
|
203
|
-
pf.setval(file, 'PECHWIDT', value=int(self.obs_meta.chan_width))
|
|
204
|
-
|
|
205
|
-
if not img.lst_bins:
|
|
206
|
-
self.register_files(files, img_name=img_name)
|
|
207
|
+
if self.even_odd:
|
|
208
|
+
parts = [('-even', True, False), ('-odd', False, True)]
|
|
207
209
|
else:
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
210
|
+
parts = [('', self.even, self.odd)]
|
|
211
|
+
|
|
212
|
+
for part, even, odd in parts:
|
|
213
|
+
prefix = self.get_fits_prefix() + part
|
|
214
|
+
|
|
215
|
+
if img.clean_niter > 0 and img.clean_residual:
|
|
216
|
+
files = glob.glob(f'{prefix}*psf.fits')
|
|
217
|
+
files.extend(glob.glob(f'{prefix}*residual.fits'))
|
|
218
|
+
img_name = 'residual'
|
|
219
|
+
else:
|
|
220
|
+
files = glob.glob(f'{prefix}*.fits')
|
|
221
|
+
img_name = 'image'
|
|
222
|
+
|
|
223
|
+
for file in files:
|
|
224
|
+
pf.setval(file, 'PEINTTIM', value=int(self.obs_meta.int_time))
|
|
225
|
+
pf.setval(file, 'PETOTTIM', value=int(total_time))
|
|
226
|
+
pf.setval(file, 'PECHWIDT', value=int(self.obs_meta.chan_width))
|
|
227
|
+
|
|
228
|
+
if not img.lst_bins:
|
|
229
|
+
self.register_files(files, img_name=img_name, even=even, odd=odd)
|
|
230
|
+
else:
|
|
231
|
+
for i, data_lst_idx in enumerate(self.img_rev.get_lst_bins(self.obs_id,
|
|
232
|
+
return_time_index=True)[2]):
|
|
233
|
+
files = glob.glob(f'{prefix}*-t{i:04}-*.fits')
|
|
234
|
+
self.register_files(files, lst_idx=data_lst_idx, img_name=img_name,
|
|
235
|
+
even=even, odd=odd)
|
|
236
|
+
|
|
237
|
+
if self.temp_dir is not None:
|
|
238
|
+
with contextlib.suppress(OSError):
|
|
239
|
+
os.remove(self.temp_protect_file)
|
|
240
|
+
|
|
241
|
+
with contextlib.suppress(OSError):
|
|
242
|
+
os.rmdir(self.temp_dir)
|
|
218
243
|
|
|
219
244
|
def get_parameters(self):
|
|
220
245
|
args = []
|
|
@@ -229,29 +254,33 @@ class ImagingSubTask(AbstractSubTask):
|
|
|
229
254
|
channels_out = self.obs_meta.n_channels // int(channels_out[5:])
|
|
230
255
|
channels_out = int(channels_out)
|
|
231
256
|
|
|
232
|
-
args.append(f"-
|
|
233
|
-
|
|
234
|
-
args.append(f"-grid-mode kb -taper-edge {img.taper_edge} -padding {img.padding}")
|
|
235
|
-
args.append(f"-visibility-weighting-mode {img.visibility_weighting_mode} -reorder "
|
|
257
|
+
args.append(f"-taper-edge {img.taper_edge} -padding {img.padding}")
|
|
258
|
+
args.append(f"-visibility-weighting-mode {img.visibility_weighting_mode} "
|
|
236
259
|
f"-make-psf -no-dirty")
|
|
237
260
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
261
|
+
if img.imager == 'wsclean':
|
|
262
|
+
args.append(f"-oversampling {img.oversampling} -kernel-size {img.kernel_size} "
|
|
263
|
+
f"-nwlayers {img.nwlayers} -grid-mode kb -reorder")
|
|
264
|
+
|
|
265
|
+
# If MS directory is not writable, we need to define a temp directory
|
|
266
|
+
if not all(os.access(ms_file, os.W_OK) for ms_file in self.inp_ms_files):
|
|
267
|
+
self.temp_dir = os.path.join(self.get_dir(),
|
|
268
|
+
'tmp' + database.even_odd_str(self.even, self.odd))
|
|
269
|
+
else:
|
|
270
|
+
self.temp_dir = os.path.join(self.inp_ms_files[0],
|
|
271
|
+
'tmp' + database.even_odd_str(self.even, self.odd))
|
|
245
272
|
|
|
246
|
-
|
|
247
|
-
|
|
273
|
+
if not os.path.isdir(self.temp_dir):
|
|
274
|
+
os.makedirs(self.temp_dir)
|
|
248
275
|
|
|
249
|
-
|
|
250
|
-
|
|
276
|
+
# Make sure we do not remove this directory by accident
|
|
277
|
+
_, self.temp_protect_file = tempfile.mkstemp(dir=self.temp_dir)
|
|
251
278
|
|
|
252
|
-
|
|
279
|
+
args.append(f'-temp-dir {self.temp_dir}')
|
|
253
280
|
|
|
254
|
-
if self.
|
|
281
|
+
if self.even_odd:
|
|
282
|
+
args.append('-even-odd')
|
|
283
|
+
elif self.even:
|
|
255
284
|
args.append('-even-timesteps')
|
|
256
285
|
elif self.odd:
|
|
257
286
|
args.append('-odd-timesteps')
|
|
@@ -327,7 +356,11 @@ class ImagingTask(AbstractTask):
|
|
|
327
356
|
|
|
328
357
|
for i, ms_files_channel in enumerate(ms_files):
|
|
329
358
|
file_host = get_target_host(ms_files_channel[0], self.settings.worker)
|
|
330
|
-
if self.settings.image.split_even_odd:
|
|
359
|
+
if self.settings.image.split_even_odd and self.settings.image.imager == 'psimager':
|
|
360
|
+
t = ImagingSubTask(self.settings, obs_id, ms_files_channel, index=i,
|
|
361
|
+
even_odd=True)
|
|
362
|
+
self.add_sub_task(t, run_on_host=file_host)
|
|
363
|
+
elif self.settings.image.split_even_odd:
|
|
331
364
|
t = ImagingSubTask(self.settings, obs_id, ms_files_channel, even=True, index=i)
|
|
332
365
|
self.add_sub_task(t, run_on_host=file_host)
|
|
333
366
|
t = ImagingSubTask(self.settings, obs_id, ms_files_channel, odd=True, index=i)
|
|
@@ -346,6 +379,9 @@ class ImagingTask(AbstractTask):
|
|
|
346
379
|
|
|
347
380
|
class GenVisCubeSubTask(AbstractSubTask):
|
|
348
381
|
|
|
382
|
+
label = 'gen_vis_cube'
|
|
383
|
+
category = 'small'
|
|
384
|
+
|
|
349
385
|
def __init__(self, settings_obj, obs_id, stokes, even=False, odd=False, lst_idx=None):
|
|
350
386
|
AbstractSubTask.__init__(self, settings_obj, 'pstool gen_vis_cube')
|
|
351
387
|
self.obs_id = obs_id
|
|
@@ -401,6 +437,9 @@ class GenVisCubeSubTask(AbstractSubTask):
|
|
|
401
437
|
|
|
402
438
|
class EvenOddToSumDiffSubTask(AbstractSubTask):
|
|
403
439
|
|
|
440
|
+
label = 'even_odd_to_sum_diff'
|
|
441
|
+
category = 'small'
|
|
442
|
+
|
|
404
443
|
def __init__(self, settings_obj, obs_id, stokes, lst_idx=None):
|
|
405
444
|
AbstractSubTask.__init__(self, settings_obj, 'pstool even_odd_to_sum_diff')
|
|
406
445
|
self.obs_id = obs_id
|
|
@@ -501,6 +540,9 @@ class GenVisCubeTask(AbstractTask):
|
|
|
501
540
|
|
|
502
541
|
|
|
503
542
|
class ConcatMSSubTask(AbstractSubTask):
|
|
543
|
+
|
|
544
|
+
label = 'concat_ms'
|
|
545
|
+
category = 'medium'
|
|
504
546
|
"""
|
|
505
547
|
Subtask that calls the CLI 'mstool concat <MS...> <OUT.MS>'
|
|
506
548
|
to concatenate MS files in time.
|
|
@@ -582,6 +624,9 @@ class ConcatMSTask(AbstractTask):
|
|
|
582
624
|
|
|
583
625
|
class MergeMSSubTask(AbstractSubTask):
|
|
584
626
|
|
|
627
|
+
label = 'merge_ms'
|
|
628
|
+
category = 'heavy'
|
|
629
|
+
|
|
585
630
|
def __init__(self, settings_obj, ms_files, obs_id_out):
|
|
586
631
|
AbstractSubTask.__init__(self, settings_obj, 'DP3')
|
|
587
632
|
self.db = database.Database(self.settings)
|
|
@@ -696,6 +741,9 @@ class MergeMSTask(AbstractTask):
|
|
|
696
741
|
|
|
697
742
|
class AOFlaggerSubTask(AbstractSubTask):
|
|
698
743
|
|
|
744
|
+
label = 'ao_flag'
|
|
745
|
+
category = 'medium'
|
|
746
|
+
|
|
699
747
|
def __init__(self, settings_obj, ms_file):
|
|
700
748
|
AbstractSubTask.__init__(self, settings_obj, 'DP3')
|
|
701
749
|
self.ms_file = ms_file
|
|
@@ -749,6 +797,9 @@ class AOFlaggerTask(AbstractTask):
|
|
|
749
797
|
|
|
750
798
|
class DP3SubTask(AbstractSubTask):
|
|
751
799
|
|
|
800
|
+
label = 'dp3'
|
|
801
|
+
category = 'heavy'
|
|
802
|
+
|
|
752
803
|
def __init__(self, settings_obj, ms_file):
|
|
753
804
|
AbstractSubTask.__init__(self, settings_obj, 'DP3')
|
|
754
805
|
self.ms_file = ms_file
|
|
@@ -796,6 +847,9 @@ class DP3Task(AbstractTask):
|
|
|
796
847
|
|
|
797
848
|
class MakePSSubTask(AbstractSubTask):
|
|
798
849
|
|
|
850
|
+
label = 'make_ps'
|
|
851
|
+
category = 'small'
|
|
852
|
+
|
|
799
853
|
def __init__(self, settings_obj, obs_id, lst_idx=None):
|
|
800
854
|
AbstractSubTask.__init__(self, settings_obj, 'pstool make_ps')
|
|
801
855
|
self.obs_id = obs_id
|
|
@@ -859,6 +913,9 @@ class MakePSTask(AbstractTask):
|
|
|
859
913
|
|
|
860
914
|
class RunGPRSubTask(AbstractSubTask):
|
|
861
915
|
|
|
916
|
+
label = 'run_gpr'
|
|
917
|
+
category = 'cpu'
|
|
918
|
+
|
|
862
919
|
def __init__(self, settings_obj, obs_id, lst_idx=None):
|
|
863
920
|
AbstractSubTask.__init__(self, settings_obj, 'pstool run_gpr')
|
|
864
921
|
self.obs_id = obs_id
|
|
@@ -929,6 +986,9 @@ class RunGPRTask(AbstractTask):
|
|
|
929
986
|
|
|
930
987
|
class RunMLGPRSubTask(AbstractSubTask):
|
|
931
988
|
|
|
989
|
+
label = 'run_ml_gpr'
|
|
990
|
+
category = 'cpu'
|
|
991
|
+
|
|
932
992
|
def __init__(self, settings_obj, obs_id, lst_idx=None):
|
|
933
993
|
AbstractSubTask.__init__(self, settings_obj, 'pstool run_ml_gpr')
|
|
934
994
|
self.obs_id = obs_id
|
|
@@ -1002,6 +1062,9 @@ class RunMLGPRTask(AbstractTask):
|
|
|
1002
1062
|
|
|
1003
1063
|
class RunMLGPRInjSubTask(AbstractSubTask):
|
|
1004
1064
|
|
|
1065
|
+
label = 'run_ml_gpr_inj'
|
|
1066
|
+
category = 'cpu'
|
|
1067
|
+
|
|
1005
1068
|
def __init__(self, settings_obj, obs_id, var_21_over_noise, x1, x2, lst_idx=None):
|
|
1006
1069
|
AbstractSubTask.__init__(self, settings_obj, 'pstool run_ml_gpr_inj')
|
|
1007
1070
|
self.obs_id = obs_id
|
|
@@ -1208,6 +1271,9 @@ class CombineTask(AbstractTask):
|
|
|
1208
1271
|
|
|
1209
1272
|
class RunFlaggerSubTask(AbstractSubTask):
|
|
1210
1273
|
|
|
1274
|
+
label = 'run_flagger'
|
|
1275
|
+
category = 'small'
|
|
1276
|
+
|
|
1211
1277
|
def __init__(self, settings_obj, obs_id):
|
|
1212
1278
|
AbstractSubTask.__init__(self, settings_obj, 'pstool run_flagger')
|
|
1213
1279
|
self.vis_rev = database.VisRevision(self.settings)
|
|
@@ -1222,6 +1288,9 @@ class RunFlaggerSubTask(AbstractSubTask):
|
|
|
1222
1288
|
|
|
1223
1289
|
class VisToSphSubTask(AbstractSubTask):
|
|
1224
1290
|
|
|
1291
|
+
label = 'vis_to_sph'
|
|
1292
|
+
category = 'small'
|
|
1293
|
+
|
|
1225
1294
|
def __init__(self, settings_obj, obs_id_out, stokes, h5_input, h5_out, h5_flag):
|
|
1226
1295
|
AbstractSubTask.__init__(self, settings_obj, 'pstool vis_to_sph')
|
|
1227
1296
|
self.vis_rev = database.VisRevision(self.settings)
|
|
@@ -1296,6 +1365,9 @@ class VisToSphTask(AbstractTask):
|
|
|
1296
1365
|
|
|
1297
1366
|
class ApplyFlagSubTask(AbstractSubTask):
|
|
1298
1367
|
|
|
1368
|
+
label = 'apply_flag'
|
|
1369
|
+
category = 'small'
|
|
1370
|
+
|
|
1299
1371
|
def __init__(self, settings_obj, ms_file, h5_file):
|
|
1300
1372
|
AbstractSubTask.__init__(self, settings_obj, 'flagtool restore')
|
|
1301
1373
|
self.ms_file = ms_file
|
|
@@ -1383,6 +1455,9 @@ class RestoreFlagTask(AbstractTask):
|
|
|
1383
1455
|
|
|
1384
1456
|
class DelayFlaggerSubTask(AbstractSubTask):
|
|
1385
1457
|
|
|
1458
|
+
label = 'delay_flagger'
|
|
1459
|
+
category = 'medium'
|
|
1460
|
+
|
|
1386
1461
|
def __init__(self, settings_obj, ms_file):
|
|
1387
1462
|
AbstractSubTask.__init__(self, settings_obj, 'flagtool delay_flagger')
|
|
1388
1463
|
self.ms_file = ms_file
|
|
@@ -1440,6 +1515,9 @@ class DelayFlagger(AbstractTask):
|
|
|
1440
1515
|
|
|
1441
1516
|
class VisFlaggerSubTask(AbstractSubTask):
|
|
1442
1517
|
|
|
1518
|
+
label = 'vis_flagger'
|
|
1519
|
+
category = 'medium'
|
|
1520
|
+
|
|
1443
1521
|
def __init__(self, settings_obj, ms_file):
|
|
1444
1522
|
AbstractSubTask.__init__(self, settings_obj, 'flagtool vis_flagger')
|
|
1445
1523
|
self.ms_file = ms_file
|
|
@@ -1491,6 +1569,9 @@ class VisFlagger(AbstractTask):
|
|
|
1491
1569
|
|
|
1492
1570
|
class SSINSSubTask(AbstractSubTask):
|
|
1493
1571
|
|
|
1572
|
+
label = 'ssins'
|
|
1573
|
+
category = 'medium'
|
|
1574
|
+
|
|
1494
1575
|
def __init__(self, settings_obj, ms_file):
|
|
1495
1576
|
AbstractSubTask.__init__(self, settings_obj, 'flagtool ssins')
|
|
1496
1577
|
self.ms_file = ms_file
|
|
@@ -10,6 +10,13 @@ max_concurrent = 4
|
|
|
10
10
|
env_file = ''
|
|
11
11
|
run_on_file_host = false
|
|
12
12
|
run_on_file_host_pattern = ''
|
|
13
|
+
slurm_options = ''
|
|
14
|
+
max_time = 0
|
|
15
|
+
slurm_nodes = 0
|
|
16
|
+
|
|
17
|
+
[worker.resources]
|
|
18
|
+
|
|
19
|
+
[worker.categories]
|
|
13
20
|
|
|
14
21
|
[merge_ms]
|
|
15
22
|
apply_aoflagger = true
|
|
@@ -63,6 +70,7 @@ config_file = ''
|
|
|
63
70
|
|
|
64
71
|
[image]
|
|
65
72
|
name = 'default'
|
|
73
|
+
imager = 'wsclean'
|
|
66
74
|
umin = 50
|
|
67
75
|
umax = 250
|
|
68
76
|
scale = '0.5amin'
|
|
@@ -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.13"
|
|
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"
|
|
@@ -20,7 +20,7 @@ dependencies = [
|
|
|
20
20
|
"tables>=3.2",
|
|
21
21
|
"tabulate>=0.8",
|
|
22
22
|
"ps-eor>=1.0",
|
|
23
|
-
"libpipe>=0.
|
|
23
|
+
"libpipe>=0.9",
|
|
24
24
|
"python-casacore>=3.0",
|
|
25
25
|
]
|
|
26
26
|
|
|
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
|