astra.utils.astelos_errors#
AsTelOS telescope error checking and acknowledgement.
Functions
|
Acknowledge acceptable AsTelOS telescope errors. |
|
Check AsTelOS telescope status for known acceptable errors. |
- astra.utils.astelos_errors.check_error(telescope: Any, close: bool = False) Tuple[bool, DataFrame, str][source]#
Check AsTelOS telescope status for known acceptable errors.
Analyzes telescope status messages to identify errors and determines if they are in the list of known acceptable errors that can be safely acknowledged.
- Parameters:
telescope (Any) – Telescope object with get() method for status commands.
close (bool) – Whether to include slit closure errors in acceptable list.
- Returns:
Tuple[bool, pd.DataFrame, str] –
- Error analysis as (valid, errors, messages):
valid: True if all errors are acceptable, False otherwise
errors: DataFrame with columns [‘error’, ‘detail’, ‘level’, ‘component’]
messages: Raw telescope status message string
- astra.utils.astelos_errors.ack_error(telescope: Any, valid: bool, all_errors: DataFrame, messages: str, close: bool = False) Tuple[bool, str][source]#
Acknowledge acceptable AsTelOS telescope errors.
Attempts to clear acceptable telescope errors by sending appropriate acknowledgement commands. Continues until all errors are cleared or unacceptable errors are encountered.
- Parameters:
telescope (Any) – Telescope object with get() method for commands.
valid (bool) – Whether errors are acceptable (from check_error).
all_errors (pd.DataFrame) – Error information with ‘level’ column.
messages (str) – Original telescope status messages.
close (bool) – Whether to include slit closure errors as acceptable.
- Returns:
Tuple[bool, str] –
- Acknowledgement result as (success, final_messages):
success: True if all errors cleared, False if unacceptable errors remain
final_messages: Updated telescope status messages
- Raises:
TimeoutError – If error clearing takes longer than 2 minutes.