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
t1np.ndarray

Times of the first signal.

t2np.ndarray

Times of the second signal.

dtminfloat

Start of the time intervals (if not specified, start of the interval on which the correlation is define).

dtmaxfloat

End of the time intervals (if not specified, end of the interval on which the correlation is define).

nbinsminfloat

Minimum of points falling on each bin.

nffloat

How fast are the intervals divided.

Returns
tndarray

Time binning on which to compute the correlation.

dtndarray

Size of the bins defined by t

nbndarray

Number of points falling on each bin defined by t and dt.