NuRadioReco.utilities.variableWindowSizeCorrelation module

class NuRadioReco.utilities.variableWindowSizeCorrelation.variableWindowSizeCorrelation[source]

Bases: object

Module that calculates the correlation between a data trace and a template trace with variable window size

Methods

begin([debug, logger_level])

begin method

run(dataTrace, templateTrace, window_size[, ...])

run method

begin(debug=False, logger_level=0)[source]

begin method

initialize variableWindowSizeCorrelation

Parameters:
debug: boolean

if true, debug information and plots will be printed

logger_level: string or logging variable

Set verbosity level for logger (default: logging.NOTSET)

run(dataTrace, templateTrace, window_size, sampling_rate=3.2, return_time_difference=False)[source]

run method

calculate the correlation between to traces using a variable window size and matrix multiplication

Parameters:
dataTrace: array

full trace of the data event

templateTrace: array

full trace of the template

window_size: int

size of the template window, used for the correlation (should be given in units.ns)

sampling_rate: float

sampling rate of the data and template trace

return_time_difference: boolean

if true, the time difference (for the maximal correlation value) between the starting of the data trace and the starting of the (cut) template trace is returned (returned time is in units.ns)

Returns:
correlation (time_diff)