Implementation of Modified polyfit method and IModPoly method for baseline removal
Project description
What is it?
Python package for baseline correction. It has below 2 methods for baseline removal from spectra.
-
Modpoly Modified multi-polynomial fit [1]
-
IModPoly Improved ModPoly[2], which addresses noise issue in ModPoly
We can use the python library to process spectral data through either ModPoly or IModPoly algorithm for baseline subtraction. The functions will return baseline-subtracted spectrum.
How to use it?
from BaselineRemoval import BaselineRemoval
input_array=[10,20,1.5,5,2,9,99,25,47]
polynomial_degree=2
baseObj=BaselineRemoval(input*array,polynomial*degree)
Modpoly_output=baseObj.ModPoly()
Imodpoly_output=baseObj.IModPoly()
print('Original input:',input_array)
print('Modpoly base corrected values:',Modpoly_output)
print('IModPoly base corrected values:',Imodpoly_output)
Original input: [10, 20, 1.5, 5, 2, 9, 99, 25, 47]
Modpoly base corrected values: [-1.98455800e-04 1.61793368e+01 1.08455179e+00 5.21544654e+00
7.20210508e-02 2.15427531e+00 8.44622093e+01 -4.17691125e-03
8.75511661e+00]
IModPoly base corrected values: [-0.84912125 15.13786196 -0.11351367 3.89675187 -1.33134142 0.70220645
82.99739548 -1.44577432 7.37269705]
Where to get it?
pip install BaselineRemoval
Dependencies
References
- Automated Method for Subtraction of Fluorescence from Biological Raman Spectra by Lieber & Mahadevan-Jansen (2003)
- Automated Autofluorescence Background Subtraction Algorithm for Biomedical Raman Spectroscopy by Zhao, Jianhua, Lui, Harvey, McLean, David I., Zeng, Haishan (2007)
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
BaselineRemoval-0.0.4.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file BaselineRemoval-0.0.4.tar.gz
.
File metadata
- Download URL: BaselineRemoval-0.0.4.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1c0da630b8612ae9dd57f09d7005309efaa5d6ad793d069349ba7a92211955f |
|
MD5 | 248920081a28a8b4a85d37262036ab5d |
|
BLAKE2b-256 | 8dfe85e001294f9ae1881a1cbd97c8de60d308b0dc017da7ad823ad1ef301988 |
File details
Details for the file BaselineRemoval-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: BaselineRemoval-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b636f08ebe5d1a539f49d245dd31eb927554f6af118e09c202c71d453d4bdb |
|
MD5 | 63f3e44a919503e30feb3424fa622699 |
|
BLAKE2b-256 | e5ab82f256382eb52adca318f238c756b4584563b15a5d2a5ac3ac93c84fc25f |