tomtag.get_twofold_tags
tomtag.get_twofold_tags(tagsA, tagsB, sizeA, sizeB, tcc)
Count the number of entries of two arrays that fall within the coincidence window of eachother.
- Parameters
- tagsA: ndarray(dtype=int)
- timetags of the first channel.
- tagsB: ndarray(dtype=int)
- timetags of the second channel.
- sizeA: int
- number of timetags in the first channel.
- sizeB: int
- number of timetags in the second channel.
- tcc: int
- size of coincidence window, as multiple of tag precision.
- tagsA: ndarray(dtype=int)
- Returns
- coincidences: tuple
- The coinciding tags for each channel, in order.
- coincidences: tuple
Examples
>>> import tomtag as tt
>>> import numpy as np
>>> tagsA = np.array([12,679,1289,1487])
>>> tagsB = np.array([20,409,1279,1887])
>>> tcc = 15
>>>
>>> cc_tagsA, cc_tagsB = tt.get_twofold_tags(tagsA, tagsB, len(tagsA), len(tagsB), tcc)