Protomix.solvent_residuals_removalΒΆ

solvent_residuals_removal(fid_df: DataFrame, lam: float = 1000000.0, returnSolvent: bool = False)[source]

Remove solvent residuals from the input FID (Free Induction Decay) data.

This function processes the input FID data to remove solvent residuals, which are unwanted signals typically present in NMR data. The function can also return the solvent residuals if specified.

Parameters:
  • fid_df (pd.DataFrame) – A DataFrame where each row represents an individual FID signal, and columns correspond to time points.

  • lam (float) – The regularization parameter used during the removal process. Defaults to 1e6.

  • returnSolvent (bool) – If True, the function returns both the corrected FID data and the solvent residuals. Defaults to False.

Returns:

If returnSolvent is False, returns a DataFrame with the corrected FID data. If returnSolvent is True, returns a tuple of two DataFrames: (corrected FID data, solvent residuals).

Return type:

pd.DataFrame or tuple of (pd.DataFrame, pd.DataFrame)