Skip to content Skip to sidebar Skip to footer

Baselineremoval Package For Background Fluorescence/noise Removal

I'm trying to use the BaselineRemoval package to remove background fluorescence from some Raman spectra. In the code documentation, it states the preferred format for the input as

Solution 1:

A simple for loop should do it.

df = pd.DataFrame(
    {'Patient': [1, 2, 3, 4, 5, 6],
     'Group': [1, 1, 1, 2, 2, 2],
     'Samples': [list(np.random.randn(3).round(2)) for i in range(6)]
    }
)

input_array = df['Samples']
polynomial_degree = 2

for row in input_array:
    print(BaselineRemoval(row).ModPoly(polynomial_degree))

Post a Comment for "Baselineremoval Package For Background Fluorescence/noise Removal"