lst_auto_rta.plot_line_delay.parse_line_subrun_dl1_events¶
- lst_auto_rta.plot_line_delay.parse_line_subrun_dl1_events(line_subrun_dl1_filename, run_id, line_idx, worker_node, nb_retries, re_try_wait_time)[source]¶
Read a DL1 file, to load the timestamps and event id information.
The separated timestamps_s and timestamp_qns are put back together to single datetime object (ns precision). The event_id diffs is also computed here, as the difference between the event id of an event with respect to the previous one. The first event is set to have an event_id_diff of 0. The “events from the future” are set a event_id_diff of 0, as well as the first event following an event from the future (because event ids of the event from the future are weird).
This function returns None if the file could not be read.
- Parameters:
line_subrun_dl1_filename (pathlib.Path) – Path to the dl1 file.
run_id (int) – Run ID of the events in the file. Written as field in the df.
line_idx (int) – Line number of the process that wrote this file. Written as field in the df.
worker_node (str) – Name of the worker node that processed the DL1 file to treat.
nb_retries (int) – Number of times to re-try opening a file in case of error.
re_try_wait_time (float) – Amount of time, in seconds, to wait before attempting to open a file again.
- Return type:
Pandas dataframe with the subrun event ids and timestamps (and line index, worker node).