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.
# Uncomment the following line to display all figures when running the script
# directly with Python.
#
# scp.show()
Total running time of the script: (0 minutes 2.169 seconds)

