Point Station

MCCS pointing calculation prototype.

This is originally from the AAVS code.

class AntennaInformation[source]

Class for holding a station’s antenna information.

__init__() None[source]

Initialize AntennaInformation object.

By default it will have 256 elements but no displacements, &c.

load_displacements_arrays(xyz_positions: ndarray, element_ids: ndarray) None[source]

Load antenna displacements from numpy arrays.

Parameters:
  • xyz_positions – array of the x, y, z positions of the antennas

  • element_ids – array of the element ids

load_displacements_file(txtfile: str) None[source]

Load antenna displacements from a text file.

The file is formatted as per AAVS_loc_italia_190429.txt This 4 float-formatted columns separated by spaces. The column order is - Element x y TPM The header line is skipped, and the TPM column is ignored. x and y units are metres

Parameters:

txtfile – displacements file

load_displacements_individual(x_pos: float, y_pos: float, z_pos: float, element_id: int) None[source]

Load antenna displacements individually.

Parameters:
  • x_pos – x offset from station

  • y_pos – y offset from station

  • z_pos – z offset from station

  • element_id – Id of the element

class Pointing(station_info: StationInformation)[source]

Helper class for generating beamforming coefficients.

__init__(station_info: StationInformation) None[source]

Pointing class, generates delay and delay rates to be downloaded to TPMs.

Parameters:

station_info – Basic information for station location and antenna displacements

static convert_to_astropy_angle(angle: str | float | Angle) Angle[source]

Convert a number or string to an Astropy angle.

Parameters:

angle – angle

Returns:

converted angle

delay_rates() ndarray[source]

Return delay rates values.

Returns:

delay rates values

delays() ndarray[source]

Return delay values.

Returns:

delay values

get_pointing_coefficients(start_channel: int, nof_channels: int) list[list[numpy.complex128]] | None[source]

Get complex pointing coefficients from generated delays.

Parameters:
  • start_channel – Start channel index

  • nof_channels – Number of channels starting with start_channel

Returns:

Return the pointing coefficients as a tuple of numpy complex values

is_above_horizon(right_ascension: astropy.coordinates.Angle, declination: astropy.coordinates.Angle, pointing_time: astropy.time.core.Time) bool[source]

Check if the target is above the horizon, given time for the reference antenna.

Parameters:
  • right_ascension – The right ascension of the target as a astropy angle

  • declination – The declination of the target as an astropy angle.

  • pointing_time – The observation time as an astropy Time.

Returns:

True if the target coordinates are above the horizon at the specified time, false otherwise.

point_array_equatorial(right_ascension: astropy.coordinates.Angle, declination: astropy.coordinates.Angle, ra_rate: astropy.coordinates.Angle | None = astropy.coordinates.Angle, dec_rate: astropy.coordinates.Angle | None = astropy.coordinates.Angle, reference_time: astropy.time.core.Time | None = None, delta_time: float = 10.0, pointing_time: astropy.time.core.Time | None = None) None[source]

Calculate the delay and delay_rate for a station pointing.

Calculate the delay and delay_rate (change in delay over delta_time) for a station pointing described by equatorial coordinates (the input right_ascension and declination).

Parameters:
  • right_ascension – Right ascension of source in degrees

  • declination – Declination of source in degrees

  • ra_rate – Rate of right ascension in deg/s, used for moving objects

  • dec_rate – Rate of declination in deg/s, used for moving objects

  • reference_time – Time at which the source is at the input right_acension and declination, only required if using ra_rate and dec_rate

  • delta_time – Time in seconds from pointing_time for calculating the delay rate

  • pointing_time – Time at the start of the observation

point_array_static(altitude: float | Angle, azimuth: float | Angle) None[source]

Calculate the delay given the altitude and azimuth coordinates of a sky object.

Parameters:
  • altitude – altitude coordinates of a sky object as astropy angle

  • azimuth – azimuth coordinates of a sky object as astropy angles

point_to_sun(pointing_time: astropy.time.core.Time | None = None) None[source]

Generate delays to point towards the sun for the given time.

Parameters:

pointing_time – Time at which delays should be generated

class StationInformation[source]

Class for holding information about a station.

__init__() None[source]

Initialize a new instance.

The instance is initialise with no location data and with a default AntennaInformation object (which will have no element displacement data).

load_displacements_arrays(xyz_positions: ndarray, element_ids: ndarray) None[source]

Proxy to the method in the associated AntennaInformation object.

Parameters:
  • xyz_positions – array of the x, y, z positions of the antennas

  • element_ids – array of the element ids

load_displacements_file(antennafile: str) None[source]

Proxy to the method in the associated AntennaInformation object.

Parameters:

antennafile – displacements file

load_displacements_individual(x_pos: float, y_pos: float, z_pos: float, element_id: int) None[source]

Load antenna displacements individually.

Parameters:
  • x_pos – x offset from station

  • y_pos – y offset from station

  • z_pos – z offset from station

  • element_id – Id of the element

set_location(latitude: float, longitude: float, ellipsoidalheight: float) None[source]

Set the location data for this station.

Parameters:
  • latitude – the latitude of the station (WGS84)

  • longitude – the longitude of the station (WGS84)

  • ellipsoidalheight – the ellipsoidal height of the station

Raises:

ValueError – values out of range