flint.imageset¶
The images and auxiliary products made by an imager, and operations on sets of them
Classes¶
A structure to represent the images and auxiliary products produced by an imager |
Functions¶
|
Combine wsclean subband channel images into a cube. Each collection attribute |
|
Replace the XX and YY images of an image set by Stokes I. |
|
Merge the image sets from multiple wsclean results into a single image set. |
|
Split an ImageSet by a given field and return the images that match the field of interest. |
|
Split an ImageSet by a given field. |
Regroup per-beam lists of sub-band channel images into per-channel lists |
|
|
Write I = (XX + YY) / 2 to |
Module Contents¶
- class flint.imageset.ImageSet(/, **data: Any)[source]¶
Bases:
flint.options.BaseOptionsA structure to represent the images and auxiliary products produced by an imager
- flint.imageset.combine_image_set_to_cube(image_set: ImageSet, fitscube_options: flint.options.FitsCubeOptions) ImageSet[source]¶
Combine wsclean subband channel images into a cube. Each collection attribute of the input image_set will be inspected. The MFS images will be ignored.
A output file name will be generated based on the prefix and mode (e.g. image, residual, psf, dirty).
- Parameters:
image_set (ImageSet) – Collection of wsclean image productds
fitscube_options (FitsCubeOptions) – Options to control the cube creation, forwarded to
combine_images_to_cubefor each mode
- Returns:
Updated iamgeset describing the new outputs
- Return type:
- flint.imageset.form_stokes_i(image_set: ImageSet) ImageSet[source]¶
Replace the XX and YY images of an image set by Stokes I.
Each XX image pairs with the YY image named the same but for its
xxfield, and I is named withithere. The prefix and the PSF, which XX and YY share, are renamed likewise. RaisesNamingExceptionif the images are not all in pairs. The XX and YY images are left for the caller.
- flint.imageset.merge_image_sets(image_sets: list[ImageSet]) ImageSet[source]¶
Merge the image sets from multiple wsclean results into a single image set.
- Parameters:
wsclean_results (List[WSCleanResult]) – The results of multiple wsclean imaging runs
- Returns:
The merged image set
- Return type:
- flint.imageset.split_and_get_image_set(image_set: ImageSet, get: str, by: str = 'pol', mode: str = 'image') list[pathlib.Path][source]¶
Split an ImageSet by a given field and return the images that match the field of interest.
- Parameters:
image_set (ImageSet) – The ImageSet to split
get (str) – The field to extract from the split images
by (str, optional) – The field to split by. Defaults to “pol”.
mode (str, optional) – The mode to extract from ImageSet. Defaults to “image”.
- Raises:
NamingException – If the field to split by is not found in the ImageSet
- Returns:
The images that match the field of interest
- Return type:
list[Path]
- flint.imageset.split_image_set(image_set: ImageSet, by: str = 'pol', mode: str = 'image') dict[str, list[pathlib.Path]][source]¶
Split an ImageSet by a given field.
- Parameters:
image_set (ImageSet) – The ImageSet to split
by (str, optional) – Field to split images by. Defaults to “pol”.
mode (str, optional) – Type of images to extract from ImageSet. Defaults to “image”.
- Raises:
NamingException – If the field to split by is not found in the ImageSet
- Returns:
_description_
- Return type:
dict[str, list[Path]]
- flint.imageset.transpose_and_sort_channel_images(beam_channel_images: list[list[pathlib.Path]]) list[list[pathlib.Path]][source]¶
Regroup per-beam lists of sub-band channel images into per-channel lists of beam images, ready to be co-added one channel at a time.
Each beam’s images are sorted by their channel range, and every beam must contribute the same number of channels.
- Parameters:
beam_channel_images (list[list[Path]]) – For each beam, the list of its per-channel images.
- Returns:
For each channel, the list of beam images at that channel.
- Return type:
list[list[Path]]