signalEdges

fiducia.rawProcess.signalEdges(timesFrame, df, channels, sigmaMult=3, plot=False, prominence=0.1, width=10, avgMult=1)[source]

Determines locations and widths of peaks above the mean of the signal for each dante channel. Edges of the signal containing region are then obtained by moving sigmaMult peak widths away from the earliest and latest peaks. Returns these lower and upper bound edges of the signal containing region as a dataframe. These edges are useful for fitting and removing the background/hysteresis.

Parameters
  • timesFrame (pandas.core.frame.DataFrame) – A dataframe containing time axis values corresponding to signals in df.

  • df (pandas.core.frame.DataFrame) – A dataframe of corrected/calibrated dante signal measurements.

  • channels (list) – List of channels in df for which edges will be determined.

  • sigmaMult (float) – Multiplier factor by which the lower and upper bounds of the signal containing region are determined. The lower bound is determined by sigmaMult times the width of the earliest peak away from the earliest peak. The upper bound is determined by sigmaMult times the width of the latest peak away from the latest peak. Default is 3 for approximately 3*sigma away from each peak.

  • plot (bool) – Flag for plotting peak locations and widths. Default is False.

  • edgesFrame (pandas.core.frame.DataFrame) – Lower and upper bound edges of the signal containing region for each dante channel. The lower bound is in 0 index and the upper bound is in 1 index. The bounds are given in index coordinates and they have been rounded to the nearest point.

  • 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

Return type

edgesFrame

Notes

Examples