astrohack.beamcut¶
Module Contents¶
Functions¶
|
Process beamcut data from a .holog.zarr file to produce reports and plots. |
-
beamcut(holog_name: str, beamcut_name: str = None, ant: Union[str, List[str]] = 'all', ddi: Union[int, List[int], str] = 'all', destination: str = None, lm_unit: str = 'amin', azel_unit: str = 'deg', phase_unit: str = 'deg', phase_scale: Union[List[float], Tuple[float], numpy.array] = None, y_scale: list[float] = None, dpi: int = 300, display: bool = False, parallel: bool = False, overwrite: bool = False)[source]¶ Process beamcut data from a .holog.zarr file to produce reports and plots.
- Parameters
holog_name (str) – Name of the .holog.zarr file to use as input.
beamcut_name (str) – Name for the output .beamcut.zarr file to save data.
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.
destination (str, optional) – Destination directory for plots and reports if not None, defaults to None.
lm_unit (str, optional) – Unit for L/M offsets in plots and report, default is “amin”.
azel_unit (str, optional) – Unit for Az/El information in plots and report, default is “deg”.
phase_unit (str, optional) – Unit for phase plots, default is “deg”.
phase_scale (Union[List[float], Tuple[float], np.array], optional) – Scale for the phase plots, in phase_unit, default is None, meaning 1 full cycle.
dpi (int, optional) – Resolution in pixels, defaults to 300.
display (bool, optional) – Display plots during execution, defaults to False.
y_scale (str, optional) – Define amplitude plot Y scale, defaults to None.
parallel (bool, optional) – Process beamcuts in parallel, defaults to False.
overwrite (bool, optional) – Overwrite previously existing beamcut file of same name, defaults to False.
- Returns
Beamcut mds object
- Return type
AstrohackBeamcutFile
The beamcut mds object allows the user to access the underlying xarray datatree using compound keys, which are in order of depth, ant -> ddi. This object also provides a summary() method to list available data and available data visualization methods.
An outline of the beamcut mds data tree is show below:
image_mds = { ant_0:{ ddi_0: { cut_0: beamcut_ds ⋮ cut_p: beamcut_ds }, ddi_m: … }, ⋮ ant_n: … }Example Usage
from astrohack import beamcut beamcut( holog_name="astrohack_observation.holog.zarr", beamcut_name="astrohack_observation.beamcut.zarr", destination="beamcut_exports", display=False, ant='ea25', overwrite=True, parallel=True )