Protomix.negative_values_zeroing¶
- negative_values_zeroing(spectra_df: DataFrame) DataFrame[source]
Set all negative values in the spectra to zero.
This function processes a DataFrame of spectra, setting any negative values to zero while retaining the original structure and indexes of the DataFrame.
- Parameters:
spectra_df (pd.DataFrame) – A DataFrame where each row represents a spectrum, and columns correspond to spectral data points.
- Returns:
A DataFrame with the same structure as the input, but with all negative values replaced by zero.
- Return type:
pd.DataFrame