raman.interpolated_bl_correction

raman.interpolated_bl_correction(x, y, px, py=None, usedatay=True)

Remove a baseline obtained by interpolating a set of fulcrums.

Parameters:
  • x (array) – x-axis.
  • y (array) – Input spectrum, same shape as x. If y is a list or 2d-array of spectra, filter every spectrum.
  • px (array) –
    • If py != None: list of x-coordinates of interpolation points.
    • If py == None and usedatay == True: list of x-coordinates of interpolation points.
    • If py == None and usedatay == False: list of x- and y-coordinates of interpolation points in the form [x0, y0, x1, y1, x2, y2, ...].
  • py (array) – List of y-coordinates of interpolation points (optional).
  • usedatay (bool) – If True, use the y-data at px for py (default).
Returns:

Baseline corrected spectrum.