tomtag.sync_to_clock
tomtag.sync_to_clock(tagsA, tagsB, sizeA, sizeB, tcc)
given a signal that was registered with an untrusted clock, if you have access to a trusted periodic signal registered with the same untrusted clock, you can make the adjust the tags, given this knowledge about the periodic signal.
- Parameters
- tags_signal: ndarray(dtype=int)
- Timetags of the first channel.
- tags_periodic: ndarray(dtype=int)
- Timetags of the second channel.
- size_signal: int
- Number of timetags in the first channel.
- size_periodic: int
- Number of timetags in the second channel.
- sync_period: int
- The period of the periodic signal, in integer multiples of the timetag precision.
- tags_signal: ndarray(dtype=int)
- Returns
- coincidences: list
- An array correspoding to the delays where each entry is the number of identified coincidences when the input tags where shifted by that specific delay.
- coincidences: list
Examples
>>> import tomtag as tt
>>> import numpy as np
>>> tagsA = np.array([12,679,1289,1487])
>>> tagsSync = np.array([20,409,879,1287])
>>> period = 400
>>>
>>> hist = tt.sync_to_clock(tagsA, tagsSync, len(tagsA), len(tagsSync), period)