astrohack.holog

Module Contents

Functions

holog(holog_name: str, grid_size: Union[int, Array, List] = None, cell_size: Union[int, Array, List] = None, image_name: str = None, padding_factor: int = 50, grid_interpolation_mode: str = 'linear', chan_average: bool = True, chan_tolerance_factor: float = 0.005, scan_average: bool = True, ant: Union[str, List[str]] = 'all', ddi: Union[int, List[int]] = 'all', to_stokes: bool = True, apply_mask: bool = True, phase_fit: bool = True, overwrite: bool = False, parallel: bool = False) → astrohack.mds.AstrohackImageFile

Process holography data and derive aperture illumination pattern.

holog(holog_name: str, grid_size: Union[int, Array, List] = None, cell_size: Union[int, Array, List] = None, image_name: str = None, padding_factor: int = 50, grid_interpolation_mode: str = 'linear', chan_average: bool = True, chan_tolerance_factor: float = 0.005, scan_average: bool = True, ant: Union[str, List[str]] = 'all', ddi: Union[int, List[int]] = 'all', to_stokes: bool = True, apply_mask: bool = True, phase_fit: bool = True, overwrite: bool = False, parallel: bool = False)astrohack.mds.AstrohackImageFile[source]

Process holography data and derive aperture illumination pattern.

Parameters
  • holog_name (str) – Name of holography .holog.zarr file to process.

  • 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) – Numpy array defining the cell size of each grid bin. If not specified cell_size is calculated using POINTING_OFFSET in pointing table.

  • 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

  • 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 50

  • parallel (bool, optional) – Run in parallel with Dask or in serial., defaults to False

  • grid_interpolation_mode (str, optional. Available options: {"linear", "nearest", "cubic"}) – Method of interpolation used when gridding data. This is done using the scipy.interpolate.griddata method. For more information on the interpolation see scipy.interpolate, defaults to “linear”

  • 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

  • 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

  • to_stokes (bool, optional) – Dictates whether polarization is computed according to stokes values., defaults to True

  • apply_mask (bool, optional) – If True applies a mask to the aperture setting values outside the aperture to zero., defaults to True

  • phase_fit (bool, optional) –

    If a boolean array is given each element controls one aspect of phase fitting. defaults to True.

    Phase fitting:

    • [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

  • overwrite (bool, optional) – Overwrite existing files on disk, defaults to False

Returns

Holography image object.

Return type

AstrohackImageFile

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
)