gaps_online.io#
Work with telemetry and .tof.gaps files
Functions
|
|
|
Get the relevant telemetry data files for time period from a directory |
|
This allows to get binary data written by either liftof ('.tof.gaps') files or through the caraspace library ('.gaps'). |
|
Get the timestamp from a .gaps.tof file |
|
Get the timestamp from a .tof.gaps file |
|
|
|
Error checked unpack function for MergedEvents from telemetry packets |
- gaps_online.io.convert_ts_date_to_unix(datestring)#
- gaps_online.io.get_ts_from_toffile(fname)#
Get the timestamp from a .tof.gaps file
- # Arguments:
fname : Filename of .tof.gaps file
- gaps_online.io.get_ts_from_binfile(fname)#
Get the timestamp from a .gaps.tof file
- gaps_online.io.get_tof_binaries(run_id: int, data_dir='', ending='*.gaps') list[Path] #
This allows to get binary data written by either liftof ('.tof.gaps') files or through the caraspace library ('.gaps'). In case of data written by liftof, this is the data written in flight on the TOF CPU disks. For caraspace data, this is typically data merged after the fact.
- # Arguments:
run_id : TOF run id, as e.g. stated in the e-log
- # Keyword Arguments
- data_dirdirectory with a directory for the specific
run in it
- gaps_online.io.get_telemetry_binaries(unix_time_start, unix_time_stop, data_dir='/gaps_binaries/live/raw/ethernet')#
Get the relevant telemetry data files for time period from a directory
- # Arguments
unix_time_start : seconds since epoch for run start
unix_time_end : seconds since epoch for run end
- # Keyword Arguments
data_dir : folder with telemetry binaries ('.bin')
- gaps_online.io.grace_get_telemetry_binaries(unix_time_start, unix_time_stop, data_dir='/gaps_binaries/live/raw/ethernet')#
- gaps_online.io.safe_unpack_merged_event(pack: TelemetryPacket)#
Error checked unpack function for MergedEvents from telemetry packets
# Arguments:
- packTelemetryPacket, as for example from a telemetry binary file as
read by TelemetryPacketReader
- # Returns:
MergedEvent if successful False for unpacking errors or if the packet does not
have packet_type == TelemetryPacketType.MergedEvent