Bertin-fap / raman-hyperspectra-examples

Examples of use of the package raman_hyperspectra
MIT License
0 stars 0 forks source link

Product Name

Toolbox of utilities to read, process and visualize Raman spectra/hyperspectra

Installation

Run the following to install:

pip install raman_hyperspectra

Methods

Raman file reading :

Usage example

For more examples and usage, please refer to example-raman-hyperspectra.

read and plot a spectra/hyperspectra

import raman_hyperspectra as rhp

file = "C:\\my_modules_Python\\rhp_demo_files\\RENISHAW_1D_Si.txt"
da_sliced, da_sliced_interp, da, da_interp = rhp.read_RAMAN_RENISHAW_0D(file)
da_sliced_interp.plot()

file = "C:\\my_modules_Python\\rhp_demo_files\\Large Area Scan_000_Spec_As cut.txt"
da_sliced, da_sliced_interp, da_full_spectrum, da_full_spectrum_interp = rhp.read_RAMAN_WITEC_2D(file,200,1000)
da_sliced.sel(x=10,y=20).plot()

linebase correction

z_ials, z_base_ials = rhp.flatten_spectra(da,('ials',10_000,  0.01, 0.001))
z_als,z_base_als = rhp.flatten_spectra(da,('als',10_000, 0.001,20))
z_lin, z_base_lin = rhp.flatten_spectra(da,('linear',500,5))
z_top_hat,z_base_top_hat = rhp.flatten_spectra(da,('top hat',factor))

denoising of a spectrum

z_nrwt = rhp.smooth_spectrum (z, ("Savitzky-Golay",sg_length, sg_order) ) 
z_nrwt = rhp.smooth_spectrum (z, ("NRWT", decNum, wnane, mode, ratio_sigma), std ) 

PCA

hp.Raman_PCA(da_denoise, k_PCA = 6)

NMF

rhp.Raman_NMF(da_denoise, k_NMF = 6)

Release History

0.0.1

Meta

- François Bertin– francois.bertin7@wanadoo.fr
- Amal Chabli- 

Distributed under the MIT license

About the authors

- François Bertin now retired was an expert senior in nanocharacterization at CEA-LETI
- Amal Chabli is director of research in nanocharacterization at CEA-LITEN