AntennaArray

class AntennaArray(name: str, position: dict, antennas: list[Antenna])[source]

Bases: object

A 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.

Attributes Summary

baselines

Return a list of Baseline tuples for all antennas in the array.

elevation

Get the array elevation as a CASA quantity.

latitude

Get the array latitude as a CASA quantity.

longitude

Get the array longitude as a CASA quantity.

median_direction

Return the median center direction for the array.

name

Return the name of the observatory.

position

Return the position of the observatory as a CASA 'position' measure dictionary.

Methods Summary

baselines_for_antennas(antenna_ids)

Return a list of Baseline tuples for input antenna IDs.

get_antenna([id, name])

Return Antenna object for given antenna ID or name.

get_baseline(antenna1, antenna2)

Get the baseline distance between two antennas.

get_offset(antenna)

Get the offset of the given antenna from the centre of the array.

Attributes Documentation

baselines

Return a list of Baseline tuples for all antennas in the array.

elevation

Get the array elevation as a CASA quantity.

latitude

Get the array latitude as a CASA quantity.

longitude

Get the array longitude as a CASA quantity.

median_direction

Return the median center direction for the array.

Returns:

Median center direction for the array as a CASA 'direction' measure dictionary.

name

Return the name of the observatory.

position

Return the position of the observatory as a CASA 'position' measure dictionary.

Methods Documentation

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.

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.