getPeaks¶
-
fiducia.rawProcess.
getPeaks
(timesFrame, df, channels, peaksNum=2, plot=False, prominence=0.1, width=10, avgMult=1)[source]¶ - 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) – 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.
peaksNum – Number of peaks to grab from peakIdxs. This function will grab just the N tallest peaks where N=peaksNum.
plot (bool) – Flag for plotting identified peaks, with prominences, and widths, overlaid with the corresponding dante signal, and the average dante signal.
peaksFrame (pandas.core.frame.DataFrame) – Returns a dataframe containing indices of the identified peaks sorted from the peak that occurs earliest in time to the latest in time.
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
peaksFrame
Notes
Examples