Solar Drift Plots

Functions for quering EDA to get status of tango devices during automated obs.

ska_sci_ops_data_analysis.tango_device_status_stations.check_flagged_devices(dfs: dict)

Check status of Tango devices associated with flagged antennas.

Parameters:

dfs – dictionary of dataframes that have information about the antennas that have been flagged from calibration solutions. The order should be dfs grouped by smartbox, tpm, sps rack then station.

ska_sci_ops_data_analysis.tango_device_status_stations.check_smartbox_status_during_sft(sb_id: int, datetimestart: str, datetimeend: str, station: str)

Check the status of a SMARTbox state for a station during an observation time.

Parameters:
  • sb_id – Smartbox id (sb01 has sb_id = 0)

  • datetimestart – start time, format YYYY-MM-DD hh:mm:ss in UTC

  • datetimeend – end time, format YYYY-MM-DD hh:mm:ss in UTC

  • station – the station name (s8-1)

Returns:

a dataframe with the SMARTbox state.

ska_sci_ops_data_analysis.tango_device_status_stations.check_spssubrack_status_during_sft(SPS: int, datetimestart: str, datetimeend: str, station: str)

Check the status of an SPS subrack state for a station during an observation time.

Parameters:
  • SPS – 1 refers to TPM01-08, 2 refers to TPM09-16

  • datetimestart – start time, format YYYY-MM-DD hh:mm:ss in UTC

  • datetimeend – end time, format YYYY-MM-DD hh:mm:ss in UTC

  • station – the station name (s8-1)

Returns:

a list of dataframes that have the tileprogramming state in the relevant subrack.

ska_sci_ops_data_analysis.tango_device_status_stations.check_station_status_during_sft(station: str, datetimestart: str, datetimeend: str)

Check the status of a station state for a station during an observation time.

Parameters:
  • datetimestart – start time, format YYYY-MM-DD hh:mm:ss in UTC

  • datetimeend – end time, format YYYY-MM-DD hh:mm:ss in UTC

  • station – the station name (s8-1)

Returns:

a tuple with 2 entries; the first is a list of dataframes that have the state of various Tango devices (station, fieldstation, fndh, spsstation, pasdbus.) The second is a dataframe for the station admin mode.

ska_sci_ops_data_analysis.tango_device_status_stations.check_tpm_status_during_sft(tpm_id: int, datetimestart: str, datetimeend: str, station: str)

Check the status of a TPM tileprogrammingstate during an observation time.

Parameters:
  • tpm_id – TPM id (TPM01 has tpm_id = 0)

  • datetimestart – start time, format YYYY-MM-DD hh:mm:ss in UTC

  • datetimeend – end time, format YYYY-MM-DD hh:mm:ss in UTC

  • station – the station name (s8-1)

Returns:

a dataframe with the tile programming state.

ska_sci_ops_data_analysis.tango_device_status_stations.get_all_station_status_info(starttime: str, endtime: str, date: str, station: str)

Get the status of station tango devices during an observation time.

This function is for debugging problems that may have occurred during a freq sweep

or a solar drift if required.

Parameters:
  • starttime – the start time with format HH:MM for the observation in UTC+08:00

  • endtime – the end time with format HH:MM for the observation in UTC+08:00

  • date – The date of the observation, UTC+08:00, format YYYY-MM-DD

  • station – the name of the station to check the tango device status

ska_sci_ops_data_analysis.tango_device_status_stations.get_basic_station_status_info(station: str, datetimestart: str, datetimeend: str)

Check the status of tango devices station, fieldstation and fndh.

Parameters:
  • station – name of station

  • datetimestart – start time of observation / time window to check. Format is YYYY-MM-DD HH:MM:SS - time is UTC for database queries

  • datetimeend – end time of observation / time window to check. Format is YYYY-MM-DD HH:MM:SS - time is UTC for database queries

ska_sci_ops_data_analysis.tango_device_status_stations.map_adminmode_to_text(integer_val: int)

Return a text value for the admin mode of a tango device.

Parameters:

integer_val – an integer that maps to a adminmode for a tango device.

Returns:

a string that gives the device adminmode.

ska_sci_ops_data_analysis.tango_device_status_stations.map_integer_state_to_text_status(integer_val: int)

Return a text value for the state of a tango device.

Parameters:

integer_val – an integer that maps to a status for a tango device.

Returns:

a string that gives the device status.

ska_sci_ops_data_analysis.tango_device_status_stations.map_str_adminmode_to_color(state: str)

Return a color value for the admin mode of a tango device.

Parameters:

state – a string that maps to a admin mode color for a tango device.

Returns:

a string that gives a color for plotting.

ska_sci_ops_data_analysis.tango_device_status_stations.map_str_state_to_color(state: str)

Return a color value for the state of a tango device.

Parameters:

state – a string that maps to a status for a tango device.

Returns:

a string that gives a color for plotting.

ska_sci_ops_data_analysis.tango_device_status_stations.map_tpmstate_to_color(state: str)

Return a color value for the TPM state of a tango device for a TPM.

Parameters:

state – a string that maps to a tpmstate color for a tango device.

Returns:

a string that gives the color for plotting.

ska_sci_ops_data_analysis.tango_device_status_stations.map_tpmstate_to_text(integer_val: int)

Return a text value for the TPM state of a tango device for a TPM.

Parameters:

integer_val – an integer that maps to a tpmstate for a tango device.

Returns:

a string that gives the device tpmstate.