Baseline Correction Module
Baseline Correction Module
This module provides functions for baseline correction of signals using Asymmetrically Reweighted Penalized Least Squares (ARPLS) smoothing.
Functions
arpls_baseline
Baseline correction using ARPLS smoothing.
adaptive_arpls
Adaptive ARPLS baseline correction with noise estimation.
adaptive_arpls(y, lam=10000.0, ratio=0.05, itermax=100)
Adaptive ARPLS baseline correction with noise estimation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y |
array_like Input signal |
required | |
lam |
float, optional Initial smoothness parameter |
10000.0
|
|
ratio |
float, optional Asymmetry parameter |
0.05
|
|
itermax |
int, optional Maximum number of iterations |
100
|
Returns:
| Name | Type | Description |
|---|---|---|
baseline |
ndarray
|
ndarray The estimated baseline |
Source code in bline_correction/arpls_bline.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
arpls_baseline(y, lam=10000.0, ratio=0.05, itermax=100)
Baseline correction using Asymmetrically Reweighted Penalized Least Squares smoothing
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y |
array_like Input signal |
required | |
lam |
float, optional Smoothness Higher values make the baseline smoother. Typically 1e2 < lam < 1e7 |
10000.0
|
|
ratio |
float, optional Smaller values allow less negative deviations. |
0.05
|
|
itermax |
int, optional Maximum number of iterations |
100
|
Returns:
| Name | Type | Description |
|---|---|---|
baseline |
ndarray
|
ndarray The estimated baseline |
Source code in bline_correction/arpls_bline.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |