astrohack.combine¶
Module Contents¶
Functions¶
|
Combine DDIs in a Holography image to increase SNR |
-
combine(image_name: str, combine_name: str = None, ant: Union[str, List[str]] = 'all', ddi: Union[int, List[int], str] = 'all', weighted: bool = False, parallel: bool = False, overwrite: bool = False) → Union[astrohack.io.image_mds.AstrohackImageFile, None][source]¶ Combine DDIs in a Holography image to increase SNR
- Parameters
image_name (str) – Input holography data file name. Accepted data format is the output from
astrohack.holog.hologcombine_name (str, optional) – Name of output file; File name will be appended with suffix .combine.zarr. Defaults to basename of input file plus holography panel file suffix.
ant (list or str, optional) – List of antennas to be processed. None will use all antennas. Defaults to None, ex. ea25.
ddi (list of int, optional) – List of DDIs to be combined. None will use all DDIs. Defaults to None, ex. [0, …, 8].
weighted (bool, optional) – Weight phases by the corresponding amplitudes.
parallel (bool, optional) – Run in parallel. Defaults to False.
overwrite (bool, optional) – Overwrite files on disk. Defaults to False.
- Returns
Holography image object.
- Return type
combine
Combine combines the amplitude and corrected_phase members of the selected DDIs in the input image file. Currently, combine only supports the combination of these two quantities to avoid long regridding times. Hence, the output image file (.combine.zarr file name) contains the combined amplitude and corrected_phase images, but the aperture and beam images present in this file will be those present in the DDI with the lowest frequency.
AstrohackImageFile
Image object allows the user to access image data via compound dictionary keys with values, in order of depth, ant -> ddi. The image object produced by combine is special because it will always contain a single DDI. The image object also provides a summary() helper function to list available keys for each file. An outline of the image object structure when produced by combine is show below:
image_mds = { ant_0:{ ddi_n: image_ds, }, ⋮ ant_n: … }Example Usage
from astrohack.combine import combine combine( "astrohack_obs.image.zarr", ant = "ea25" weight = False )