Note
Go to the end to download the full example code.
Denoising a 2D Raman spectrum
In this example, we use the denoise method to remove the noise from a 2D Raman
spectrum.
Import spectrochempy
import spectrochempy as scp
scp.set_loglevel("INFO")
Load and prepare the data
Select the useful spectral region:
Plot the original data:

Detrend for easier comparison:

Denoise with default parameters
The default ratio is 99.8:

Denoise with different ratios
Denoising increases the signal-to-noise ratio effectively but has limited
effect on cosmic ray spikes. Consider using despike methods for those.
This ends the basic example of denoising a 2D Raman spectrum. scp.show() # uncomment to show plot if running from a script sphinx_gallery_thumbnail_number = -1
Total running time of the script: (0 minutes 2.386 seconds)

