Skip to content

Commit 9824c50

Browse files
authored
Merge branch 'master' into wsclean_update
2 parents efaec62 + ad87f27 commit 9824c50

5 files changed

Lines changed: 39 additions & 17 deletions

File tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM stimela/ddfacet:1.7.1
1+
FROM quay.io/stimela/ddfacet:1.7.1
22
RUN apt install -y \
33
casacore-data
44
RUN . /opt/venv/bin/activate && \
5-
python -m pip install 'cubical[lsm-support,degridder-support]==1.6.1' 'scabha==0.3.2'
5+
#python -m pip install 'cubical[lsm-support,degridder-support]==1.6.3' 'scabha==0.3.2'
6+
python -m pip install git+https://github.com/ratt-ru/CubiCal.git scabha==0.3.2
67
RUN DDF.py --help
78
RUN gocubical --help

stimela/cargo/cab/casa_bandpass/src/run.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,25 @@
2020
field_ids = numpy.unique(tab.getcol("FIELD_ID"))
2121
tab.close()
2222

23-
tab = table(gtab+"::FIELD")
24-
field_names = tab.getcol("NAME")
25-
tab.close()
26-
2723
field_in = parameters_dict["field"].split(",")
28-
2924
try:
30-
ids = list(map(int, field_in))
31-
except ValueError:
32-
ids = list(map(lambda a: field_names.index(a), field_in))
25+
tab = table(gtab+"::FIELD")
26+
field_names = tab.getcol("NAME")
27+
tab.close()
28+
except RuntimeError:
29+
# possible new table format
30+
# sadly Field name and Source name columns are empty
31+
# will need to figure this out, but ignoring the tests for now
32+
tab = table(gtab)
33+
field_names = numpy.unique(tab.getcol("FIELD_NAME"))
34+
tab.close()
35+
pass
36+
37+
if field_names:
38+
try:
39+
ids = list(map(int, field_in))
40+
except ValueError:
41+
ids = list(map(lambda a: field_names.index(a), field_in))
42+
if not set(ids).issubset(field_ids):
43+
raise RuntimeError(f"Some field(s) do not have solutions after the calibration. Please refer to CASA {config.binary} logfile for further details")
3344

34-
if not set(ids).issubset(field_ids):
35-
raise RuntimeError(f"Some field(s) do not have solutions after the calibration. Please refer to CASA {config.binary} logfile for further details")

stimela/cargo/cab/cubical/parameters.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"task": "cubical",
33
"base": "stimela/cubical",
4-
"tag": ["1.5.8", "1.7.1", "1.7.2"],
4+
"tag": ["1.5.8", "1.7.1", "1.7.2", "1.7.8-dev"],
55
"description": "CubiCal is a suite of fast radio interferometric calibration routines exploiting complex optimisation.",
66
"prefix": "--",
7-
"version":["1.5.8", "1.5.11", "1.6.1"],
7+
"version":["1.5.8", "1.5.11", "1.6.1", "1.6.3"],
88
"binary": "gocubical",
99
"junk":["cubical.last", "montblanc.log"],
1010
"msdir": true,
@@ -514,11 +514,18 @@
514514
"info": "Generate summary plots.",
515515
"dtype": "bool",
516516
"name": "out-plots"
517-
}, {
517+
},
518+
{
518519
"info": " If direction-dependent gains are in use and correction is being done, selects direction to correct in. If -1, corrects only for the last direction-independent term. Set to 0 to avoid. ",
519520
"dtype": "int",
520521
"name": "out-correct-dir"
521-
},
522+
},
523+
{
524+
"info": "Explicitly enables or disables derotation of output visibilities. Default (None) is to use the –model-pa-rotate and –model-feed-rotate settings",
525+
"dtype": "bool",
526+
"name": "out-derotate",
527+
"default": null
528+
},
522529
{
523530
"info": "Number of processes",
524531
"dtype": "int",

stimela/cargo/cab/cubical/src/DefaultParset.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ beam-pattern = None # Apply beams if specified eg. 'beam_$(corr)_$(reim).fi
4646
'beam_$(CORR)_$(REIM).fits'
4747
beam-l-axis = None
4848
beam-m-axis = None
49+
pa-rotate = None # Apply parallactic angle rotation to model visibilities.
50+
feed-rotate = None # Apply a feed angle rotation to the model visibilities
51+
null-v = 0 # Rotate model Stokes V to zero. Special mode for some types of polcal. #options:None|0|1|-1
52+
Use 1 if the PZD is expected to be from -90 to 90deg, or -1 if >90deg or <-90deg
4953

5054
[montblanc]
5155
_Help = Montblanc simulation options
@@ -231,6 +235,7 @@ subtract-dirs = : # Which model directions to subtract, if gen
231235
plots = 1 # Generate summary plots. Use 'show' to show summary plots interactively.
232236
casa-gaintables = 1 # Export gaintables to CASA caltable format. Tables are exported to same
233237
directory as set for cubical databases. #type:bool
238+
derotate = None # Explicitly enables or disables derotation of output visibilities
234239
235240
[log]
236241
_Help = Options related to logging

stimela/singularity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def run(self, *args, output_wrangler=None):
120120
self.status = "running"
121121
self._print("Starting container [{0:s}]. Timeout set to {1:d}. The container ID is printed below.".format(
122122
self.name, self.time_out))
123-
utils.xrun(f"cd {self.execdir} && singularity run --workdir {self.execdir} --containall",
123+
utils.xrun(f"cd {self.execdir} && singularity run --userns --workdir {self.execdir} --containall",
124124
list(args) + [volumes, self.image, self.RUNSCRIPT],
125125
log=self.logger, timeout=self.time_out, output_wrangler=output_wrangler,
126126
env=self._env, logfile=self.logfile)

0 commit comments

Comments
 (0)