antibunching
Module for performing antibunching-type calculations.
Currently only performs simple second-order correlation. More advanced functionality might be added in the future.
Bertus van Heerden, University of Pretoria, 2023
Module Contents
Classes
Performs second-order correlation and stores the result. |
Attributes
- class antibunching.AntibunchingAnalysis(particle)[source]
Performs second-order correlation and stores the result.
Parameters:
- particlesmsh5.particle
particle object to perform analysis on.
- correlate_particle(difftime: float, window: float, binsize: float)[source]
Calculate second-order correlation for this particle.
Mainly a wrapper around static method correlate_times. Stores result in class attributes corr_bins, corr_hist and corr_events and sets has_corr to True.
Arguments:
- difftimefloat
time difference between channels (ch. 1 - ch. 2) in ns
- windowfloat
time window for correlation in ns
- binsizefloat
bin size for correlation histogram in ns
- static correlate_times(abstimes1, abstimes2, microtimes1, microtimes2, difftime=0.0, window=500.0, binsize=0.5)[source]
Calculate second-order correlation based on time-tagged time-resolved photon data.
The function is a simple nested loop that runs through every photon within a certain window and checks for coincidences. Each coincidence gets a relative time, which are all put in a histogram to get the second-order correlation. Before the calculation, the arrival times are corrected based on the difftime parameter, which accounts for possible delay between two TCSPC cards.
Arguments:
- abstimes11D array
absolute times for channel 1 in ns
- abstimes21D array
absolute times for channel 2 in ns
- microtimes11D array
micro times for channel 1 in ns
- microtimes21D array
micro times for channel 2 in ns
- difftimefloat
time difference between channels (ch. 1 - ch. 2) in ns
- windowfloat
time window for correlation in ns
- binsizefloat
bin size for correlation histogram in ns
Returns:
- bins1D array
correlation histogram bins
- corr1D array
correlation histogram values
- events1D array
difftimes used to construct histogram, returned in case rebinning is needed.