astrohack.holog¶
Module Contents¶
Functions¶
|
Process holography data and derive aperture illumination pattern. |
-
holog(holog_name: str, image_name: str = None, grid_size: Union[int, numpy.array, List] = None, cell_size: Union[float, numpy.array, List] = None, padding_factor: int = 10, grid_interpolation_mode: str = 'gaussian', chan_average: bool = True, chan_tolerance_factor: float = 0.005, scan_average: bool = True, alma_osf_pad: str = None, ant: Union[str, List[str]] = 'all', ddi: Union[str, int, List[int]] = 'all', zernike_n_order: int = 4, phase_fit_engine: str = 'perturbations', phase_fit_control: Union[List[bool], Tuple[bool]] = (True, True, True, True, True), to_stokes: bool = True, overwrite: bool = False, parallel: bool = False) → Union[astrohack.io.image_mds.AstrohackImageFile, None][source]¶ Process holography data and derive aperture illumination pattern.
- Parameters
holog_name (str) – Name of holography .holog.zarr file to process.
image_name (str, optional) – Defines the name of the output image name. If value is None, the name will be set to <base_name>.image.zarr, defaults to None
grid_size (numpy.ndarray, dtype int, list optional) – Numpy array specifying the dimensions of the grid used in data gridding. If not specified grid_size is calculated using POINTING_OFFSET in pointing table.
cell_size (numpy.ndarray, dtype float, list optional) – Size 2 array defining the cell size of each beam grid bin in radians. If not specified, the used cell_size is the one given in the observation_summary of the input holog file.
padding_factor (int, optional) – Padding factor applied to beam grid before computing the fast-fourier transform. The default has been set for operation on most systems. The user should be aware of memory constraints before increasing this parameter significantly., defaults to 10
parallel (bool, optional) – Run in parallel with Dask or in serial., defaults to False
grid_interpolation_mode (str, optional. Available options: {"gaussian", "linear", "nearest", "cubic"}) – Method of interpolation used when gridding data. For modes ‘linear’, ‘nearest’ and ‘cubic’ this is done using the scipy.interpolate.griddata method. For more information see scipy.interpolate. The remaining mode ‘gaussian’ convolves the visibilities with a gaussian kernel with a FWHM equal HPBW for the primary beam main lobe at the given frequency, this is slower than scipy.interpolate.griddata but better at preserving the small scales variations in the beam. Defaults to “gaussian”.
chan_average (bool, optional) – Boolean dictating whether the channel average is computed and written to the output holog file., defaults to True
chan_tolerance_factor (float, optional) – Tolerance used in channel averaging to determine the number of primary beam channels., defaults to 0.005
scan_average (bool, optional) – Boolean dictating whether averaging is done over scan., defaults to True
alma_osf_pad (str, optional) – Pad on which the antenna was poitioned at the ALMA OSF (only relevant for ALMA near field holographies).
ant (list or str, optional) – List of antennas/antenna to be processed, defaults to “all” when None, ex. ea25
ddi (list or int, optional) – List of ddi to be processed, defaults to “all” when None, ex. 0
zernike_n_order (int, optional) – Maximal N order for the Zernike Polynomials to be fitted to the aperture data.
phase_fit_engine (str, optional.) – Choose between the two available phase fitting engines, “perturbations” which assumes cassegrain optics and “zernike” which makes no assumption about the optical system but may overfit the aperture phase, default is “perturbations”.
phase_fit_control (bool array, optional) –
Controls which type of optical perturbations are to be fitted when phase_fit_engine is set to “perturbations”.
Available phase fit controls:
[0]: pointing offset;
[1]: focus xy offsets;
[2]: focus z offset;
[3]: subreflector tilt (off by default except for VLA and VLBA)
[4]: cassegrain offset
to_stokes (bool, optional) – Dictates whether polarization is computed according to stokes values., defaults to True
overwrite (bool, optional) – Overwrite existing files on disk, defaults to False
- Returns
Holography image object.
- Return type
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 also provides a summary() helper function to list available keys for each file. An outline of the image object structure is show below:
image_mds = { ant_0:{ ddi_0: image_ds, ⋮ ddi_m: image_ds }, ⋮ ant_n: … }Example Usage
from astrohack.holog import holog holog( holog_name="astrohack_observation.holog.zarr", padding_factor=50, grid_interpolation_mode='linear', chan_average = True, scan_average = True, ant='ea25', overwrite=True, parallel=True )