From 554343598c0b2ea1b43501c2f16f70787e2875cd Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Mon, 3 Apr 2023 17:18:45 +0200 Subject: [PATCH 1/3] New wsclean upstream release and additional params --- stimela/cargo/base/wsclean/Dockerfile | 2 +- stimela/cargo/cab/wsclean/parameters.json | 18 ++++++++++++++++-- stimela/cargo/cab/wsclean/src/run.py | 4 ++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/stimela/cargo/base/wsclean/Dockerfile b/stimela/cargo/base/wsclean/Dockerfile index 30e7b25c..65ef3526 100644 --- a/stimela/cargo/base/wsclean/Dockerfile +++ b/stimela/cargo/base/wsclean/Dockerfile @@ -25,7 +25,7 @@ RUN docker-apt-install cmake \ liblog4cplus-dev \ libhdf5-dev \ casacore-dev -RUN git clone --depth 1 -b v3.1 https://gitlab.com/aroffringa/wsclean.git wscleandir +RUN git clone --depth 1 -b v3.3 https://gitlab.com/aroffringa/wsclean.git wscleandir RUN mkdir wscleandir/build RUN cd wscleandir/build && \ cmake .. -DPORTABLE=Yes -DCMAKE_BUILD_TYPE=Release && \ diff --git a/stimela/cargo/cab/wsclean/parameters.json b/stimela/cargo/cab/wsclean/parameters.json index 0a72fc75..ffce5002 100644 --- a/stimela/cargo/cab/wsclean/parameters.json +++ b/stimela/cargo/cab/wsclean/parameters.json @@ -1,9 +1,9 @@ { "task": "wsclean", "base": "stimela/wsclean", - "tag": ["1.6.0-1", "1.2.3", "1.6.3", "1.7.3", "1.7.4"], + "tag": ["1.6.0-1", "1.2.3", "1.6.3", "1.7.3", "1.7.4", "1.7.7"], "description": "WSClean imaging software", - "version" : ["2.6", "2.8", "2.9", "3.0.1", "3.1"], + "version" : ["2.6", "2.8", "2.9", "3.0.1", "3.1", "3.3"], "prefix": "-", "binary": "wsclean", "junk" : [], @@ -632,6 +632,20 @@ "dtype": "int", "default": null, "name": "pb-grid-size" + }, + { + "info": "Restore the model image onto the residual image and save it in output image. By default, the beam parameters are read from the residual image. If this parameter is given, wsclean will do the restoring and then exit: no cleaning is performed.", + "dtype": "list:file", + "name": "restore", + "default": null, + "io": "output" + }, + { + "info": "Restore a source list onto the residual image and save it in output image. Except for the model input format, this parameter behaves equal to -restore.", + "dtype": "list:file", + "name": "restore-list", + "default": null, + "io": "output" } ] } diff --git a/stimela/cargo/cab/wsclean/src/run.py b/stimela/cargo/cab/wsclean/src/run.py index fa3ae24f..c5b69e25 100644 --- a/stimela/cargo/cab/wsclean/src/run.py +++ b/stimela/cargo/cab/wsclean/src/run.py @@ -39,14 +39,14 @@ if isinstance(value, (int, float)): value = '{0}asec'.format(value) - elif name in 'size trim nwlayers-for-size beam-shape channel-range interval'.split(): + elif name in 'size trim nwlayers-for-size beam-shape channel-range interval restore restore-list'.split(): if isinstance(value, int): value = '{0} {0}'.format(value) elif hasattr(value, '__iter__'): if len(value) == 1: value.append(value[0]) value = ' '.join(map(str, value)) - + elif name in 'spws multiscale-scales pol'.split(): if hasattr(value, '__iter__'): value = ','.join(map(str, value)) From 852f047dbdaff3eca1403bcca06cfce48ada6747 Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Tue, 4 Apr 2023 12:07:55 +0200 Subject: [PATCH 2/3] Shift the phase centre to the given location. The shift is along --- stimela/cargo/cab/wsclean/parameters.json | 6 ++++++ stimela/cargo/cab/wsclean/src/run.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/stimela/cargo/cab/wsclean/parameters.json b/stimela/cargo/cab/wsclean/parameters.json index ffce5002..47a0925e 100644 --- a/stimela/cargo/cab/wsclean/parameters.json +++ b/stimela/cargo/cab/wsclean/parameters.json @@ -646,6 +646,12 @@ "name": "restore-list", "default": null, "io": "output" + }, + { + "info": "Shift the phase centre to the given location. The shift is along the tangential plane.", + "dtype": "list:str", + "name": "shift", + "default": null } ] } diff --git a/stimela/cargo/cab/wsclean/src/run.py b/stimela/cargo/cab/wsclean/src/run.py index c5b69e25..7fd8ed46 100644 --- a/stimela/cargo/cab/wsclean/src/run.py +++ b/stimela/cargo/cab/wsclean/src/run.py @@ -39,7 +39,7 @@ if isinstance(value, (int, float)): value = '{0}asec'.format(value) - elif name in 'size trim nwlayers-for-size beam-shape channel-range interval restore restore-list'.split(): + elif name in 'size trim nwlayers-for-size beam-shape channel-range interval restore restore-list shift'.split(): if isinstance(value, int): value = '{0} {0}'.format(value) elif hasattr(value, '__iter__'): From 9aece444b2de2eb71c40386e56a420b7c8622a94 Mon Sep 17 00:00:00 2001 From: Athanaseus Javas Ramaila Date: Tue, 18 Apr 2023 17:20:45 +0200 Subject: [PATCH 3/3] deprecated params --- stimela/cargo/cab/wsclean/parameters.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stimela/cargo/cab/wsclean/parameters.json b/stimela/cargo/cab/wsclean/parameters.json index 47a0925e..2a5a43b3 100644 --- a/stimela/cargo/cab/wsclean/parameters.json +++ b/stimela/cargo/cab/wsclean/parameters.json @@ -42,7 +42,8 @@ "info": "Like 'mem', but this specifies a fixed amount of memory in gigabytes.", "dtype": "float", "default": null, - "name": "absmem" + "name": "absmem", + "mapping": "abs-mem" }, { "info": "Increase verbosity of output", @@ -115,7 +116,7 @@ "info": "In spectral mode, calculate the weights as if the image was made using MFS. This makes sure that the sum of channel images equals the MFS weights. Otherwise, the channel image will become a bit more naturally weighted. This is only relevant for weighting modes that require gridding (i.e., Uniform, Briggs').", "dtype": "bool", "name": "nomfsweighting", - "mapping": "no-mfs-weighting" + "mapping": "no-mf-weighting" }, { "info": "Filter the weights and set high weights to the local mean. The level parameter specifies the filter level; any value larger than level*localmean will be set to level*localmean.",