Point Station

MCCS pointing calculation prototype.

This is originally from the AAVS code.

class AntennaInformation

Class for holding a station’s antenna information.

__init__()

Initialize AntennaInformation object.

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

load_displacements_file(txtfile)

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. x and y units are metres

Parameters:

txtfile (str) – displacements file

Return type:

None

load_displacements_individual(x_pos, y_pos, z_pos, tpm_id, element_id, i)

Load antenna displacements individually.

Parameters:
  • x_pos (float) – x offset from station

  • y_pos (float) – y offset from station

  • z_pos (float) – z offset from station

  • tpm_id (int) – Id of the tpm

  • element_id (int) – Id of the element

  • i (int) – position of element

Return type:

None

class Pointing(station_info)

Helper class for generating beamforming coefficients.

__init__(station_info)

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

Parameters:

station_info (StationInformation) – Basic information for station location and antenna displacements

static convert_to_astropy_angle(angle)

Convert a number or string to an Astropy angle.

Parameters:

angle (str | float | Angle) – angle

Return type:

Angle

Returns:

converted angle

delay_rates()

Return delay rates values.

Return type:

ndarray

Returns:

delay rates values

delays()

Return delay values.

Return type:

ndarray

Returns:

delay values

get_pointing_coefficients(start_channel, nof_channels)

Get complex pointing coefficients from generated delays.

Parameters:
  • start_channel (int) – Start channel index

  • nof_channels (int) – Number of channels starting with start_channel

Return type:

Optional[list[list[complex128]]]

Returns:

Return the pointing coefficients as a tuple of numpy complex values

is_above_horizon(right_ascension, declination, pointing_time)

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

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

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

  • pointing_time (Time) – The observation time as an astropy Time.

Return type:

bool

Returns:

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

point_array(right_ascension, declination, ra_rate=astropy.coordinates.Angle, dec_rate=astropy.coordinates.Angle, reference_time=None, delta_time=10.0, pointing_time=None)

Calculate the phase shift between two antennas.

Which is given by the phase constant (2 * pi / wavelength) multiplied by the projection of the baseline vector onto the plane wave arrival vector

Parameters:
  • right_ascension (Angle) – Right ascension of source - astropy Angle / string convertable to Angle

  • declination (Angle) – Declination of source - astropy Angle / string convertable to Angle

  • ra_rate (Optional[Angle]) – Rate of right ascension, in deg/s.

  • dec_rate (Optional[Angle]) – Rate of declination, in deg/s.

  • pointing_time (Optional[Time]) – Time of observation (in format astropy time)

  • reference_time (Optional[Time]) – time in which coordinates are equal

  • delta_time (float) – Delta timing for calculating delay rate

Return type:

None

Returns:

The (delay,delay rate) tuple for each antenna

point_array_static(altitude, azimuth)

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

Parameters:
  • altitude (float | Angle) – altitude coordinates of a sky object as astropy angle

  • azimuth (float | Angle) – azimuth coordinates of a sky object as astropy angles

Return type:

None

point_to_sun(pointing_time=None)

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

Parameters:

pointing_time (Optional[Time]) – Time at which delays should be generated

Return type:

None

class StationInformation

Class for holding information about a station.

__init__()

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_file(antennafile)

Proxy to the method in the associated AntennaInformation object.

Parameters:

antennafile (str) – displacements file

Return type:

None

load_displacements_individual(x_pos, y_pos, z_pos, tpm_id, element_id, i)

Load antenna displacements individually.

Parameters:
  • x_pos (float) – x offset from station

  • y_pos (float) – y offset from station

  • z_pos (float) – z offset from station

  • tpm_id (int) – Id of the tpm

  • element_id (int) – Id of the element

  • i (int) – position of the element

Return type:

None

set_location(latitude, longitude, ellipsoidalheight)

Set the location data for this station.

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

  • longitude (float) – the longitude of the station (WGS84)

  • ellipsoidalheight (float) – the ellipsoidal height of the station

Raises:

ValueError – values out of range

Return type:

None