Settings
Classes
- class radler.Settings
Class to collect and set (Radler) deconvolution related settings.
- class Generic
Settings not specific to the algorithm
- property use_sub_minor_optimization
Use the fast variant of this algorithm. When
True, the minor loops are decomposed in subminor loops that keep the scale fixed, which allows a (very) significant speed up. There is no downside of this method, so it is generally recommended to be set toTrue.
- class LocalRms
The value of LocalRmsMethod describes if and how an RMS map should be used.
- property image
If specified, use a manual FITS image instead of a dynamically calculated RMS image.
- property method
The method, or LocalRmsMethod::kNone to disable local RMS thresholding.
- property window
Size of the sliding window to calculate the “local” RMS over.
- class MoreSane
- property arguments
Extra command-line arguments provided to MORESANE.
- property location
Path of the MORESANE executable.
- property sigma_levels
Set of threshold levels provided to MORESANE. The first value is used in the first major iteration, the second value in the second major iteration, etc.
- class Multiscale
Settings specific to multi-scale algorithm.
- property convolution_padding
Controls the padding size of the deconvolution. Higher values should be more accurate, but it is rarely necessary to change this value. The padding is relative to the sum of the size of the scale and the image size. Problems with multiscale diverging or looping forever can be caused by insufficient padding. However, padding is expensive, so large values should be prevented.
- property fast_sub_minor_loop
Use the fast variant of this algorithm. When
True, the minor loops are decomposed in subminor loops that keep the scale fixed, which allows a (very) significant speed up. There is no downside of this method, so it is generally recommended to be set toTrue.
- property max_scales
Limits the number of scales used, to prevent extremely large scales in large imaging runs. When set to zero, scales are used up to the size of the image. The scale sizes increase exponentially and start from a value derived from the size of the PSF. When scale_list is set, this value has no effect. Note that this value represents the number of scales to be used, not the size of the maximum scale.
- property scale_bias
Balances between deconvolving smaller and larger scales. A lower bias value will give more focus to larger scales. The value should be between 0 and 1, and typically be close to 0.6.
- property scale_list
Specify a manual list of scales. If left empty, Radler determines a good set of scales to use, ranging from the PSF size to the full image size. It is rarely ever necessary to set this parameter. Also consider using max_scales instead of a manual
scale_listwhen the default just contains scales that are too large.
- property shape
Shape of kernel to be used for deconvolution.
See also
MultiscaleShape.
- property sub_minor_loop_gain
Controls how long to keep the scale fixed. The default value of 0.2 implies that the subminor loop ends when the strongest source and all sources in between have been decreased to 80% of the bright source. This parameter only has effect when fast_sub_minor_loop is set to
True.
- class Parallel
Settings for parallel deconvolution that uses multi-threading over sub-images.
- property grid_height
Number of sub-images in the y direction.
- property grid_width
Number of sub-images in the x direction.
- property max_threads
Number of sub-images to run in parallel. It must be larger than zero. By default all processor cores will be used.
- class Python
Settings specific to the Python algorithm.
- property filename
Path to a python file containing the deconvolution algorithm to be used.
- class SpectralFitting
Settings related to how components are fitted over frequency channels.
- property forced_filename
File path to a FITS file that contains spectral index values to force the channels onto. See Ceccoti et al (2022) for details. Only used when mode == kForcedFitting.
- property mode
Fitting mode, or schaapcommon::fitters::SpectralFittingMode::NoFitting to allow frequency channels to vary fully independently.
- property terms
Number of spectral terms to constrain the channels to, or zero to disable.
- property absolute_auto_mask_threshold
Like auto_mask_sigma, but instead specifies an absolute level where to stop generation of the auto-mask.
- property absolute_threshold
Value in Jy that defines when to stop cleaning. Radler::Perform() will stop its major iteration and set ``reached_major_threshold``=false when the peak residual flux is below the given threshold. The default value is 0.0, which means that Radler will keep continuing until another criterion (e.g. nr. of iterations) is reached.
- property algorithm_type
- property allow_negative_components
When set to
False, only positive components are cleaned. This is generally not advisable for final scientific results.
- property auto_mask_sigma
Sigma value for automatically creating and applying mask images.
If set, Radler performs these steps: - Radler starts cleaning towards a threshold of the given sigma value. - Once the sigma level is reached, Radler generates a mask using the positions and (when using multi-scale cleaning) scale of each component. - Cleaning then continues until the final threshold value, as set using the threshold or auto_threshold_sigma values. During this final deconvolution stage, the generated mask constrains the cleaning.
If unset, automatic masking is not used.
- property auto_threshold_sigma
Sigma value for setting a cleaning threshold relative to the measured (1-sigma) noise level.
If set, Radler will calculate the standard deviation of the residual image before the start of every major deconvolution iteration, and continue deconvolving until the peak flux density is below this sigma value times the noise standard deviation. The standard deviation is calculated using the medium absolute deviation, which is a robust estimator that is not very sensitive to source structure still present in the image.
If unset, automatic thresholding is not used.
- property border_ratio
Size of border to avoid in the deconvolution, as a fraction of the image size. Example: a value of 0.1 means that the border is 10% on each side of the image. Therefore, this value should be smaller than 0.5.
- property casa_mask
Filename path of a Casa mask file to be used during deconvolution. If empty, no Casa mask is used. Do not use together with fits_mask.
- property channels_out
Number of spectral channels for input and output. This may be higher than the number of channels used during deconvolution (see the constructor of WorkTable). If that’s the case, channels are interpolated before deconvolution and extrapolated after (using the spectral_fitting settings).
- property divergence_limit
If in one major iteration the peak raises by this factor, the iteration is considered to be diverging. When parallel deconvolution is used, a diverged subimage that diverges is reset to its state before the major iteration.
- property fits_mask
Filename path of a FITS file containing a mask to be used during deconvolution. If empty, no FITS mask is used.
- property generic
- property horizon_mask_distance
The horizon mask distance allows masking out emission beyond the horizon. The value is a floating point value in radians.
All emission that is within the given distance of the horizon or beyond will be masked. A value of zero will therefore restrict deconvolution to be inside the horizon. Larger values will restrict deconvolution further.
Leaving the optional value unset disables horizon masking.
- property horizon_mask_filename
The filename for storing the horizon mask FITS image. If unset/empty, Radler uses: prefix_name + “-horizon-mask.fits”.
- property linked_polarizations
List of polarizations that is integrated over when performing peak finding. For “joining polarizations”, this function should list all the polarizations that are being deconvolved. However, the list can also list a subset of the full list of imaged polarizations.
- property local_rms
The value of LocalRmsMethod describes if and how an RMS map should be used.
- property major_iteration_count
Stopping criterion on the total number of major iterations. Radler will take this into account to determine the
reached_major_thresholdvalue returned by Radler::Perform().
- property major_loop_gain
Gain value for major loop iterations.
This setting specifies when Radler pauses performing minor iterations, so that a major prediction-imaging round can be performed by the client. Before returning, the peak flux is decreased by the given factor. A value of 1.0 implies that minor iterations will continue until the final stopping criteria have been reached. The value should be larger than 0.0.
- property minor_iteration_count
Stopping criterion on the total number of minor iterations. Radler::Perform() will stop its major iteration and set ``reached_major_threshold``=false when the number of total iterations has passed the requested iteration count. It is generally not advisable to stop deconvolution based on iteration count, except to prevent deconvolution going out of hand.
- property minor_loop_gain
Gain value for minor loop iterations.
- property more_sane
- property multiscale
- property parallel
- property pixel_scale
Pixel scale in radians.
- property prefix_name
Prefix for saving various output files (e.g. horizon mask).
- property python
In case the deconvolution algorithm is set to rd.AlgorithmType.python, Settings.python.filename should be set to the path to the script containing the python deconvolution implementation.
- property save_source_list
If
True, maintain a list of components while performing deconvolution. This works with the AlgorithmType::kGenericClean and AlgorithmType::kMultiscale algorithms. This is off by default, to prevent extra memory usage and computations when not needed.
- property spectral_correction
List of spectral terms to correct for during deconvolution. Together with spectral_correction_frequency, this defines a logarithmic polynomial, such that the first term is the spectral index, next is the curvature, etc. This correction might be useful for imaging with a very large bandwidth. Since many sources have a strong negative spectral index (e.g. -0.7), without such a correction, the lowest frequencies will undesirably dominate the peak finding in multi- frequency deconvolution.
- property spectral_correction_frequency
When using a spectral correction with spectral_correction, this value defines the base frequency (in Hz) of the terms specified with spectral_correction.
- property spectral_fitting
- property squared_joins
When set to
True, all values are squared when integrating over multiple channels during peak finding. This can cause instability in the multiscale algorithm. This is off by default. It can particularly be useful for RM synthesis, where otherwise polarized flux might decorrelate over the bandwidth. Note that the polarization direction is always squared over, independently of this option setting.
- property stop_on_negative_components
When set to
True, finding a negative component as the maximum (absolute) peak will be a criterion to stop and Radler::Perform() will set ``reached_major_threshold``=false.
- property thread_count
Number of parallel threads used in computations.
- property trimmed_image_height
Trimmed image height.
- property trimmed_image_width
Trimmed image width.