Release v0.3.0
Version 0.3.0 (2021-04-29)
This is a minor version with new features, bug fixes, deprecations,
and documentation improvements.
New Features
- Added the small-window moving average (swima) baseline to pybaselines.window,
which iteratively smooths the data with a moving average to eliminate peaks
and obtain the baseline. - Added the rolling_ball function to pybaselines.morphological, which applies
a minimum and then maximum moving window, and subsequently smooths the result,
giving a baseline that resembles rolling a ball across the data. Also allows
giving an array of half-window values to allow the ball to change size as it
moves across the data. - Added the adaptive_minmax algorithm to pybaselines.optimizers, which uses the
modpoly or imodpoly functions and performs polynomial fits with two different
orders and two different weighting schemes and then uses the maximum values of
all the baselines. - Added the Peaked Signal's Asymmetric Least Squares Algorithm (psalsa)
function to pybaselines.whittaker, which uses exponentially decaying weighting
to better fit noisy data. - The imodpoly and loess functions in pybaselines.polynomial now use
num_std
to specify the number of standard deviations to use when thresholding. - The pybaselines.polynomial.penalized_poly function now allows weights to be used.
Also made the default threshold value scale with the data better. - Added higher order filters for pybaselines.window.snip to allow for more
complicated baselines. Also allow inputting a sequence of ints for
max_half_window
to better fit asymmetric peaks.
Bug Fixes
- Fixed a bug that would not allow even morphological half windows,
since it is not needed for the half windows, only the full windows. - Fixed the thresholding for pybaselines.polynomial.imodpoly, which was incorrectly
not adding the standard deviation to the baseline when thresholding. - Fixed weighting for pybaselines.whittaker.airpls so that weights no longer
get values greater than 1. - Removed the append and prepend keywords for np.diff in the
pybaselines.morphological.mpls function, since the keywords
were not added until numpy version 1.16, which is higher than
the minimum stated version for pybaselines.
Other Changes
- Allow utils.pad_edges to work with a pad_length of 0 (no padding).
- Added a 'min_half_window' parameter for pybaselines.morphological.optimize_window
so that small window sizes can be skipped to speed up the calculation. - Changed the default method from 'aspls' to 'asls' for optimizers.optimize_extended_range.
Deprecations/Breaking Changes
- Removed the 'smooth' keyword argument for pybaselines.window.snip. Smoothing is
now performed if the given smooth half window is greater than 0. - pybaselines.polynomial.loess no longer has an
include_stdev
keyword argument.
Equivalent behavior can be obtained by settingnum_std
to 0.
Documentation/Examples
- Updated the documentation to include simple explanations for some techniques.