postprocessor.core.multisignal.crosscorr.crosscorr

class crosscorr(parameters)[source]

Bases: PostProcessABC

Attributes
parameters

Methods

run(trace_dfA[, trace_dfB])

Calculates normalised cross-correlations as a function of lag.

as_function

default_parameters

Attributes
parameters

Methods

run(trace_dfA[, trace_dfB])

Calculates normalised cross-correlations as a function of lag.

as_function

default_parameters

__init__(parameters)[source]

Methods

__init__(parameters)

as_function(data, *extra_data, **kwargs)

default_parameters(*args, **kwargs)

run(trace_dfA[, trace_dfB])

Calculates normalised cross-correlations as a function of lag.

Attributes

parameters

run(trace_dfA, trace_dfB=None)[source]

Calculates normalised cross-correlations as a function of lag.

Calculates normalised auto- or cross-correlations as a function of lag. Lag is given in multiples of the unknown time interval between data points.

Normalisation is by the product of the standard deviation over time for each replicate for each variable.

For the cross-correlation between sA and sB, the closest peak to zero lag should in the positive lags if sA is delayed compared to signal B and in the negative lags if sA is advanced compared to signal B.

Parameters
trace_dfA: dataframe

An array of signal values, with each row a replicate measurement and each column a time point.

trace_dfB: dataframe (required for cross-correlation only)

An array of signal values, with each row a replicate measurement and each column a time point.

normalised: boolean (optional)

If True, normalise the result for each replicate by the standard deviation over time for that replicate.

only_pos: boolean (optional)

If True, return results only for positive lags.

Returns
corr: dataframe

An array of the correlations with each row the result for the corresponding replicate and each column a time point

lags: array

A 1D array of the lags in multiples of the unknown time interval