ImagingChunkedHandler
This module makes images and cubes out of the uv data products created by VisHandler, imaging in chunks of channels when cube sizes are large.
Note that unlike the ImagingHandler, ImagingChunkedHandler requires passing an individual target, config, and product each time.
Requires CASA to run.
- class phangsPipeline.ImagingChunkedHandler(target, config, product, key_handler, dry_run=False, chunksize=10, imaging_method='tclean', recipe='phangsalma', set_cell_imsize_on_init=True, force_square=False, oversamp=5, make_temp_dir=True, temp_key=None, temp_path=None, copy_ms_to_temp=False)
Class to makes image cubes out of uv data for imaging a single spectral line.
- Parameters:
target (str) – The target name.
config (str) – The configuration name.
product (str) – The product name.
key_handler (dict) – The key handler dictionary.
dry_run (bool, optional) – If True, do not actually make the images. Defaults to False.
chunksize (int, optional) – The number of channels per image cube. Defaults to 10.
imaging_method (str, optional) – The imaging method. Defaults to ‘tclean’.
recipe (str, optional) – The recipe. Defaults to ‘phangsalma’.
set_cell_imsize_on_init (bool, optional) – If True, set the cell size on initialization. Defaults to True.
force_square (bool, optional) – If True, force the image size to be square. Defaults to False.
oversamp (int, optional) – The oversampling factor of pixels per beam FWHM. Defaults to 5.
make_temp_dir (bool, optional) – If True, make a temporary directory. Defaults to True.
temp_key (str, optional) – The temporary key. Defaults to None.
temp_path (str, optional) – The temporary path. Defaults to None. Set this to specify an independent path for the temporary directory that is unassociated with the default imaging directory.
- phangsPipeline.ImagingChunkedHandler.run_imaging(self, chunk_num=None, do_all=False, do_dirty_image=False, do_revert_to_dirty=False, do_read_clean_mask=False, do_multiscale_clean=False, do_revert_to_multiscale=False, do_singlescale_mask=False, singlescale_mask_high_snr=None, singlescale_mask_low_snr=None, singlescale_mask_absolute=False, skip_singlescale_if_mask_empty=True, do_singlescale_clean=False, do_revert_to_singlescale=False, do_recombine_cubes=False, do_export_to_fits=True, do_cleanup=True, convergence_fracflux=0.01, convergence_noise_z_threshold=None, singlescale_threshold_value=1.0, extra_ext_in=None, suffix_in=None, extra_ext_out=None, dynamic_sizing=True, force_square=False, overwrite=False)
Run the imaging process.
The clean convergence is set by the convergence_fracflux and convergence_noise_z_threshold parameters.
- convergence_fracflux is the fractional flux threshold between imaging loops.
Convergence is reached when the fractional flux change is less than this value.
- convergence_noise_z_threshold is the noise threshold in z-scores.
Convergence is reached when the z-score test is less than this value. By default, this is disabled by setting to None. We suggest setting this to 2.0 when enabled as a conservative choice.
- Parameters:
do_all (bool) – If True, do all steps.
do_dirty_image (bool) – If True, make a dirty image.
do_revert_to_dirty (bool) – If True, revert to dirty image.
do_read_clean_mask (bool) – If True, read clean mask.
do_multiscale_clean (bool) – If True, multiscale clean.
do_revert_to_multiscale (bool) – If True, revert to multiscale clean.
do_singlescale_mask (bool) – If True, make singlescale mask.
singlescale_mask_high_snr (float) – High SNR threshold for singlescale mask.
singlescale_mask_low_snr (float) – Low SNR threshold for singlescale mask.
singlescale_mask_absolute (bool) – If True, use absolute threshold for singlescale mask.
do_singlescale_clean (bool) – If True, singlescale clean.
do_revert_to_singlescale (bool) – If True, revert to singlescale clean.
do_export_to_fits (bool) – If True, export ms data folders into fits-format image cube files.
convergence_fracflux (float) – Fractional flux convergence threshold for multiscale clean. Default is 0.01.
convergence_noise_z_threshold (float) – Noise convergence threshold for multiscale clean. Default is None. A suggested value to use is 2.0, i.e. the null hypothesis is rejected if the z-score is greater than 2.0.
singlescale_threshold_value (float) – Threshold value for singlescale clean. Default is 1.0.
extra_ext_in (str) – Extra extension for input files.
suffix_in (str) – Suffix for input files.
extra_ext_out (str) – Extra extension for output files.
recipe (str) – The recipe. Default is ‘phangsalma’.
make_directories (bool) – Create missing directories.
dynamic_sizing (bool) – Use dynamic sizing.
force_square (bool) – Force the image size to be square.
export_dirty (bool) – If True, export dirty images.
export_multiscale (bool) – If True, export multiscale images.
overwrite (bool) – Overwrite existing files.