ska_mid_dish_simulators package

Subpackages

Submodules

ska_mid_dish_simulators.circular_buffer module

ska_mid_dish_simulators.opcua_sim_constants module

File for defining OPC-UA simulator constants.

ska_mid_dish_simulators.sim_enums module

” Copied from enums defined in ska-mid-dish-manager. See ska_mid_dish_manager/models/dish_enums.py.

class Band(value)[source]

Bases: IntEnum

An enumeration.

B1 = 1
B2 = 2
B3 = 3
B4 = 4
B5a = 5
B5b = 6
NONE = 0
UNKNOWN = 7
class NoiseDiodeMode(value)[source]

Bases: IntEnum

SPFRx noise diode mode enums.

OFF = 0
PERIODIC = 1
PSEUDO_RANDOM = 2
class SPFBandInFocus(value)[source]

Bases: IntEnum

An enumeration.

B1 = 1
B2 = 2
B3 = 3
B4 = 4
B5a = 5
B5b = 6
UNKNOWN = 0
class SPFCapabilityStates(value)[source]

Bases: IntEnum

An enumeration.

OPERATE_DEGRADED = 2
OPERATE_FULL = 3
STANDBY = 1
UNAVAILABLE = 0
class SPFHealthState(value)[source]

Bases: IntEnum

SPF health state enums.

DEGRADED = 2
FAILED = 3
NORMAL = 1
UNKNOWN = 0
class SPFOperatingMode(value)[source]

Bases: IntEnum

An enumeration.

ERROR = 5
MAINTENANCE = 4
OPERATE = 3
STANDBY_LP = 2
STARTUP = 1
UNKNOWN = 0
class SPFPowerState(value)[source]

Bases: IntEnum

An enumeration.

FULL_POWER = 2
LOW_POWER = 1
UNKNOWN = 0
class SPFRxCapabilityStates(value)[source]

Bases: IntEnum

An enumeration.

CONFIGURE = 3
OPERATE = 4
STANDBY = 2
UNAVAILABLE = 1
UNKNOWN = 0
class SPFRxOperatingMode(value)[source]

Bases: IntEnum

An enumeration.

CONFIGURE = 4
OPERATE = 3
STANDBY = 2
STARTUP = 1
UNKNOWN = 0
class SlewType(value)[source]

Bases: IntEnum

Type of slew contexts.

NORMAL = 0
PRETRACK = 1
STOW = 2
class TrackInterpolationMode(value)[source]

Bases: IntEnum

Track interpolation mode enums.

NEWTON = 0
SPLINE = 1

ska_mid_dish_simulators.utils module

Shared methods in package.

arcsec_to_degrees(val_arcsec)[source]

Convert angle from arcsec to degrees.

Parameters:

val_arcsec (float) – Angle in arcsecs

Return type:

float

Returns:

Angle in degrees

degrees_to_arcsec(val_deg)[source]

Convert angle from degrees to arcsec.

Parameters:

val_deg (float) – Angle in degrees

Return type:

float

Returns:

Angle in arcsec

get_current_tai_timestamp()[source]

Get the current time as a TAI timestamp.

Return type:

float

get_datetime_from_tai(tai)[source]

Get the datetime object of tai representation.

Parameters:

tai (float) – atomic time (tai) in seconds

Return type:

datetime

Returns:

datetime object with timezone set as utc

get_tai_timestamp_from_unix_s(unix_s)[source]

Calculate atomic time from SKA epoch (in seconds) from unix time (in seconds).

Parameters:

unix_s (float) – Unix time in seconds

Return type:

float

Returns:

atomic time (tai) in seconds

get_unix_s_from_tai_timestamp(tai)[source]

Calculate unix time (in seconds) from atomic time SKA epoch (in seconds).

Parameters:

tai (float) – atomic time (tai) in seconds

Return type:

float

Returns:

Unix time in seconds

linearly_interpolate_points(point1, point2, segments)[source]

Linearly interpolate between two values.

Parameters:
  • point1 – Float value for point1.

  • point2 – Float value for point2.

Returns:

List of <segments> points linearly interpolated between point1 and point2.

radians_to_arcsec(radians)[source]

Convert an angle from radians to arcseconds.

Parameters:

radians (float) – Angle in radians

Return type:

float

Returns:

Angle in arcseconds

raise_exception_in_cmd(func)[source]

Raise an exception in the command.

random_delay_execution(func)[source]

Delay a command a bit.

reformat_track_load_table_log_msg_args(load_mode, sequence_length, timestamp_data, az_data, el_data, max_entries_to_log=10)[source]

Truncate TrackLoadTable command args sequences.

This is done by removing the padded zeroes in the supplied tracktable to be shown in the log message.

Parameters:
  • load_mode (str) – The tracktable load mode value.

  • sequence_length (int) – The number of valid data entries in the seqeunces.

  • timestamp_data (list[float]) – List of tracktable timestamp values.

  • az_data (list[float]) – List of tracktable azimuth values.

  • el_data (list[float]) – List of tracktable elevation values.

Returns:

Formatted string with truncated arguments and zero padding count.

Return type:

str

Module contents