gen_times_canopy
- mutis.lib.gen_times_canopy(t1, t2, dtmin=0.01, dtmax=0.5, nbinsmin=500, nf=0.5)[source]
Returns a non-uniform t, dt time binning for use with adaptative binning methods.
This cumbersome algorithm does more or less the following: 1) Divides the time interval on which the correlation is defined in the maximum number of points (minimum bin size defined by dtmin). 2) Checks the number of point falling on each bin. 3) If there are several consecutive intervals with a number of points over nbinsmin, it groups them (reducing the number of points exponentially as defined by nf, if the number of intervals in the group is high, or one by one if it is low.) 4) Repeat until APPROXIMATELY we have reached intervals of size dtmax.
How the exact implementation works, I forgot! But the results are more or less nice…
- Parameters
- t1
np.ndarray Times of the first signal.
- t2
np.ndarray Times of the second signal.
- dtmin
float Start of the time intervals (if not specified, start of the interval on which the correlation is define).
- dtmax
float End of the time intervals (if not specified, end of the interval on which the correlation is define).
- nbinsmin
float Minimum of points falling on each bin.
- nf
float How fast are the intervals divided.
- t1
- Returns