Rs-mrt-dau-utilities package
modules
rs_mrt_dau_utilities.ip_analysis
- rs_mrt_dau_utilities.ip_analysis.ipanalysis_init_dataframes() dict[str, DataFrame][source]
Initializes and returns a dictionary of empty Polars DataFrames for IP analysis.
- Returns:
A dictionary containing empty DataFrames for various categories.
- Return type:
dict
- rs_mrt_dau_utilities.ip_analysis.ipanalysis_parse_json_result(time: str, encoded_json_block: str) dict[source]
Processes a base64 block: - obtain the binary gzip string - decompress the gzip string - process the JSON message string by splitting it into individual JSON messages and parsing each message.
- Parameters:
time (str) – A string representing the time associated with the JSON messages.
encoded_json_block (str) – A base64 block who is a gzip string containing the JSON messages, separated by newline characters.
- Returns:
A dictionary containing the time and a list of parsed JSON messages.
- Return type:
dict
- rs_mrt_dau_utilities.ip_analysis.ipanalysis_parse_scpi_result(scpi_result: str) list[dict][source]
Processes a given SCPI result string by splitting it into sequences based on a time pattern and SCPI block.
- Parameters:
scpi_result (str) – A string containing the SCPI result data.
- Returns:
A list of dictionaries, each containing a time and a list of parsed JSON messages.
- Return type:
list
- rs_mrt_dau_utilities.ip_analysis.ipanalysis_parse_scpi_schema_result(schema_result: str) dict | None[source]
Parses the SCPI schema result string and extracts the JSON schema.
- Parameters:
schema_result (str) – A string containing the SCPI schema result.
- Returns:
A dictionary representing the parsed JSON schema, or None if the schema is not found or if there is an error in parsing.
- Return type:
dict
- rs_mrt_dau_utilities.ip_analysis.ipanalysis_update_dataframes(list_of_dfs: dict[str, DataFrame], message: dict) dict[str, DataFrame][source]
Updates the dictionary of Polars DataFrames based on the contents of a given message.
- Parameters:
list_of_dfs (dict) – A dictionary containing Polars DataFrames for various categories (ipanalysis_init_dataframes may be used to get the initial values).
message (dict) – A dictionary containing the message data to be processed.
- Returns:
The updated dictionary of Polars DataFrames.
- Return type:
dict
rs_mrt_dau_utilities.delay_meas
- rs_mrt_dau_utilities.delay_meas.extract_delay_from_log(log_file: str) dict[str, DataFrame][source]
Extract delay information from the centralservice.log file. This file is located in the following directory: /DATAUNIT/rohde-schwarz/log/DAU/centralservice.log The function parses the log file, extracts relevant data, and returns a dictionary containing Polars DataFrames. Each keys is a combination of the segments found (start-stop pairs) and the measurements found in one segment. - “1_1”: first segment (start-stop) and first meas_id - “1_2”: first segment (start-stop) and second meas_id - “2_1”: second segment (start-stop) and first meas_id - …