Time deltas

Determine time differences between coincident events

Determine time delta between coincidence events from station pairs.

Example usage:

import datetime

import tables

from sapphire import download_coincidences
from sapphire import ProcessTimeDeltas

START = datetime.datetime(2015, 2, 1)
END = datetime.datetime(2015, 2, 5)

if __name__ == '__main__':
    with tables.open_file('data.h5', 'w') as data:
        download_coincidences(data, start=START, end=END)
        td = ProcessTimeDeltas(data)
class sapphire.analysis.time_deltas.ProcessTimeDeltas(data, coincidence_group='/coincidences', progress=True, destination='time_deltas')

Process HiSPARC event coincidences to obtain time deltas.

Use this to determine arrival time differences between station pairs which have coincident events.

Initialize the class.

  • data – the PyTables datafile.
  • coincidence_group – path to the coincidences group.
  • progress – if True show a progressbar while determining and storing offsets.
  • destination – group name for the time_deltas, as subgroup of the coincidence_group.

Find station pairs, determine time deltas, and store the results.


Determine time deltas for all pairs and store the results.


Find all unique station pairs which are in a coincidence together

Assumes the stations in the s_index are sorted by station number.


Retrieve the API detector_timing_offset method for all pairs

The detector_timing_offset methods accept a single timestamp as argument, and return the detector offsets for this timestamp.

determine_time_deltas_for_pair(ref_station, station)

Determine the arrival time differences between two stations.

Parameters:ref_station,station – station numbers.
Returns:extended timestamp of the first event and time difference, t - t_ref. Not corrected for altitude differences.
store_time_deltas(ext_timestamps, time_deltas, pair)

Store determined dt values