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
On 0.0.3, a new Mapper feature is added for handling mapped data. This example below creates a 4K video across a sweep of frequencies.
from ramanfitter.mapper import Mapper
here = os.path.abspath( os.path.dirname( __file__ ) )
fname = os.path.join( here, 'sample_map', 'sample.txt' )
MP = Mapper( file = fname, display_name = "Sample 1", output_path = os.path.join( here, 'sample_map' ), delimiter = ',', provided_img=img, makePlot=False, makeVideo=True, plotType='imshow', resolution = '4k')
Metadata
Release files for ramanfitter 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ramanfitter-0.0.3.tar.gz | 12.6 kB | Without provenance | Details for ramanfitter-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ramanfitter-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for ramanfitter-0.0.3-py3-none-any.whl |
Total release size: 24.6 kB
Release files / ramanfitter-0.0.3.tar.gz
| Download URL | ramanfitter-0.0.3.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc96d51254ee675849c356c95129b1098e47d365dfc381ba65a586651bf390c5
|
|
BLAKE2b-256 checksum How to use checksums |
eeae73c5c018bf55368e4c6b175a4b5f6bdd235134aa1a134ebaceb56a21b1cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / ramanfitter-0.0.3-py3-none-any.whl
| Download URL | ramanfitter-0.0.3-py3-none-any.whl |
|---|---|
| Size | 12.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0ba9e60b9145819c4312391ed01896e1ff54b28f71abe653aadecc719329619
|
|
BLAKE2b-256 checksum How to use checksums |
428841b13d17c8bd21f189714133b2e2c5a727f712b0d469f2ae98f3f39840e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for ramanfitter 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.