diff --git a/stimela/cargo/base/spimple/Dockerfile b/stimela/cargo/base/spimple/Dockerfile new file mode 100644 index 00000000..6c02f7c4 --- /dev/null +++ b/stimela/cargo/base/spimple/Dockerfile @@ -0,0 +1,6 @@ +FROM quay.io/stimela/base:1.7.1 +RUN pip3 install -U pip setuptools +RUN pip install scabha spimple +RUN spimple-spifit -h +RUN spimple-binterp -h +RUN spimple-imconv -h \ No newline at end of file diff --git a/stimela/cargo/cab/spimple_binterp/parameters.json b/stimela/cargo/cab/spimple_binterp/parameters.json new file mode 100644 index 00000000..d89712f2 --- /dev/null +++ b/stimela/cargo/cab/spimple_binterp/parameters.json @@ -0,0 +1,76 @@ +{ + "task": "spimple binterp", + "base": "stimela/spimple", + "tag": "1.7.2b", + "description": "Beam intrepolation tool.", + "prefix": "--", + "binary": "spimple-binterp", + "junk":[], + "msdir": true, + "parameters": [ + { + "info": "Input image name", + "dtype": "str", + "required": true, + "name": "image", + "io": "input", + "deprecated": false + }, + { + "info": "Path to output directory", + "dtype": "str", + "required": true, + "name": "output-filename", + "io": "output", + "deprecated": false + }, + { + "info": "Number of threads to use", + "dtype": "int", + "required": false, + "name": "nthreads", + "default": null, + "deprecated": false + }, + { + "info": "Fits beam model to use. Only real and imageinary beam models currently supported", + "dtype": "str", + "required": false, + "name": "beam-model", + "default": null, + "deprecated": false + }, + { + "info": "Add in the convolved residuals before fitting components", + "dtype": "bool", + "required": false, + "name": "add-convolved-residuals", + "default": null, + "deprecated": false + }, + { + "info": "Field Id", + "dtype": "int", + "required": false, + "name": "field", + "default": null, + "deprecated": false + }, + { + "info": "Used to select a subset of time. Default is 10", + "dtype": "int", + "required": false, + "name": "sparsify-time", + "default": null, + "deprecated": false + }, + { + "info": "Correlation typ i.e. linear or circular.", + "dtype": "str", + "required": false, + "name": "corr-type", + "default": null, + "deprecated": false + } + ] +} diff --git a/stimela/cargo/cab/spimple_binterp/src/run.py b/stimela/cargo/cab/spimple_binterp/src/run.py new file mode 100644 index 00000000..8cb4e1fd --- /dev/null +++ b/stimela/cargo/cab/spimple_binterp/src/run.py @@ -0,0 +1,11 @@ +# -*- coding: future_fstrings -*- +import sys + +from scabha import config, parse_parameters, prun + +args = [config.binary] + parse_parameters(repeat=" ") + +# run the command +if prun(args) != 0: + sys.exit(1) + diff --git a/stimela/cargo/cab/spimple_imconv/parameters.json b/stimela/cargo/cab/spimple_imconv/parameters.json new file mode 100644 index 00000000..784b74e1 --- /dev/null +++ b/stimela/cargo/cab/spimple_imconv/parameters.json @@ -0,0 +1,92 @@ +{ + "task": "spimple imconv", + "base": "stimela/spimple", + "tag": "1.7.2b", + "description": "Convolve images to a common resolution", + "prefix": "--", + "binary": "spimple-imconv", + "junk":["image_convolver.log"], + "msdir": true, + "parameters": [ + { + "info": "Input image name", + "dtype": "str", + "required": true, + "name": "image", + "io": "input", + "deprecated": false + }, + { + "info": "Path to output directory", + "dtype": "str", + "required": true, + "name": "output-filename", + "io": "output", + "deprecated": false + }, + { + "info": "Beam parameters matching FWHM of restoring beam specified as emaj emin pa.", + "dtype": "list:float", + "required": false, + "name": "psf-pars", + "default": null, + "deprecated": false + }, + { + "info": "Number of threads to use", + "dtype": "int", + "required": false, + "name": "nthreads", + "default": null, + "deprecated": false + }, + { + "info": "Convolve with a circularised beam, not an elliptical one", + "dtype": "bool", + "required": false, + "name": "circ-psf", + "default": null, + "deprecated": false + }, + { + "info": "Fits beam model to use", + "dtype": "str", + "required": false, + "name": "beam-model", + "default": null, + "deprecated": false + }, + { + "info": "Band to use with JimBeam. L or UHF. Default is 'l'", + "dtype": "str", + "required": false, + "name": "band", + "default": null, + "deprecated": false + }, + { + "info": "Set image to zero where pb falls below this value. Default is 0.05", + "dtype": "float", + "required": false, + "name": "pb-min", + "default": null, + "deprecated": false + }, + { + "info": "Padding fraction for FFTs (half on either side). Default is 0.5", + "dtype": "float", + "required": false, + "name": "padding-frac", + "default": null, + "deprecated": false + }, + { + "info": "Data type of output. Default is single precision", + "dtype": "str", + "required": false, + "name": "out-dtype", + "default": null, + "deprecated": false + } + ] +} diff --git a/stimela/cargo/cab/spimple_imconv/src/run.py b/stimela/cargo/cab/spimple_imconv/src/run.py new file mode 100644 index 00000000..5e8b8d03 --- /dev/null +++ b/stimela/cargo/cab/spimple_imconv/src/run.py @@ -0,0 +1,15 @@ +# -*- coding: future_fstrings -*- +import sys + +from scabha import config, parse_parameters, prun + +pars = parse_parameters(repeat=" ") +if "--psf-pars" in pars: + pars = " ".join(pars).split() + +args = [config.binary] + pars + +# run the command +if prun(args) != 0: + sys.exit(1) + diff --git a/stimela/cargo/cab/spimple_spifit/parameters.json b/stimela/cargo/cab/spimple_spifit/parameters.json new file mode 100644 index 00000000..2c026259 --- /dev/null +++ b/stimela/cargo/cab/spimple_spifit/parameters.json @@ -0,0 +1,188 @@ +{ + "task": "spimple SPI fitter", + "base": "stimela/spimple", + "tag": "1.7.2b", + "description": "Simple spectral index fitting tool.", + "prefix": "--", + "binary": "spimple-spifit", + "junk":["spifit.log"], + "msdir": true, + "parameters": [ + { + "info": "Input model name", + "dtype": "str", + "required": false, + "name": "model", + "io": "input", + "deprecated": false + }, + { + "info": "Path to output directory", + "dtype": "str", + "required": true, + "name": "output-filename", + "io": "output", + "deprecated": false + }, + { + "info": "Beam parameters matching FWHM of restoring beam specified as emaj emin pa.", + "dtype": "list:float", + "required": false, + "name": "psf-pars", + "default": null, + "deprecated": false + }, + { + "info": "Number of threads to use", + "dtype": "int", + "required": false, + "name": "nthreads", + "default": null, + "deprecated": false + }, + { + "info": "Convolve with a circularised beam, not an elliptical one", + "dtype": "bool", + "required": false, + "name": "circ-psf", + "default": null, + "deprecated": false + }, + { + "info": "Fits beam model to use. Only real and imageinary beam models currently supported", + "dtype": "str", + "required": false, + "name": "beam-model", + "default": null, + "deprecated": false + }, + { + "info": "Band to use with JimBeam. L or UHF. Default is 'l'", + "dtype": "str", + "required": false, + "name": "band", + "default": null, + "deprecated": false + }, + { + "info": "Set image to zero where pb falls below this value. Default is 0.05", + "dtype": "float", + "required": false, + "name": "pb-min", + "default": null, + "deprecated": false + }, + { + "info": "Padding fraction for FFTs (half on either side). Default is 0.5", + "dtype": "float", + "required": false, + "name": "padding-frac", + "default": null, + "deprecated": false + }, + { + "info": "Data type of output. Default is single precision", + "dtype": "str", + "required": false, + "name": "out_dtype", + "default": null, + "deprecated": false + }, + { + "info": "Multiple of the rms in the residual to threshold", + "dtype": "float", + "required": false, + "name": "threshold", + "default": null, + "deprecated": false + }, + { + "info": "Input residual", + "dtype": "str", + "required": false, + "name": "residual", + "default": null, + "deprecated": false + }, + { + "info": "Maximum dynamic range used to determine the threshold above which components need to be fit", + "dtype": "float", + "required": false, + "name": "maxDR", + "default": null, + "deprecated": false + }, + { + "info": "Outputs to write. a - alpha map, e - alpha error map, i - I0 map, k - I0 error map, I - reconstructed cube form alpha and I0, c - restoring beam used for convolution, m - convolved model, r - convolved residual, b - average power beam. Default is 'aeikIcmrb'", + "dtype": "str", + "required": false, + "name": "products", + "default": null, + "deprecated": false + }, + { + "info": "Passing this flag bypasses the convolution", + "dtype": "bool", + "required": false, + "name": "dont-convolve", + "default": null, + "deprecated": false + }, + { + "info": "Per-channel weights to use during fit to frequency axis", + "dtype": "list:float", + "required": false, + "name": "channel_weights", + "default": null, + "deprecated": false + }, + { + "info": "Reference frequency where the I0 map is sought", + "dtype": "float", + "required": false, + "name": "ref-freq", + "default": null, + "deprecated": false + }, + { + "info": "Add in the convolved residuals before fitting components", + "dtype": "bool", + "required": false, + "name": "add-convolved-residuals", + "default": null, + "deprecated": false + }, + { + "info": "Mesurement sets used to make the image. Used for parallactic angles in case of primary beam correction", + "dtype": "list:str", + "required": false, + "name": "ms", + "default": null, + "deprecated": false + }, + { + "info": "Field Id", + "dtype": "int", + "required": false, + "name": "field", + "default": null, + "deprecated": false + }, + { + "info": "Used to select a subset of time. Default is 10", + "dtype": "int", + "required": false, + "name": "sparsify-time", + "default": null, + "deprecated": false + }, + { + "info": "Correlation typ i.e. linear or circular.", + "dtype": "str", + "required": false, + "name": "corr-type", + "default": null, + "deprecated": false + } + ] +} diff --git a/stimela/cargo/cab/spimple_spifit/src/run.py b/stimela/cargo/cab/spimple_spifit/src/run.py new file mode 100644 index 00000000..5e8b8d03 --- /dev/null +++ b/stimela/cargo/cab/spimple_spifit/src/run.py @@ -0,0 +1,15 @@ +# -*- coding: future_fstrings -*- +import sys + +from scabha import config, parse_parameters, prun + +pars = parse_parameters(repeat=" ") +if "--psf-pars" in pars: + pars = " ".join(pars).split() + +args = [config.binary] + pars + +# run the command +if prun(args) != 0: + sys.exit(1) + diff --git a/stimela/cargo/cab/wsclean/parameters.json b/stimela/cargo/cab/wsclean/parameters.json index 19e581ef..d3553808 100644 --- a/stimela/cargo/cab/wsclean/parameters.json +++ b/stimela/cargo/cab/wsclean/parameters.json @@ -646,6 +646,12 @@ "default": null, "name": "pb-grid-size" }, + { + "info": "In case of irregular frequency spacing, this option can be used to not try and split channels to make the output channel bandwidth similar, but instead to split largest gaps first.", + "dtype": "bool", + "default": null, + "name": "gap-channel-division" + }, { "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",