Repository navigation
Releases: florisvb/PyNumDiff
Release list
The Big One 🌊
A Great Leap Forward! The old call style and all the deprecation warnings and guards and tests that went with it have been fully removed, and I've had the excuse to make a few other backwards-compatibility-breaking changes.
- (breaking) interface improvements:
bandlimitin Hz replaces unitlesstvgammametricparameter dropped fromoptimizebecause error correlation is optimized by degenerately not smoothing at allspectraldiffnow has short-namedcutoff_freqto matchbutterdiff,pad_to_zero_dxdtrenamedpad_to_flat, andeven_extensionrenamedextensionnow taking a string- renamed
mean_kerneltouniform_kernel - renamed
step_sizetostridefor sliding window methods splinediffdropsnum_iterations, because it became inert after sensitivity of its other parametersto data scale was fixed last versionsolverdropped from convex solve methods, now depending on either OSQP or CLARABEL intentionally, so the user doesn't have to think about it
lineardiffis now mathematically leaner, faster, and easier to understand; it also elegantly handles missing and irregularly-spaced dataslide_functionnow takes samples from a window intunits, rather than some number of samples, which was risking shrunken window width in dense samples, allowing methods to fit noise*_kernelfunctions are now optionally sampleable at arbitrary locations in addition to supporting fixed gridswaveletdiffno longer commits the "wavelet crime" (now performing both denoising and differentiation in the basis), adds cycle-spinning for more reliable answers, can do adaptive decomposition depth, chooses hard thresholding over soft for less bias, and gets a more complete optimization search spacespectraldiffcan now perform odd extension, as well as detrending alone- new utilities:
robust_data_scaleandrobust_noise_scale - speed: gradients now given to
estimate_integration_constant's huber-branch SLSQP minimization;waveletdiffuses local FIR filters instead of sparse matrices or a global FFT - guards: time vectors must be strictly increasing;
waveletdiffrejects families that won't work - bugfixes: integer type can't accidentally truncate answers anymore;
polyfitfed mathematically-correct √kernel;robustdiffbetter handling for stiff cases, fewer warnings; rescaledfriedrichskernel to not go incredibly close to zero at edges, which could cause warnings
JOSS 2.0 in-review
A round of fixes and improvements prompted by JOSS review
- Methods no longer lose relative accuracy when data is rescaled; a test now enforces
f(a*x) == a*f(x) lineardiffnow supportsaxis, defaults toCLARABEL, and is fast enough to joinsuggest_methodand the optimization demo notebookrobustdiff's search space is leaner and faster, now thatlog_rhas a natural set point at 0optimizeno longer swallows warnings, which surfaced a batch of numerical bugs since fixed, including insplinediff,estimate_integration_constant, androbust_rme; also now usesstarmapfor speed, to make CPU usage less bursty- Windows are constrained and rounded to odd sizes in
optimize, because evenness silently degraded results; windows also now forced to touch or overlap so samples cannot be left uncovered between windows nor at the array tail - Missing values and variable timesteps now raise explanatory errors instead of often silently returning NaNs
- Dependency list corrected, with a few min versions added
- General hardening and bugfixes:
spectraldiffwavenumber indexing was off-by-one,rtsdiffno longer aliasies on circular domains;savgoldiffnow measures length along correct axis;butterdiffnow uses second-order sections;polydiffbounds window size against degree;waveletdiffno longer NaNs out at threshold 0;optimizenow has a test to ensure cache hash collisions in the case of duplicated queries; and methods that do not take variable step size or missing data nowValueErrorif given incompatible inputs, with messages about why
Joss 2.0 pre-review
- Added wavelet-based differentiation/smoothing method
- Added circular domain support for
rtsdiffvia custom innovation function to Kalman filter
Revamped++
Still further improvements to complete the overhaul:
- Multidimensional support: all non-deprecated methods (except
lineardiff) now have anaxisparameter. - Several methods have been updated to handle missing values.
robustdiffhas been updated to handle variabledtbetween data points while still running fast.
Revamped+
Further enhancements to the overhaul, including:
- collection of most methods in the
smooth_finite_differencemodule askerneldiff - convex optimization improvements to make
robustdiffrun in linear time - caching to avoid duplicate calls during optimization
- extension of utilities and loss function to better optimize all methods in the presence of outliers
- extension of TVR to better handle outliers
- improved test coverage and control of coveralls
- linted code
- added support for multidimensional data to several methods
Revamped
It's been Pavelized, everything combed through and rewritten. The biggest user-facing change is the support of (and preference for) keyword arguments, but methods have also been corrected, expanded, reorganized, extended to handle variable step sizes where possible, given better tests, integrated with improved optimization code, documented thoroughly, and been put through a head-to-head performance analysis. All while removing about 2000 lines of code to make it more readable, manageable, and understandable. Enjoy.
Final v0.1 checkpoint
Final tag and release before major overhaul.
PyNumDiff 0.1.2.4 JOSS
Final JOSS release with corrected author list.
PyNumDiff 0.1.2
Notable changes:
- Requires python >= 3.5, largely due to the deprecated numpy.matrix syntax
- New pi_cruise_control function
- No longer requires cvxpy and pychebfun for installation, though these are optionally required for certain functions
- Skip tests that require cvxpy and pychebfun if these are not installed