astrohack.fringefit_locit
Functions
|
Extract delays from a fringefit cal table and fit them with a delay model to obtain rough antenna position corrections |
Module Contents
- fringefit_locit(fringefit_caltable: str, position_name: str | None = None, elevation_limit: float | int = 10.0, polarization: str = 'both', fit_engine: str = 'scipy', fit_kterm: bool = False, fit_delay_rate: bool = False, ant: str | List[str] = 'all', ddi: str | int | List[int] = 'all', parallel: bool = True, overwrite: bool = False)[source]
Extract delays from a fringefit cal table and fit them with a delay model to obtain rough antenna position corrections
- Parameters:
fringefit_caltable (str) – fringefit cal table containing delays for all or most sources in a pointing observation.
position_name (str, optional) – Name of <position_name>.position.zarr file to create. Defaults to fringefit cal table name with position.zarr extension.
elevation_limit (float, optional) – Lower elevation limit for excluding sources in degrees.
polarization (str, optional) – Which polarization to use R, L or both for circular systems, X, Y, or both for linear systems.
fit_kterm (bool, optional) – Fit antenna elevation axis offset term, defaults to False
fit_delay_rate (bool, optional) – Fit delay rate with time, defaults to False
fit_engine (str, optional) – What engine to use on fitting, default is scipy
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 ddis/ddi to be processed, defaults to “all” when None, ex. 0
parallel (bool, optional) – Run in parallel. Defaults to False.
overwrite (bool, optional) – Boolean for whether to overwrite current position.zarr file, defaults to False.
- Returns:
Antenna position object.
- Return type:
AstrohackPositionFile Position object allows the user to access position data via compound dictionary keys with values, in order of depth, ant. The position object also provides a summary() helper function to list available keys for each file. An outline of the position object structure is show below:
position_mds = { ant_0: position_ds, ⋮ ant_n: position_ds }Additional Information
Available fitting engines:
For fringefit_locit two fitting engines have been implemented, one the classic method used in AIPS is called here ‘linear algebra’ and a newer more pythonic engine using scipy curve fitting capabilities, which we call scipy, more details below.
linear algebra: This fitting engine is based on the least square methods for solving linear systems, this engine is fast, about one order of magnitude faster than scipy, but may fail to converge, also its uncertainties may be underestimated.
scipy: This fitting engine uses the well established scipy.optimize.curve_fit routine. This engine is slower than the linear algebra engine, but it is more robust with better estimated uncertainties.
Choosing a polarization
The position fit may be done on either polarization (R or L for the VLA, X or Y for ALMA) or for both polarizations at once. When choosing both polarizations we increase the robustness of the solution by doubling the amount of data fitted.