find_abspeak_list

popurri.peakutils.find_abspeak_list(w, f, wlines, wlines_idx=None, method='custom', imin=None, imax1=None, imax2=None, returndf=True, verb=False)

Find the minimum peaks in the spectrum w, f closest to the wavelength positions in the list wlines.

Parameters:
w, f1d array-like
wlines1d array-like
wlines_idx1d array-like

Identifier for the lines in wlines. If lines in a pandas dataframe df, wlines=df[‘w’].values and wlines_idx=df.index

method{‘custom’, ‘find_peaks’}

Method used to locate the peaks in the spectrum w, f

imin, imax1, imax21d array-like

If minima already computed, can provide the indices with these arguments. I.e. imin indices of the minima in f, and imax1 and imax2 indices of the maxima closest to the minima.

returndfbool

Whether to return the data in a pandas dataframe or a dict.

Returns:
datadict or pandas dataframe

For each line in wlines, return the values of the origina lines in wlines, the index of the peak closest in imin, the pixel closest in w and the wavelenght of w corresponding to these indices.