pipeline.domain.AntennaArray
- class AntennaArray(name: str, position: dict, antennas: list[Antenna])[source]
Bases:
objectA logical representation of the antenna array.
- antennas
List of Antenna objects that comprise the array.
- baseline_lookup
2D matrix of baseline lengths in metres, indexed by antenna ID.
- baselines_m
1D array of baseline lengths for unique antenna pairs (excluding auto-correlations).
- baseline_min
Baseline namedtuple (antenna1, antenna2, length) for the shortest baseline, or None if fewer than two antennas.
- baseline_max
Baseline namedtuple (antenna1, antenna2, length) for the longest baseline, or None if fewer than two antennas.
Methods
Return a list of Baseline tuples for input antenna IDs.
Return Antenna object for given antenna ID or name.
Get the baseline distance between two antennas.
Get the offset of the given antenna from the centre of the array.
Attributes
Return a list of Baseline tuples for all antennas in the array.
Get the array elevation as a CASA quantity.
Get the array latitude as a CASA quantity.
Get the array longitude as a CASA quantity.
Return the median center direction for the array.
Return the name of the observatory.
Return the position of the observatory as a CASA 'position' measure dictionary.
- __init__(name: str, position: dict, antennas: list[Antenna]) None[source]
Initialize an AntennaArray object.
- Parameters:
name -- the name of the observatory/telescope (as per OBSERVATIONS table in the measurement set).
position -- the position of the observatory/telescope (as per OBSERVATIONS table in the measurement set) as a CASA 'position' measure dictionary.
antennas -- a list of Antenna objects that comprise the array.
- baselines_for_antennas(antenna_ids: Sequence[int]) list[Baseline][source]
Return a list of Baseline tuples for input antenna IDs.
This creates and returns a list of Baseline tuples for combinations of unique IDs in input antenna IDs.
- Parameters:
antenna_ids -- IDs of antennas to return baselines for.
- Returns:
List of Baseline objects.
- property elevation: dict
Get the array elevation as a CASA quantity.
- get_antenna(id: int | None = None, name: str | None = None) Antenna[source]
Return Antenna object for given antenna ID or name.
If both ID and name are given, the antenna is searched for by ID.
- Parameters:
id -- Antenna ID to search for.
name -- Antenna name to search for.
- Returns:
Antenna object for given antenna ID or name.
- Raises:
Exception, if no id or name are given. --
- get_baseline(antenna1: int | str, antenna2: int | str) Baseline | None[source]
Get the baseline distance between two antennas.
Antenna identifiers will be considered first as numeric antenna IDs, then as antenna names.
- Parameters:
antenna1 -- Numerical ID or name of first antenna.
antenna2 -- Numerical ID or name of second antenna.
- Returns:
The baseline length in meters between antennass identified by arguments antenna1 and antenna2. If an identifier does not match a known antenna, None will be returned.
- get_offset(antenna: Antenna) tuple[Distance, Distance][source]
Get the offset of the given antenna from the centre of the array.
- Parameters:
antenna -- Antenna object to determine offset for.
- Returns:
2-tuple containing x- and y-offset to centre of the array.
- property latitude: dict
Get the array latitude as a CASA quantity.
- property longitude: dict
Get the array longitude as a CASA quantity.
- property median_direction: dict
Return the median center direction for the array.
- Returns:
Median center direction for the array as a CASA 'direction' measure dictionary.
- property name: str
Return the name of the observatory.
- property position: dict
Return the position of the observatory as a CASA 'position' measure dictionary.