align

fiducia.rawProcess.align(timesFrame, df, channels, peaksNum=1, peakAlignIdx=0, referenceTime=1e-09, prominence=0.01, width=10, avgMult=1.5)[source]

Aligns dante signals based on peak finding.

Parameters
  • timesFrame (pandas.core.frame.DataFrame) – Time corresponding to df

  • df (pandas.core.frame.DataFrame) – Dataframe of dante signals. See loadCorrected().

  • channels (list) – A list of channels for which to apply analyis.

  • peaksNum (int) – Number of peaks to grab from peakIdxs. This function will grab just the N tallest peaks where N=peaksNum.

  • peakAlignIdx (int) – Picks which peak to align to. 0 is first peak, 1 is second peak in peaksFrame, etc.

  • referenceTime (float) – Time in s to which align peaks. Default is 1e-9 s or 1 ns.

  • prominence (float) – Prominence threshold for identifying peaks in scipy’s find_peaks().

  • width (int) – Width in index units for identifying peaks in scipy’s find_peaks().

  • avgMult (float) – Multiplicative factor for setting minimum intensity threshold for indentifying peaks in scipy’s find_peaks(). This is a multiple of the signal average.

Returns

timesAligned – Returns a dataframe of times corresponding to signals in df, such that the signals are now aligned to the given peak.

Return type

pandas.core.frame.DataFrame

Notes

Examples