ratt-ru/CubiCal

The Cubical model-list in stimela not reading MODEL_DATA from a measurement set

ianjarog opened this issue · 1 comments

The model-list parameter in Cubical (in Stimela) is not reading the MODEL_DATA from the measurement set.

"model-list": ["MODEL_DATA+-image_DI.DicoModel@ds9_poly_physics.reg:image_DI.DicoModel@ds9_poly_physics.reg:output"]

INFO 18:12:40 - main [0.3 1.8 0.0Gb] Exiting with exception: ValueError(model component /stimela_mount/output/MODEL_DATA is neither a valid LSM nor an MS column)

Traceback (most recent call last):

File "/opt/venv/lib/python3.8/site-packages/cubical/main.py", line 448, in main

ms.init_models(str(GD["model"]["list"]).split(","),

File "/opt/venv/lib/python3.8/site-packages/cubical/data_handler/ms_data_handler.py", line 713, in init_models

raise ValueError("model component {} is neither a valid LSM nor an MS column".format(component))

ValueError: model component /stimela_mount/output/MODEL_DATA is neither a valid LSM nor an MS column

Warning: setupterm: could not find terminfo database

Traceback (most recent call last):

File "/stimela_mount/code/run.py", line 57, in

subprocess.check_call(shlex.split(_runc))

File "/usr/lib/python3.8/subprocess.py", line 364, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['gocubical', '--sol-jones', 'G,dE', '--data-ms', '/stimela_mount/msdir/hcg30-HCG30-corrfreqavg.ms', '--data-column', 'CORRECTED_DATA', '--data-t

ime-chunk', '50', '--data-freq-chunk', '50', '--model-list', '/stimela_mount/output/MODEL_DATA+-image_DI.DicoModel@ds9_poly_physics.reg:image_DI.DicoModel@ds9_poly_physics.reg:msdir', '--
model-ddes', 'auto', '--weight-column', 'WEIGHT', '--flags-apply', 'FLAG', '--flags-auto-init', 'legacy', '--flags-reinit-bitflags', '0', '--madmax-enable', '0', '--madmax-estimate', 'cor
r', '--madmax-plot', '0', '--madmax-threshold', '0,10', '--sol-term-iters', '50,90,50,90', '--sol-min-bl', '350', '--bbc-save-to', '{out[name]}-BBC-field_{sel[field]}-ddid_{sel[ddid]}.par
mdb', '--bbc-plot', '0', '--dist-ncpu', '2', '--dist-max-chunks', '4', '--dist-nthread', '15', '--out-name', '/stimela_mount/output/dEcal_0', '--out-overwrite', '1', '--out-mode', 'sr', '
--out-column', 'RESIDUAL_DATA', '--out-subtract-dirs', '1:', '--out-casa-gaintables', '0', '--out-plots', '0', '--dist-nworker', '2', '--log-verbose', 'solver=2', '--g-time-int', '60', '-
-g-freq-int', '100', '--g-clip-low', '0.25', '--g-clip-high', '1.7', '--g-solvable', '1', '--g-type', 'complex-2x2', '--g-save-to', '/stimela_mount/output/ampphase-0.parmdb', '--g-update-type', 'full', '--g-max-prior-error', '0.33', '--g-max-post-error', '0.33', '--degridding-OverS', '11', '--degridding-Support', '7', '--degridding-Nw', '100', '--degridding-wmax', '0', '--degridding-Padding', '1.7', '--degridding-NDegridBand', '16', '--degridding-MaxFacetSize', '0.25', '--degridding-MinNFacetPerAxis', '1', '--degridding-BeamModel', 'FITS', '--degridding-FITSFile', 'meerkat_pb_jones_cube_95channels_$(corr)_$(reim).fits', '--degridding-FITSFeedSwap', '1']' returned non-zero exit status 1.
2023-02-06 19:12:41 STIMELA.gocubical ERROR: docker returns error code 1
2023-02-06 19:12:41 STIMELA.gocubical ERROR: job failed at 2023-02-06 19:12:41.982327 after 0:00:06.438150
2023-02-06 19:12:41 STIMELA.gocubical ERROR: Traceback (most recent call last):
2023-02-06 19:12:41 STIMELA.gocubical ERROR: File "/home/ianja-admin/HCG30_ddcal/caracal-venv/lib/python3.9/site-packages/stimela/recipe.py", line 713, in run
2023-02-06 19:12:41 STIMELA.gocubical ERROR: job.run_job()
2023-02-06 19:12:41 STIMELA.gocubical ERROR: File "/home/ianja-admin/HCG30_ddcal/caracal-venv/lib/python3.9/site-packages/stimela/recipe.py", line 430, in run_job
2023-02-06 19:12:41 STIMELA.gocubical ERROR: self.job.start(output_wrangler=self.apply_output_wranglers)
2023-02-06 19:12:41 STIMELA.gocubical ERROR: File "/home/ianja-admin/HCG30_ddcal/caracal-venv/lib/python3.9/site-packages/stimela/docker.py", line 163, in start
2023-02-06 19:12:41 STIMELA.gocubical ERROR: utils.xrun("docker", ["start", "-a", self.name],
2023-02-06 19:12:41 STIMELA.gocubical ERROR: File "/home/ianja-admin/HCG30_ddcal/caracal-venv/lib/python3.9/site-packages/stimela/utils/xrun_poll.py", line 227, in xrun
2023-02-06 19:12:41 STIMELA.gocubical ERROR: raise StimelaCabRuntimeError("{} returns error code {}".format(command_name, status))
2023-02-06 19:12:41 STIMELA.gocubical ERROR: stimela.utils.StimelaCabRuntimeError: docker returns error code 1
2023-02-06 19:12:41 STIMELA.Test gocubical calibration INFO: Completed jobs : []
2023-02-06 19:12:41 STIMELA.Test gocubical calibration INFO: Remaining jobs : []
2023-02-06 19:12:41 STIMELA.Test gocubical calibration INFO: Saving pipeline information in .last_Test_gocubical_calibration.json
Traceback (most recent call last):
File "/home/ianja-admin/HCG30_ddcal/caracal-venv/bin/stimela", line 11, in
main.main([a for a in sys.argv[1:]])
File "/home/ianja-admin/HCG30_ddcal/caracal-venv/lib/python3.9/site-packages/stimela/main.py", line 409, in main
_cmd(argv)
File "/home/ianja-admin/HCG30_ddcal/caracal-venv/lib/python3.9/site-packages/stimela/main.py", line 199, in run
exec(stdr.read(), _globals)
File "", line 68, in
File "/home/ianja-admin/HCG30_ddcal/caracal-venv/lib/python3.9/site-packages/stimela/recipe.py", line 764, in run
raise PipelineException(exc, self.completed, job, self.remaining) from None
stimela.exceptions.PipelineException: Job 'test_image:: Make a test image using gocubical' failed: docker returns error code

So this was due to my inexperience. Solution was here
'model-list': spf("MODEL_DATA+-{{}}{}@{{}}{}:{{}}{}@{{}}{}".format(diconame, tagregs, diconame, tagregs),
"output", "output", "output", "output"),