:py:mod:`convert_koenderink` ============================ .. py:module:: convert_koenderink Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: convert_koenderink.correlate_times Attributes ~~~~~~~~~~ .. autoapisummary:: convert_koenderink.chA convert_koenderink.chB convert_koenderink.chR convert_koenderink.chA convert_koenderink.chB convert_koenderink.chR convert_koenderink.part_group .. py:function:: correlate_times(abstimes1, abstimes2, window=500.0, binsize=0.5) 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: ---------- abstimes1 : 1D array absolute times for channel 1 in ns abstimes2 : 1D array absolute times for channel 2 in ns difftime : float time difference between channels (ch. 1 - ch. 2) in ns window : float time window for correlation in ns binsize : float bin size for correlation histogram in ns Returns: -------- bins : 1D array correlation histogram bins corr : 1D array correlation histogram values events : 1D array difftimes used to construct histogram, returned in case rebinning is needed. .. py:data:: chA .. py:data:: chB .. py:data:: chR .. py:data:: chA .. py:data:: chB .. py:data:: chR .. py:data:: part_group