icecube.taxi_reader.data_processing.i3_converter module¶
This script is used to convert the raw data from TAXI into I3Files. It is made to work on the files tranfered from the Pole or at least on files with the same structure and naming conventions.
- icecube.taxi_reader.data_processing.i3_converter.generate_run_list(year)¶
Collects the run ids that occured during the given year and converts them into the time stamps that can be used for the I3EventHeader time which counts time into the current year, not the absolute time
- Parameters:
year – (
int
) year to get run ids from
- icecube.taxi_reader.data_processing.i3_converter.get_runid_from_time(timestamp, year)¶
Gets the corresponding run_id for the given I3EventHeader timestamp
- Parameters:
timestamp – the event time in the typical 1/10 ns into the year convention
year – calendar year corresponding to the timestamp
- icecube.taxi_reader.data_processing.i3_converter.get_serdes_delay(i3timestamp, trace_length, serdes_delay, serdes_timestamps, year)¶
This tells you how far from the end of the waveform the trigger was formed. This value is set by hand and stored in another location
- Parameters:
i3timestamp (icecube.dataclasses.I3Time) – time of the event
trace_length (int) – number of bins in the waveform
serdes_delay – List of the serdes delay times for each timestep
serdes_timestamps – List of the time corresponding to when the serdes delay value was set
year – Year corresponding to the i3timestamp
- Returns:
the serdes value
- icecube.taxi_reader.data_processing.i3_converter.get_soft_mask(timestamps)¶
The soft triggers are at fixed intervals. They are identified statistically based on the identical spacing between triggers.
- Parameters:
timestamps – A list of timestamps to be identified as soft or not (the more the better).
- Returns:
True if the timestamp corresponds to a soft trigger
- Return type:
np.array(bool)
- icecube.taxi_reader.data_processing.i3_converter.process_archive(tar_file, serdes_delay, serdes_timestamps, radio_i3path)¶
Data arrives from the Pole in a tarball. This function will untar the file, extract the corresponding contents, and make I3Files with the radio information. The files will be split into IC run IDs so that each tarball might produce several I3Files depending on it’s length
- Parameters:
tar_file – Name of the tarball to be extracted
serdes_delay – List of the serdes delay values
serdes_timestamps – List of the timestamps corresponding to the serdes delay values
- icecube.taxi_reader.data_processing.i3_converter.radio2i3(taxi_bin_filename, output_filename, serdes_delay=None, serdes_timestamps=None)¶
Reads in a .bin file (low-level output from TAXI) and parses it into an I3File including all the radio waveforms and meta-data about the triggers. Each .bin file is split up into files based on what IC run they overlap with.
- Parameters:
taxi_bin_filename (str) – Name of the .bin file to turn into an I3File
output_filename (str) – Name of the I3File to be output
serdes_delay (list) – Array holding the serdes delay settings corresponding to serdes_timestamps
serdes_timestamps (list) – Array holding the timestamps of what the serdes_delay values were changed
- icecube.taxi_reader.data_processing.i3_converter.split_bin(binary_file, max_size)¶
Split one binary file into several smaller ones to avoid hogging memory. Given that the files are 9 words per line, this should be a multiple of 9.
- icecube.taxi_reader.data_processing.i3_converter.untar_files(tar_file_name, temp_radio_path)¶
Opens the main tarball that gets sent over the JADE system. This tarball includes some meta data and an inner tarball with the actual physics data.
This makes a directory inside temp_radio_path with an ID extracted from tar_file_name. It extracts all the .bin files from all inner tarballs to this directory.