straxen.plugins.gps_syncing package

Submodules

straxen.plugins.gps_syncing.gps_syncing module

class straxen.plugins.gps_syncing.gps_syncing.GpsSync[source]

Bases: OverlapWindowPlugin

Correct the event times to GPS time.

1. Finds the TTL GPS pulses coming into the AM from the gps module and their pairs coming from the module for the correspondent run. 2. Corrects the timestamp of all events by linearly interpolating between the previous and next sync pulses.

compute(aqmon_hits, events)[source]
compute_time_array(l_daq_sync, l_gps_sync, l_daq_evt)[source]

Function which computes for each event the corresponding GPS time.

Parameters:
  • l_daq_sync – Unix time ns timestamps for the recorded gps pulses

  • l_gps_sync – Unix time ns timestamps for the GPS truth.

  • l_daq_evt – Unix time ns timestamps for the events.

data_kind: Union[str, immutabledict, dict] = 'events'
depends_on: Union[str, tuple, list] = ('aqmon_hits', 'event_basics')
dtype: Union[tuple, np.dtype, immutabledict, dict] = [(('Start time since unix epoch [ns]', 'time'), <class 'numpy.int64'>), (('Exclusive end time since unix epoch [ns]', 'endtime'), <class 'numpy.int64'>), (('GPS absolute time [ns]', 't_gps'), <class 'numpy.int64'>)]
get_delay()[source]
get_window_size()[source]

Return the required window size in nanoseconds.

gps_channel = 801
gps_times_from_runid(run_id)[source]

Fetches the mongodb looking for the gps_sync collection for timestamps between the start and end times of a given run_id.

gps_truth_vicinity

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

load_aqmon_array(hits)[source]
load_gps_array()[source]

Function which load GPS time information from data base and converts timestamps back into nanoseconds unix time.

static match_gps_pulses_with_truth(gps_pulse_time, gps_truth_time, vicinity)[source]

Function which matches GPS truth from the file stored in the rundb with the corresponding GPS pulse recorded by the acquisition monitor.

Parameters:
  • gps_pulse_time – Unix ns timestamps corresponding to GPS pulse starts

  • gps_truth_time – Unix ns timestamps of the GPS pulses

  • vicinity – +/- vicinity in [s] for which GPS pulse is matched with GPS truth.

provides: Union[str, tuple, list] = ('gps_sync',)
setup()[source]

Hook if plugin wants to do something on initialization.

takes_config = immutabledict({'tpc_internal_delay': <straxen.config.url_config.URLConfig object>, 'gps_truth_vicinity': <straxen.config.url_config.URLConfig object>})
tpc_internal_delay

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

class straxen.plugins.gps_syncing.gps_syncing.GpsSyncDAQVeto[source]

Bases: GpsSync

Plugin which computes veto_intervals using GPS times.

Required to compute correctly total lifetime loss of experiment.

child_plugin = True
compute(aqmon_hits, veto_intervals)[source]
data_kind: Union[str, immutabledict, dict] = 'veto_intervals'
depends_on: Union[str, tuple, list] = ('aqmon_hits', 'veto_intervals')
provides: Union[str, tuple, list] = ('veto_intervals_gps_sync',)
class straxen.plugins.gps_syncing.gps_syncing.GpsSync_mv[source]

Bases: GpsSync

Computes absolute GPS time for mveto data.

adc_threshold_nim_signal

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

compute(raw_records_aux_mv, events_mv)[source]
data_kind: Union[str, immutabledict, dict] = 'events_mv'
depends_on: Union[str, tuple, list] = ('raw_records_aux_mv', 'events_mv')
dtype: Union[tuple, np.dtype, immutabledict, dict] = [(('Start time since unix epoch [ns]', 'time'), <class 'numpy.int64'>), (('Exclusive end time since unix epoch [ns]', 'endtime'), <class 'numpy.int64'>), (('GPS absolute time [ns]', 'time_sync_gps'), <class 'numpy.int64'>)]
static get_nim_edge(raw_records, threshold=500)[source]
gps_channel = 1084
provides: Union[str, tuple, list] = ('events_gps_mv',)
setup()[source]

Hook if plugin wants to do something on initialization.

takes_config = immutabledict({'tpc_internal_delay': <straxen.config.url_config.URLConfig object>, 'gps_truth_vicinity': <straxen.config.url_config.URLConfig object>, 'adc_threshold_nim_signal': <straxen.config.url_config.URLConfig object>})
class straxen.plugins.gps_syncing.gps_syncing.GpsSync_nv[source]

Bases: GpsSync

Computes absolute GPS time for nveto data.

adc_threshold_nim_signal

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

compute(raw_records_aqmon_nv, events_nv)[source]
data_kind: Union[str, immutabledict, dict] = 'events_nv'
depends_on: Union[str, tuple, list] = ('raw_records_aqmon_nv', 'events_nv')
dtype: Union[tuple, np.dtype, immutabledict, dict] = [(('Start time since unix epoch [ns]', 'time'), <class 'numpy.int64'>), (('Exclusive end time since unix epoch [ns]', 'endtime'), <class 'numpy.int64'>), (('GPS absolute time [ns]', 'time_sync_gps'), <class 'numpy.int64'>)]
epsilon_offset_nv_gps_pulse

Dispatch on URL protocol.

unrecognized protocol returns identity inspired by dasks Dispatch and fsspec fs protocols.

static get_nim_edge(raw_records, threshold=500)[source]
gps_channel = 813
provides: Union[str, tuple, list] = ('events_gps_nv',)
setup()[source]

Hook if plugin wants to do something on initialization.

takes_config = immutabledict({'tpc_internal_delay': <straxen.config.url_config.URLConfig object>, 'gps_truth_vicinity': <straxen.config.url_config.URLConfig object>, 'adc_threshold_nim_signal': <straxen.config.url_config.URLConfig object>, 'epsilon_offset_nv_gps_pulse': <straxen.config.url_config.URLConfig object>})

Module contents