icecube.taxi_reader.taxi_tools module

icecube.taxi_reader.taxi_tools.antenna_tailor_stable(waveform, roi, wvf_len, n_traces=2)

Converts the non-contiguous taxi binary output into a time-ordered series that can be used for analysis

Parameters:
  • waveform (numpy.array) – array holding the waveform values, read in from the binary file. Should be shaped like either (n_traces x 4 x 1024) or (n_traces x 4096).

  • roi (int) – The region of interest indicator given from TAXI

  • wvf_len (int) – Length of one copy of the waveform (i.e. semi-cascaded=2048)

  • n_traces (int) – How many antenna channels are being calculated at once

Returns:

Array of size (n_traces x 4096)

Return type:

numpy.array

icecube.taxi_reader.taxi_tools.antenna_untailor_stable(waveform, roi, wvf_len, n_traces=2)

The inverse function of antenna_tailor_stable

Parameters:
  • waveform (numpy.array) – array holding the waveform values from an I3 file (or equivalent) Should be shaped like (n_traces x 4096).

  • roi (int) – The region of interest indicator given from TAXI

  • wvf_len (int) – Length of one copy of the waveform (i.e. semi-cascaded=2048)

  • n_traces (int) – How many antenna channels are being calculated at once

Returns:

Array of size (n_traces x 4 x 1048)

Return type:

numpy.array

icecube.taxi_reader.taxi_tools.cascadeing_check(filename)

Returns true if the DSR4s are set into cascading mode

icecube.taxi_reader.taxi_tools.convert_all_events_to_i3(eventData)

Converts all events from a parsed binary file into a python list of I3AntennaDataMaps, one for each event.

Parameters:

eventData – Waveform data formatted like the output of parse_bin_file() That is, a number array indexed with [event][antenna][waveform][bin]

Returns:

list of I3AntennaDataMap

icecube.taxi_reader.taxi_tools.convert_antenna_to_i3(waveforms)

Converts passed in waveforms for each channel to a I3AntennaChannelMap

Parameters:

waveforms – Waveform data formatted like [waveform][bin]

Returns:

An event’s data in an I3AntennaChannelMap

icecube.taxi_reader.taxi_tools.convert_event_to_i3(event)

Converts the raw data values, read from a binary file, into an I3AntennaDataMap

Parameters:

event – Waveform data formatted like [antenna][waveform][bin]

Returns:

An event’s data in an I3AntennaDataMap

icecube.taxi_reader.taxi_tools.get_antennas_per_taxi()
icecube.taxi_reader.taxi_tools.get_bitdepth()
icecube.taxi_reader.taxi_tools.get_channels_per_antenna()
icecube.taxi_reader.taxi_tools.get_clock_time_units()
icecube.taxi_reader.taxi_tools.get_delta_t()
icecube.taxi_reader.taxi_tools.get_n_events_from_file(taxifile, n)

Reads only n events from the passed in taxi_reader. File class so that we limit memory consumption

icecube.taxi_reader.taxi_tools.get_radtrace_from_waveform(waveform)

Converts a single waveform into a AntennaTimeSeries

Parameters:

waveforms – Amplitudes of a single waveform [bin]

Returns:

An AntennaTimeSeries

icecube.taxi_reader.taxi_tools.get_taxi_time_offset()
icecube.taxi_reader.taxi_tools.get_trace_length(filename)

Returns the length of cascaded trace in units of 1024 ns

icecube.taxi_reader.taxi_tools.get_volts_per_ADC_bin()
icecube.taxi_reader.taxi_tools.get_waveform_array(filename)

Directly extract the values from a given TAXI file

icecube.taxi_reader.taxi_tools.get_waveform_length()
icecube.taxi_reader.taxi_tools.get_waveforms_per_antenna()
icecube.taxi_reader.taxi_tools.get_waveforms_per_channel()
icecube.taxi_reader.taxi_tools.make_conversion_to_utc(filename)

A conversion needs to be made between the onboard clock on TAXI and the clock on the WR. This is done by interpolating between the timestamps of the WR and the corresponding readout time of the TAXI clock

Parameters:

filename – Name of the TAXI binary file to convert

icecube.taxi_reader.taxi_tools.multievent_trace_tailor(data, roi, wvf_lens)

Runs single_trace_tailor on all the passed in events. Fixes the ordering and waveform length based on the cascading mode.

Parameters:
  • data – A (NEvent x NAnt x NBuffer x WvfmLength) numpy array with the waveforms from many events. Usually this is (N x 3 x 8 x 1024) in size.

  • roi – A (NEvent x NAnt) numpy array with the ROI value for each of the readout waveforms Usually this is (N x 3).

  • wvf_len – A (NEvent x 1) numpy array with the readout length (in bins) of the waveforms i.e. the cascading mode

Returns:

Array of the tailored waveforms (see single_trace_tailor)

icecube.taxi_reader.taxi_tools.parse_bin_file(taxi_bin_filename, applyCorrections=True)

Parses the contents of the raw TAXI binary file. The data is stored in numpy arrays. Note that no unwrapping for the ROI values are applied here (see exception below). Occasionally, there is data which has been corrupted or bins are missing. In this case, amplitude values are stored as -1 to easily identify which are broken. Some corrections can be applied which aim to fix artifacts in the TAXI readout chain. The first is due to the individual capacitor offsets. The second is an artifact that occurs as a function of the bin number in the binary file.

Parameters:
  • taxi_bin_filename – Name of the TAXI binary file to be opened

  • applyCorrections – If True, the corrections described above are applied.

Explaination of types (first word in packets) for inditifying lines

  • 0x1000 - headers (event counter x2) (event length) (real time counter x 4) (DS4 ROI)

  • 0x3000 - timing (channel timing x 8)

  • 0x4000 - samples (ch0)(ch1)…(ch8)

  • 0x4010 - same as above for second drs4

  • 0x4100 - same as above for thrid drs4

  • 0xA000 - cascading (starting ch, chip1) (starting ch, chip2) (starting ch, chip3) (N/A) (ROI, chip1) (ROI, chip2) (ROI, chip3)

icecube.taxi_reader.taxi_tools.single_trace_tailor(waveform, roi, wvf_len)

Runs antenna_tailor_stable on all the passed in antennas. Fixes the ordering and waveform length based on the cascading mode.

Parameters:
  • data – A (NEvent x NAnt x NBuffer x WvfmLength) numpy array with the waveforms from many events. Usually this is (N x 3 x 8 x 1024) in size.

  • roi – A (NEvent x NAnt) numpy array with the ROI value for each of the readout waveforms Usually this is (N x 3).

  • wvf_len – A (NEvent x 1) numpy array with the readout length (in bins) of the waveforms i.e. the cascading mode

Returns:

Array of the tailored waveforms (see antenna_tailor_stable)

icecube.taxi_reader.taxi_tools.taxi_antenna_frame_name()