A Raman peak finder and model fitter
Project description
ramanfitter
This package seeks to provide and easy and efficient matter for fitting Raman data with Lorentzian, Gaussian, or Voigt models.
Developed by John Ferrier, NEU Physics (c) 2022
Quickstart Example
For a simple run,
import os
import numpy as np
from ramanfitter import RamanFitter
filename = os.path.join( 'path', 'to', 'data.csv' ) # Get File
data = np.genfromtxt( filename, delimiter = ',' ) # Open File
x = data[ :, 0 ] # Parse x-values
y = data[ :, 1 ] # Parse y-values
RF = RamanFitter( x = x, y = y, autorun = True ) # Run Fitter automatically
components = RF.comps # Returns a dictionary of each curve plot
curveParams = RF.params # Returns a dictionary of the parameters of each Lorentzian, Gaussian, or Voigt curve
bestFitLine = RF.fit_line # Returns the plot data of the model
For more control over parameters
import os
import numpy as np
from ramanfitter import RamanFitter
filename = os.path.join( 'path', 'to', 'data.csv' ) # Get File
data = np.genfromtxt( filename, delimiter = ',' ) # Open File
x = data[ :, 0 ] # Parse x-values
y = data[ :, 1 ] # Parse y-values
RF = RamanFitter( x = x, y = y, autorun = False ) # Run Fitter automatically
''' Each step ran when autorun = False '''
RF.NormalizeData()
RF.Denoise( ShowPlot = True )
RF.FindPeaks( showPlot = True )
RF.FitData( type = 'Voigt', showPlot = True )
components = RF.comps # Returns a dictionary of each curve plot
curveParams = RF.params # Returns a dictionary of the parameters of each Lorentzian, Gaussian, or Voigt curve
bestFitLine = RF.fit_line # Returns the plot data of the model
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ramanfitter-0.0.2.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file ramanfitter-0.0.2.tar.gz
.
File metadata
- Download URL: ramanfitter-0.0.2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fbaf3b9ee43ba994f14e9ab0dd1dc2f04fdddab48922036ef9df848c9f0e15a |
|
MD5 | fb52b8a0dab1a5e824285e56deeed4e7 |
|
BLAKE2b-256 | 139b9bed1ff266c57a970668c5a2fb2e524e7ccff0c948960e7ed8c9d110d7ec |
File details
Details for the file ramanfitter-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: ramanfitter-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4509e7cd984b9ae530dab1de386b2c7a3530f38db2b25000e7f92ac5afcb264 |
|
MD5 | a34ee1741af388330187bb9431af2c39 |
|
BLAKE2b-256 | 947609a3d8486a621e494fc4617900c7efcf47971701db89fdc706634b8f58fd |