diff --git a/stimela/cargo/base/base/Dockerfile b/stimela/cargo/base/base/Dockerfile index 4dd73bc15..5ec1b02a6 100644 --- a/stimela/cargo/base/base/Dockerfile +++ b/stimela/cargo/base/base/Dockerfile @@ -1,4 +1,4 @@ -FROM kernsuite/base:5 +FROM kernsuite/base:6 RUN docker-apt-install \ python3-setuptools \ libboost-python-dev \ diff --git a/stimela/cargo/base/pybdsf/Dockerfile b/stimela/cargo/base/pybdsf/Dockerfile index bed9b1c17..bd27f0905 100644 --- a/stimela/cargo/base/pybdsf/Dockerfile +++ b/stimela/cargo/base/pybdsf/Dockerfile @@ -1,3 +1,5 @@ -FROM stimela/base:1.2.0 -RUN docker-apt-install python-astro-tigger-lsm pybdsf -RUN pip install astropy +FROM stimela/base:1.6.6 +RUN docker-apt-upgrade +RUN docker-apt-install python-pip python-astro-tigger-lsm pybdsf +RUN rm -f /usr/bin/python && ln -s /usr/bin/python2 /usr/bin/python +RUN pip2 install astropy pyyaml diff --git a/stimela/cargo/cab/pybdsm/parameters.json b/stimela/cargo/cab/pybdsm/parameters.json index 97a6956f7..1babc33e8 100644 --- a/stimela/cargo/cab/pybdsm/parameters.json +++ b/stimela/cargo/cab/pybdsm/parameters.json @@ -1,778 +1,778 @@ { - "task": "pybdsm", - "base": "stimela/pybdsf", - "tag": "1.2.0", - "description": "Source finding in radio images", - "prefix": " ", - "binary": "python", + "task": "pybdsm", + "base": "stimela/pybdsf", + "tag": "1.6.6", + "description": "Source finding in radio images", + "prefix": " ", + "binary": "python", "junk":[], - "msdir": false, + "msdir": false, "parameters": [ { - "info": "Input image file name", - "name": "image", - "io": "input", - "default": null, - "dtype": "file", + "info": "Input image file name", + "name": "image", + "io": "input", + "default": null, + "dtype": "file", "mapping": "filename" - }, + }, { - "info": "Use adaptive rms_box when determining rms and mean maps", - "dtype": "bool", - "default": false, + "info": "Use adaptive rms_box when determining rms and mean maps", + "dtype": "bool", + "default": false, "name": "adaptive_rms_box" - }, + }, { - "info": "Sources with pixels above adaptive_thresh*clipped_rms will be considered as bright sources. Minimum is 10.0.", - "dtype": "float", - "default": null, + "info": "Sources with pixels above adaptive_thresh*clipped_rms will be considered as bright sources. Minimum is 10.0.", + "dtype": "float", + "default": null, "name": "adaptive_thresh" - }, + }, { - "info": "Box size, step size for rms/mean map calculation near bright sources. Specify as (box, step) in pixels.", - "dtype": "list:int", - "default": null, + "info": "Box size, step size for rms/mean map calculation near bright sources. Specify as (box, step) in pixels.", + "dtype": "list:int", + "default": null, "name": "rms_box_bright" - }, + }, { - "info": "Decompose Gaussian residual image into multiple scales", - "dtype": "bool", - "default": false, + "info": "Decompose Gaussian residual image into multiple scales", + "dtype": "bool", + "default": false, "name": "atrous_do" - }, + }, { - "info": "Perform source extraction on each wavelet scale", - "dtype": "bool", - "default": false, + "info": "Perform source extraction on each wavelet scale", + "dtype": "bool", + "default": false, "name": "atrous_bdsm_do" - }, + }, { - "info": "Max allowed wavelength order, 0 => calculate inside program", - "dtype": "int", - "default": 0, + "info": "Max allowed wavelength order, 0 => calculate inside program", + "dtype": "int", + "default": 0, "name": "atrous_jmax" - }, + }, { - "info": "Low pass filter, either 'b3' or 'tr', for B3 spline or Triangle", - "dtype": "str", - "default": "b3", - "name": "atrous_lpf", + "info": "Low pass filter, either 'b3' or 'tr', for B3 spline or Triangle", + "dtype": "str", + "default": "b3", + "name": "atrous_lpf", "choices": [ - "b3", + "b3", "tr" ] - }, + }, { - "info": "Restrict wavelet Gaussians to islands found in original image", - "dtype": "bool", - "default": false, + "info": "Restrict wavelet Gaussians to islands found in original image", + "dtype": "bool", + "default": false, "name": "atrous_orig_isl" - }, + }, { - "info": "Fit to the sum of remaining wavelet scales", - "dtype": "bool", - "default": true, + "info": "Fit to the sum of remaining wavelet scales", + "dtype": "bool", + "default": true, "name": "atrous_sum" - }, + }, { - "info": "Use fast SciPy FFT for convolution", - "dtype": "bool", - "default": true, + "info": "Use fast SciPy FFT for convolution", + "dtype": "bool", + "default": true, "name": "use_scipy_fft" - }, + }, { - "info": "FWHM of restoring beam. Specify as (maj, min, pos ang E of N) in degrees. E.g., beam = (0.06, 0.02, 13.3). None => get from header", - "dtype": "list:float", - "default": null, + "info": "FWHM of restoring beam. Specify as (maj, min, pos ang E of N) in degrees. E.g., beam = (0.06, 0.02, 13.3). None => get from header", + "dtype": "list:float", + "default": null, "name": "beam" - }, + }, { - "info": "Show options for Gaussian flagging", - "dtype": "bool", - "default": false, + "info": "Show options for Gaussian flagging", + "dtype": "bool", + "default": false, "name": "flagging_opts" - }, + }, { - "info": "Flag Gaussian if centre is outside border - flag_bordersize pixels", - "dtype": "int", - "default": null, + "info": "Flag Gaussian if centre is outside border - flag_bordersize pixels", + "dtype": "int", + "default": null, "name": "flag_bordersize" - }, + }, { - "info": "Flag Gaussian if area greater than flag_maxsize_bm times beam area", - "dtype": "float", - "default": 25, + "info": "Flag Gaussian if area greater than flag_maxsize_bm times beam area", + "dtype": "float", + "default": 25, "name": "flag_maxsize_bm" - }, + }, { - "info": "Flag Gaussian if fwhm-contour times factor extends beyond island", - "dtype": "float", - "default": 0.5, + "info": "Flag Gaussian if fwhm-contour times factor extends beyond island", + "dtype": "float", + "default": 0.5, "name": "flag_maxsize_fwhm" - }, + }, { - "info": "Flag Gaussian if x, y bounding box around sigma-contour is factor times island bbox", - "dtype": "float", - "default": 2.0, + "info": "Flag Gaussian if x, y bounding box around sigma-contour is factor times island bbox", + "dtype": "float", + "default": 2.0, "name": "flag_maxsize_isl" - }, + }, { - "info": "Flag Gaussian if peak is greater than flag_maxsnr times image value at the peak", - "dtype": "float", - "default": 1.5, + "info": "Flag Gaussian if peak is greater than flag_maxsnr times image value at the peak", + "dtype": "float", + "default": 1.5, "name": "flag_maxsnr" - }, + }, { - "info": "Flag Gaussian if peak is greater than flag_maxsnr times image value at the peak", - "dtype": "float", - "default": 0.7, + "info": "Flag Gaussian if peak is greater than flag_maxsnr times image value at the peak", + "dtype": "float", + "default": 0.7, "name": "flag_minsize_bm" - }, + }, { - "info": "Flag Gaussian if peak is less than flag_minsnr times thresh_pix times local rms", - "dtype": "float", - "default": 0.6, + "info": "Flag Gaussian if peak is less than flag_minsnr times thresh_pix times local rms", + "dtype": "float", + "default": 0.6, "name": "flag_minsnr" - }, + }, { - "info": "Flag sources smaller than flag_minsize_bm times beam area", - "dtype": "bool", - "default": false, + "info": "Flag sources smaller than flag_minsize_bm times beam area", + "dtype": "bool", + "default": false, "name": "flag_smallsrc" - }, + }, { - "info": "Frequency in Hz of input image. E.g., frequency = 74e6. None => get from header.", - "dtype": "float", - "default": null, + "info": "Frequency in Hz of input image. E.g., frequency = 74e6. None => get from header.", + "dtype": "float", + "default": null, "name": "frequency" - }, + }, { - "info": "Background mean map: 'default' => calc whether to use or not, 'zero' => 0, 'const' => clipped mean, 'map' => use 2-D map", - "dtype": "str", - "default": "default", - "name": "mean_map", + "info": "Background mean map: 'default' => calc whether to use or not, 'zero' => 0, 'const' => clipped mean, 'map' => use 2-D map", + "dtype": "str", + "default": "default", + "name": "mean_map", "choices": [ - "default", - "zero", - "const", + "default", + "zero", + "const", "map" ] - }, + }, { - "info": "If True and beam_spectrum is None, then assume header beam is for median frequency and scales with frequency for channels", - "dtype": "bool", - "default": false, + "info": "If True and beam_spectrum is None, then assume header beam is for median frequency and scales with frequency for channels", + "dtype": "bool", + "default": false, "name": "beam_sp_derive" - }, + }, { - "info": "Get beams for each channel in FITS header. Eg. BMAJ1, BMAJ1, BPA1; BMAJ2, BMIN2, BPA2", - "dtype": "bool", - "default": false, + "info": "Get beams for each channel in FITS header. Eg. BMAJ1, BMAJ1, BPA1; BMAJ2, BMIN2, BPA2", + "dtype": "bool", + "default": false, "name": "multi_chan_beam" - }, + }, { - "info": "FWHM of synthesized beam per channel. Specify as [(bmaj_ch1, bmin_ch1, bpa_ch1), (bmaj_ch2, bmin_ch2, bpa_ch2), etc.] in degrees. E.g., beam_spectrum = [(0.01, 0.01, 45.0), (0.02,0.01, 34.0)] for two channels. None => all equal to beam", - "dtype": "list:list", - "default": null, + "info": "FWHM of synthesized beam per channel. Specify as [(bmaj_ch1, bmin_ch1, bpa_ch1), (bmaj_ch2, bmin_ch2, bpa_ch2), etc.] in degrees. E.g., beam_spectrum = [(0.01, 0.01, 45.0), (0.02,0.01, 34.0)] for two channels. None => all equal to beam", + "dtype": "list:list", + "default": null, "name": "beam_spectrum" - }, + }, { - "info": "List of channels to average if collapse_mode = 'average', starting from 0. E.g., collapse_av = [0, 1, 5]. [] => all", - "dtype": "list:int", - "default": null, + "info": "List of channels to average if collapse_mode = 'average', starting from 0. E.g., collapse_av = [0, 1, 5]. [] => all", + "dtype": "list:int", + "default": null, "name": "collapse_av" - }, + }, { - "info": "Number of the channel for source extraction, if collapse_mode = 'single', starting from 0", - "dtype": "int", - "default": 0, + "info": "Number of the channel for source extraction, if collapse_mode = 'single', starting from 0", + "dtype": "int", + "default": 0, "name": "collapse_ch0" - }, + }, { - "info": "Collapse method: 'average' or 'single'. Average channels or take single channel to perform source detection on", - "dtype": "str", - "default": "average", - "name": "collapse_mode", + "info": "Collapse method: 'average' or 'single'. Average channels or take single channel to perform source detection on", + "dtype": "str", + "default": "average", + "name": "collapse_mode", "choices": [ - "average", + "average", "single" ] - }, + }, { - "info": "Weighting: 'unity' or 'rms'. Average channels with weights = 1 or 1/rms_clip^2 if collapse_mode = 'average'", - "dtype": "str", - "default": "unity", + "info": "Weighting: 'unity' or 'rms'. Average channels with weights = 1 or 1/rms_clip^2 if collapse_mode = 'average'", + "dtype": "str", + "default": "unity", "name": "collapse_wt" - }, + }, { - "info": "Frequency in Hz of channels in input image when more than one channel is present. E.g., frequency_sp = [74e6, 153e6]. None => get from header", - "dtype": "list:float", - "default": null, + "info": "Frequency in Hz of channels in input image when more than one channel is present. E.g., frequency_sp = [74e6, 153e6]. None => get from header", + "dtype": "list:float", + "default": null, "name": "frequency_sp" - }, + }, { - "info": "Box size, step size for rms/mean map calculation. Specify as (box, step) in pixels. E.g., rms_box = (40, 10) => box of 40x40 pixels, step of 10 pixels. None => calculate inside program", - "dtype": "list:int", - "default": null, + "info": "Box size, step size for rms/mean map calculation. Specify as (box, step) in pixels. E.g., rms_box = (40, 10) => box of 40x40 pixels, step of 10 pixels. None => calculate inside program", + "dtype": "list:int", + "default": null, "name": "rms_box" - }, + }, { - "info": "Show output options", - "dtype": "bool", - "default": false, + "info": "Show output options", + "dtype": "bool", + "default": false, "name": "output_opts" - }, + }, { - "info": "Directory of input FITS files. If not set, get from filename", - "dtype": "file", - "default": null, - "name": "indir", + "info": "Directory of input FITS files. If not set, get from filename", + "dtype": "file", + "default": null, + "name": "indir", "io": "input" - }, + }, { - "info": "'overwrite'/'append': If output_all=True, delete existing files or append a new directory", - "dtype": "str", - "default": "overwrite", + "info": "'overwrite'/'append': If output_all=True, delete existing files or append a new directory", + "dtype": "str", + "default": "overwrite", "name": "opdir_overwrite" - }, + }, { - "info": "Write out all files automatically to directory 'filename_pybdsm'", - "dtype": "bool", - "default": false, + "info": "Write out all files automatically to directory 'filename_pybdsm'", + "dtype": "bool", + "default": false, "name": "output_all" - }, + }, { - "info": "Print basic timing information", - "dtype": "bool", - "default": false, + "info": "Print basic timing information", + "dtype": "bool", + "default": false, "name": "print_timing" - }, + }, { - "info": "Suppress text output to screen. Output is still sent to the log file as usual", - "dtype": "bool", - "default": false, + "info": "Suppress text output to screen. Output is still sent to the log file as usual", + "dtype": "bool", + "default": false, "name": "quiet" - }, + }, { - "info": "Save background mean image as fits file", - "dtype": "bool", - "default": false, + "info": "Save background mean image as fits file", + "dtype": "bool", + "default": false, "name": "savefits_meanim" - }, + }, { - "info": "Save norm image as fits file", - "dtype": "bool", - "default": false, + "info": "Save norm image as fits file", + "dtype": "bool", + "default": false, "name": "savefits_normim" - }, + }, { - "info": "Save island rank image as fits file", - "dtype": "bool", - "default": false, + "info": "Save island rank image as fits file", + "dtype": "bool", + "default": false, "name": "savefits_rankim" - }, + }, { - "info": "Save residual image as fits file", - "dtype": "bool", - "default": false, + "info": "Save residual image as fits file", + "dtype": "bool", + "default": false, "name": "savefits_residim" - }, + }, { - "info": "Save background rms image as fits file", - "dtype": "bool", - "default": false, + "info": "Save background rms image as fits file", + "dtype": "bool", + "default": false, "name": "savefits_rmsim" - }, + }, { - "info": "Name of the run, to be prepended to the name of the output directory. E.g., solname='Run_1'", - "dtype": "str", - "default": null, + "info": "Name of the run, to be prepended to the name of the output directory. E.g., solname='Run_1'", + "dtype": "str", + "default": null, "name": "solnname" - }, + }, { - "info": "Print out extra information during fitting", - "dtype": "bool", - "default": false, + "info": "Print out extra information during fitting", + "dtype": "bool", + "default": false, "name": "verbose_fitting" - }, + }, { - "info": "Find polarisation properties", - "dtype": "bool", - "default": false, + "info": "Find polarisation properties", + "dtype": "bool", + "default": false, "name": "polarisation_do" - }, + }, { - "info": "Check the polarized intesity (PI) image for sources not found in Stokes I", - "dtype": "bool", - "default": false, + "info": "Check the polarized intesity (PI) image for sources not found in Stokes I", + "dtype": "bool", + "default": false, "name": "pi_fit" - }, + }, { - "info": "Threshold for PI island boundary in number of sigma above the mean. Uses thresh_isl if not set.", - "dtype": "float", - "default": null, + "info": "Threshold for PI island boundary in number of sigma above the mean. Uses thresh_isl if not set.", + "dtype": "float", + "default": null, "name": "pi_thresh_isl" - }, + }, { - "info": "Source detection threshold for PI image: threshold for the island peak in number of sigma above the mean. Uses thresh_pix if not set.", - "dtype": "float", - "default": null, + "info": "Source detection threshold for PI image: threshold for the island peak in number of sigma above the mean. Uses thresh_pix if not set.", + "dtype": "float", + "default": null, "name": "pi_thresh_pix" - }, + }, { - "info": "Calculate PSF variation across image", - "dtype": "bool", - "default": false, + "info": "Calculate PSF variation across image", + "dtype": "bool", + "default": false, "name": "psf_vary_do" - }, + }, { - "info": "FWHM of the PSF. Specify as (maj, min, pos ang E of N) in degrees. E.g., psf_fwhm = (0.06, 0.02, 13.3). Estimates from the image if not set", - "dtype": "list:float", - "default": null, + "info": "FWHM of the PSF. Specify as (maj, min, pos ang E of N) in degrees. E.g., psf_fwhm = (0.06, 0.02, 13.3). Estimates from the image if not set", + "dtype": "list:float", + "default": null, "name": "psf_fwhm" - }, + }, { - "info": "SNR above which all sources are taken to be unresolved. E.g., psf_high_snr = 20.0. If unset, no such selection is made", - "dtype": "float", - "default": null, + "info": "SNR above which all sources are taken to be unresolved. E.g., psf_high_snr = 20.0. If unset, no such selection is made", + "dtype": "float", + "default": null, "name": "psf_high_snr" - }, + }, { - "info": "0 = normal, 1 = 0 + round, 2 = LogSNR, 3 =SqrtLogSNR", - "dtype": "int", - "default": 0, + "info": "0 = normal, 1 = 0 + round, 2 = LogSNR, 3 =SqrtLogSNR", + "dtype": "int", + "default": 0, "name": "psf_itess_method" - }, + }, { - "info": "Kappa for clipping for analytic fit", - "dtype": "float", - "default": 2.0, + "info": "Kappa for clipping for analytic fit", + "dtype": "float", + "default": 2.0, "name": "psf_kappa2" - }, + }, { - "info": "Kappa for clipping within each bin", - "dtype": "float", - "default": 3.0, + "info": "Kappa for clipping within each bin", + "dtype": "float", + "default": 3.0, "name": "psf_nsig" - }, + }, { - "info": "Factor of nyquist sample for binning bmaj, etc. vs SNR", - "dtype": "int", - "default": 2, + "info": "Factor of nyquist sample for binning bmaj, etc. vs SNR", + "dtype": "int", + "default": 2, "name": "psf_over" - }, + }, { - "info": "Size of Gaussian to use for smoothing of interpolated images in arcsec. If not set, no smoothing.", - "dtype": "float", - "default": null, + "info": "Size of Gaussian to use for smoothing of interpolated images in arcsec. If not set, no smoothing.", + "dtype": "float", + "default": null, "name": "psf_smooth" - }, + }, { - "info": "Minimum SNR for statistics", - "dtype": "float", - "default": 10.0, + "info": "Minimum SNR for statistics", + "dtype": "float", + "default": 10.0, "name": "psf_snrcut" - }, + }, { - "info": "Unresolved sources with higher SNR taken for stacked psfs", - "dtype": "float", - "default": 15.0, + "info": "Unresolved sources with higher SNR taken for stacked psfs", + "dtype": "float", + "default": 15.0, "name": "psf_snrcutstack" - }, + }, { - "info": "Fraction of SNR > snrcut as primary generators", - "dtype": "float", - "default": 0.15, + "info": "Fraction of SNR > snrcut as primary generators", + "dtype": "float", + "default": 0.15, "name": "psf_snrtop" - }, + }, { - "info": "Restrict sources to be only of type 'S' ", - "dtype": "bool", - "default": true, + "info": "Restrict sources to be only of type 'S' ", + "dtype": "bool", + "default": true, "name": "psf_stype_only" - }, + }, { - "info": "Background rms map: True => use 2-D rms map; False => use constant rms; None => calculate inside program", - "dtype": "bool", - "default": null, + "info": "Background rms map: True => use 2-D rms map; False => use constant rms; None => calculate inside program", + "dtype": "bool", + "default": null, "name": "rms_map" - }, + }, { - "info": "Decompose islands into shapelets", - "dtype": "bool", - "default": false, + "info": "Decompose islands into shapelets", + "dtype": "bool", + "default": false, "name": "shapelet_do" - }, + }, { - "info": "Basis set for shapelet decomposition: 'cartesian' or 'polar'. Fair warning - polar mode was not implemented at the time of writing this info, use at your own risk.", - "dtype": "str", - "default": "cartesian", + "info": "Basis set for shapelet decomposition: 'cartesian' or 'polar'. Fair warning - polar mode was not implemented at the time of writing this info, use at your own risk.", + "dtype": "str", + "default": "cartesian", "name": "shapelet_basis" - }, + }, { - "info": "Calculate shapelet coeff's by fitting ('fit') or integrating (None). WARNING: the default is 'fit', not none, so to run in default mode, explicitely set this to 'fit', else leave as is.", - "dtype": "str", - "default": null, + "info": "Calculate shapelet coeff's by fitting ('fit') or integrating (None). WARNING: the default is 'fit', not none, so to run in default mode, explicitely set this to 'fit', else leave as is.", + "dtype": "str", + "default": null, "name": "shapelet_fitmode" - }, + }, { - "info": "Use Gaussian residual image for shapelet decomposition?", - "dtype": "bool", - "default": "false", + "info": "Use Gaussian residual image for shapelet decomposition?", + "dtype": "bool", + "default": "false", "name": "shapelet_gresid" - }, + }, { - "info": "Type of thresholding: None => calculate inside program, 'fdr' => use false detection rate algorithm, 'hard' => use sigma clipping", - "dtype": "str", - "default": null, - "name": "thresh", + "info": "Type of thresholding: None => calculate inside program, 'fdr' => use false detection rate algorithm, 'hard' => use sigma clipping", + "dtype": "str", + "default": null, + "name": "thresh", "choices": [ - "fdr", - "hard", + "fdr", + "hard", null ] - }, + }, { - "info": "Threshold for the island boundary in number of sigma above the mean. Determines extent of island used for fitting", - "dtype": "float", - "default": 3.0, + "info": "Threshold for the island boundary in number of sigma above the mean. Determines extent of island used for fitting", + "dtype": "float", + "default": 3.0, "name": "thresh_isl" - }, + }, { - "info": "Source detection threshold: threshold for the island peak in number of sigma above the mean. If false detection rate thresholding is used, this value is ignored and thresh_pix is calculated inside the program", - "dtype": "float", - "default": 5.0, + "info": "Source detection threshold: threshold for the island peak in number of sigma above the mean. If false detection rate thresholding is used, this value is ignored and thresh_pix is calculated inside the program", + "dtype": "float", + "default": 5.0, "name": "thresh_pix" - }, + }, { - "info": "Radius of aperture in pixels inside which aperture fluxes are measured for each source. None => no aperture fluxes measured", - "dtype": "bool", - "default": null, + "info": "Radius of aperture in pixels inside which aperture fluxes are measured for each source. None => no aperture fluxes measured", + "dtype": "bool", + "default": null, "name": "aperture" - }, + }, { - "info": "Position the aperture (if aperture is not None) on: 'centroid' or 'peak' of the source.", - "dtype": "str", - "default": "centroid", - "name": "aperture_posn", + "info": "Position the aperture (if aperture is not None) on: 'centroid' or 'peak' of the source.", + "dtype": "str", + "default": "centroid", + "name": "aperture_posn", "choices": [ - "centroid", + "centroid", "peak" ] - }, + }, { - "info": "Limit in Jy/beam below which pixels are blanked. None => no such blanking is done", - "dtype": "float", - "default": null, + "info": "Limit in Jy/beam below which pixels are blanked. None => no such blanking is done", + "dtype": "float", + "default": null, "name": "blank_limit" - }, + }, { - "info": "Theoretical estimate of number of beams per source. None => calculate inside program", - "dtype": "float", - "default": null, + "info": "Theoretical estimate of number of beams per source. None => calculate inside program", + "dtype": "float", + "default": null, "name": "bmpersrc_th" - }, + }, { - "info": "Check for pixels outside the universe", - "dtype": "bool", - "default": false, + "info": "Check for pixels outside the universe", + "dtype": "bool", + "default": false, "name": "check_outsideuniv" - }, + }, { - "info": "Detection image file name used only for detecting islands of emission. Source measurement is still done on the main image", - "dtype": "file", - "default": null, - "name": "detection_image", + "info": "Detection image file name used only for detecting islands of emission. Source measurement is still done on the main image", + "dtype": "file", + "default": null, + "name": "detection_image", "io": "input" - }, + }, { - "info": "Cache internally derived images to disk", - "dtype": "bool", - "default": false, + "info": "Cache internally derived images to disk", + "dtype": "bool", + "default": false, "name": "do_cache" - }, + }, { - "info": "stimate uncertainties for 'M'-type sources using Monte Carlo method", - "dtype": "bool", - "default": false, + "info": "stimate uncertainties for 'M'-type sources using Monte Carlo method", + "dtype": "bool", + "default": false, "name": "do_mc_errors" - }, + }, { - "info": "Alpha for FDR algorithm for thresholds", - "dtype": "float", - "default": 0.05, + "info": "Alpha for FDR algorithm for thresholds", + "dtype": "float", + "default": 0.05, "name": "fdr_alpha" - }, + }, { - "info": "For thresh = None; if #false_pix / #source_pix < fdr_ratio, thresh = 'hard' else thresh = 'fdr'", - "dtype": "float", - "default": 0.1, + "info": "For thresh = None; if #false_pix / #source_pix < fdr_ratio, thresh = 'hard' else thresh = 'fdr'", + "dtype": "float", + "default": 0.1, "name": "fdr_ratio" - }, + }, { - "info": "Sigma for clipping Gaussians while creating fitted image", - "dtype": "float", - "default": 0.1, + "info": "Sigma for clipping Gaussians while creating fitted image", + "dtype": "float", + "default": 0.1, "name": "fittedimage_clip" - }, + }, { - "info": "Fix major and minor axes and PA of Gaussians to beam?", - "dtype": "bool", - "default": true, + "info": "Fix major and minor axes and PA of Gaussians to beam?", + "dtype": "bool", + "default": true, "name": "fix_to_beam" - }, + }, { - "info": "Group all Gaussians in each island into a single source", - "dtype": "bool", - "default": false, + "info": "Group all Gaussians in each island into a single source", + "dtype": "bool", + "default": false, "name": "group_by_isl" - }, + }, { - "info": "Group Gaussians into sources using 'intensity' map or 'curvature' map", - "dtype": "str", - "default": "intensity", - "name": "group_method", + "info": "Group Gaussians into sources using 'intensity' map or 'curvature' map", + "dtype": "str", + "default": "intensity", + "name": "group_method", "choices": [ - "intensity", + "intensity", "curvature" ] - }, + }, { - "info": "Tolerance for grouping of Gaussians into sources: larger values will result in larger sources", - "dtype": "float", - "default": 1.0, + "info": "Tolerance for grouping of Gaussians into sources: larger values will result in larger sources", + "dtype": "float", + "default": 1.0, "name": "group_tol" - }, + }, { - "info": "Initial guess for Gaussian parameters: 'default', 'simple', or 'nobeam'", - "dtype": "str", - "default": "default", - "name": "ini_gausfit", + "info": "Initial guess for Gaussian parameters: 'default', 'simple', or 'nobeam'", + "dtype": "str", + "default": "default", + "name": "ini_gausfit", "choices": [ - "default", - "simple", + "default", + "simple", "nobeam" ] - }, + }, { - "info": "Method by which inital guess for fitting of Gaussians is chosen: 'intensity' or 'curvature'", - "dtype": "str", - "default": "intensity", - "name": "ini_method", + "info": "Method by which inital guess for fitting of Gaussians is chosen: 'intensity' or 'curvature'", + "dtype": "str", + "default": "intensity", + "name": "ini_method", "choices": [ - "intensity", + "intensity", "curvature" ] - }, + }, { - "info": "Kappa for clipped mean and rms. None => calculate inside program", - "dtype": "float", - "default": null, + "info": "Kappa for clipped mean and rms. None => calculate inside program", + "dtype": "float", + "default": null, "name": "kappa_clip" - }, + }, { - "info": "Minimum number of pixels with emission per island (minimum is 6 pixels). None -> calculate inside program", - "dtype": "int", - "default": null, + "info": "Minimum number of pixels with emission per island (minimum is 6 pixels). None -> calculate inside program", + "dtype": "int", + "default": null, "name": "minpix_isl" - }, + }, { - "info": "Number of cores to use during fitting, None => use all", - "dtype": "int", - "default": null, + "info": "Number of cores to use during fitting, None => use all", + "dtype": "int", + "default": null, "name": "ncores" - }, + }, { - "info": "Find and fit peaks of large islands iteratively", - "dtype": "bool", - "default": true, + "info": "Find and fit peaks of large islands iteratively", + "dtype": "bool", + "default": true, "name": "peak_fit" - }, + }, { - "info": "If island size in beam area is more than this, attempt to fit peaks iteratively (if peak_fit = True). Min value is 30", - "dtype": "float", - "default": 30.0, + "info": "If island size in beam area is more than this, attempt to fit peaks iteratively (if peak_fit = True). Min value is 30", + "dtype": "float", + "default": 30.0, "name": "peak_maxsize" - }, + }, { - "info": "Value of constant rms in Jy/beam to use if rms_map = False. None => calculate inside program", - "dtype": "float", - "default": null, + "info": "Value of constant rms in Jy/beam to use if rms_map = False. None => calculate inside program", + "dtype": "float", + "default": null, "name": "rms_value" - }, + }, { - "info": "Rank of the interpolating function for rms/mean map", - "dtype": "int", - "default": 3, + "info": "Rank of the interpolating function for rms/mean map", + "dtype": "int", + "default": 3, "name": "spline_rank" - }, + }, { - "info": "Split island if it is too large, has a large convex deficiency and it opens well.", - "dtype": "bool", - "default": true, + "info": "Split island if it is too large, has a large convex deficiency and it opens well.", + "dtype": "bool", + "default": true, "name": "split_isl" - }, + }, { - "info": "If island size in beam area is more than this, consider splitting island. Min value is 50", - "dtype": "float", - "default": 50.0, + "info": "If island size in beam area is more than this, consider splitting island. Min value is 50", + "dtype": "float", + "default": 50.0, "name": "splitisl_maxsize" - }, + }, { - "info": "List of source positions at which fitting is done. E.g., src_ra_dec = [(197.1932, 47.9188), (196.5573, 42.4852)]", - "dtype": "list:list", - "default": null, + "info": "List of source positions at which fitting is done. E.g., src_ra_dec = [(197.1932, 47.9188), (196.5573, 42.4852)]", + "dtype": "list:list", + "default": null, "name": "src_ra_dec" - }, + }, { - "info": "Radius of the island (if src_ra_dec is not None) in pixels. None => radius is set to the FWHM of the beam major axis.", - "dtype": "int", - "default": null, + "info": "Radius of the island (if src_ra_dec is not None) in pixels. None => radius is set to the FWHM of the beam major axis.", + "dtype": "int", + "default": null, "name": "src_radius_pix" - }, + }, { - "info": "Stops after: 'isl' = island finding step or 'read' = image reading step", - "dtype": "str", - "default": null, - "name": "stop_at", + "info": "Stops after: 'isl' = island finding step or 'read' = image reading step", + "dtype": "str", + "default": null, + "name": "stop_at", "choices": [ - "isl", + "isl", "read" ] - }, + }, { - "info": "Do source detection on only a part of the image. Specify as (xmin, xmax, ymin, ymax) in pixels. E.g., trim_box = (120, 840, 15, 895). None => use entire image", - "dtype": "list:int", - "default": null, + "info": "Do source detection on only a part of the image. Specify as (xmin, xmax, ymin, ymax) in pixels. E.g., trim_box = (120, 840, 15, 895). None => use entire image", + "dtype": "list:int", + "default": null, "name": "trim_box" - }, + }, { - "info": "Output file name. None => file is named automatically; 'SAMP' => send to SAMP hub (e.g., to TOPCAT, ds9, or Aladin)", - "name": "outfile", - "io": "output", - "default": null, - "dtype": "file", + "info": "Output file name. None => file is named automatically; 'SAMP' => send to SAMP hub (e.g., to TOPCAT, ds9, or Aladin)", + "name": "outfile", + "io": "output", + "default": null, + "dtype": "file", "required": true - }, + }, { - "info": "BBS format, type of patch to use: None => no patches. 'single' => all Gaussians in one patch. 'gaussian' => each Gaussian gets its own patch. 'source' => all Gaussians belonging to a single source are grouped into one patch. 'mask' => use mask file specified by bbs_patches_mask", - "dtype": "str", - "default": null, - "name": "bbs_patches", + "info": "BBS format, type of patch to use: None => no patches. 'single' => all Gaussians in one patch. 'gaussian' => each Gaussian gets its own patch. 'source' => all Gaussians belonging to a single source are grouped into one patch. 'mask' => use mask file specified by bbs_patches_mask", + "dtype": "str", + "default": null, + "name": "bbs_patches", "choices": [ - "single", - "gaussian", - "source", - "mask", + "single", + "gaussian", + "source", + "mask", null ] - }, + }, { - "info": "Name of the mask file (of same size as input image) that defines the patches if bbs_patches = 'mask'", - "dtype": "file", - "default": null, - "name": "bbs_patches_mask", + "info": "Name of the mask file (of same size as input image) that defines the patches if bbs_patches = 'mask'", + "dtype": "file", + "default": null, + "name": "bbs_patches_mask", "io": "input" - }, + }, { - "info": "Type of catalog to write: 'gaul' - Gaussian list, 'srl' - source list (formed by grouping Gaussians), 'shap' - shapelet list (FITS format only)", - "dtype": "str", - "default": "gaul", - "name": "catalog_type", + "info": "Type of catalog to write: 'gaul' - Gaussian list, 'srl' - source list (formed by grouping Gaussians), 'shap' - shapelet list (FITS format only)", + "dtype": "str", + "default": "gaul", + "name": "catalog_type", "choices": [ - "srl", - "gaul", + "srl", + "gaul", "shap" ] - }, + }, { - "info": "Overwrite existing file?", - "dtype": "bool", - "default": true, + "info": "Overwrite existing file?", + "dtype": "bool", + "default": true, "name": "clobber" - }, + }, { - "info": "Correct source parameters for image projection (BBS format only)?", - "dtype": "bool", - "default": true, + "info": "Correct source parameters for image projection (BBS format only)?", + "dtype": "bool", + "default": true, "name": "correct_proj" - }, + }, { - "info": "Format of output catalog", - "dtype": "str", - "default": "fits", - "name": "format", + "info": "Format of output catalog", + "dtype": "str", + "default": "fits", + "name": "format", "choices": [ - "bbs", - "ds9", - "fits", - "star", - "kvis", - "ascii", - "csv", - "casabox", + "bbs", + "ds9", + "fits", + "star", + "kvis", + "ascii", + "csv", + "casabox", "sagecal" ] - }, + }, { - "info": "Include flux densities from each channel (if any)?", - "dtype": "bool", - "default": false, + "info": "Include flux densities from each channel (if any)?", + "dtype": "bool", + "default": false, "name": "incl_chan" - }, + }, { - "info": "Include islands without any valid Gaussians (source list only)?", - "dtype": "bool", - "default": false, + "info": "Include islands without any valid Gaussians (source list only)?", + "dtype": "bool", + "default": false, "name": "incl_empty" - }, + }, { - "info": "Name for entries in the output catalog (BBS format only). None => use image file name", - "dtype": "file", - "default": null, - "name": "srcroot", + "info": "Name for entries in the output catalog (BBS format only). None => use image file name", + "dtype": "file", + "default": null, + "name": "srcroot", "io": "output" - }, + }, { - "info": "Convert output model to tigger format", - "dtype": "bool", - "default": true, + "info": "Convert output model to tigger format", + "dtype": "bool", + "default": true, "name": "port2tigger" - }, + }, { - "info": "Calculate spectral indices (for multi-channel image)", - "dtype": "bool", - "default": false, + "info": "Calculate spectral indices (for multi-channel image)", + "dtype": "bool", + "default": false, "name": "spectralindex_do" - }, + }, { - "info": "Flag channels before (averaging and) extracting spectral index, if their rms is more than 5 (clipped) sigma outside the median rms over all channels, but only if <= 10% of channels", - "dtype": "bool", - "default": true, + "info": "Flag channels before (averaging and) extracting spectral index, if their rms is more than 5 (clipped) sigma outside the median rms over all channels, but only if <= 10% of channels", + "dtype": "bool", + "default": true, "name": "flagchan_rms" - }, + }, { - "info": "Flag channels that do not meet SNR criterion set by specind_snr", - "dtype": "bool", - "default": true, + "info": "Flag channels that do not meet SNR criterion set by specind_snr", + "dtype": "bool", + "default": true, "name": "flagchan_snr" - }, + }, { - "info": "Maximum number of channels to average for a given source when when attempting to meet target SNR. 1 => no averaging; 0 => no maximum", - "dtype": "int", - "default": 0, + "info": "Maximum number of channels to average for a given source when when attempting to meet target SNR. 1 => no averaging; 0 => no maximum", + "dtype": "int", + "default": 0, "name": "specind_maxchan" - }, + }, { - "info": "Target SNR to use when fitting power law. If there is insufficient SNR, neighboring channels are averaged to attempt to obtain the target SNR. Channels with SNRs below this will be flagged if flagchan_snr = True", - "dtype": "float", - "default": 3.0, + "info": "Target SNR to use when fitting power law. If there is insufficient SNR, neighboring channels are averaged to attempt to obtain the target SNR. Channels with SNRs below this will be flagged if flagchan_snr = True", + "dtype": "float", + "default": 3.0, "name": "specind_snr" - }, + }, { - "info": "Start frequency (unit => Hz)", - "dtype": "float", - "default": null, + "info": "Start frequency (unit => Hz)", + "dtype": "float", + "default": null, "name": "freq0" } ] diff --git a/stimela/cargo/cab/pybdsm/src/run.py b/stimela/cargo/cab/pybdsm/src/run.py index 978fe6339..cec3b49d5 100644 --- a/stimela/cargo/cab/pybdsm/src/run.py +++ b/stimela/cargo/cab/pybdsm/src/run.py @@ -57,7 +57,7 @@ if freq0 is None: with pyfits.open(img_opts['filename']) as hdu: hdr = hdu[0].header - for i in xrange(1, hdr['NAXIS']+1): + for i in range(1, hdr['NAXIS']+1): if hdr['CTYPE{0:d}'.format(i)].startswith('FREQ'): freq0 = hdr['CRVAL{0:d}'.format(i)]