Release Notes¶
Legend
: Features something new which could not be done before
: A change which improves the performance or memory usage.
: An improvement to a previously existing feature.
: Something which was not working as expected or leading to errors has been fixed.
: This will require changes in your scripts or code.
Release v1.1.4 - September 2024¶
: Expanded sophgrid to allow for closed phi integral. (#482)
: Removed Python 3.8 support and requires Numpy 2.0
Release v1.1.3 - July 2024¶
: Removes unnecessary files from the docs
: Improves the performance of the
dipolarkernelfunction by 10-30% (#473), by caching the interpolation of he effective dipolar evolution time vector.: Removes the
input from
and integrates its function into
.
: Adds support for Numpy 2.0
: Add support for Python 3.12
Release v1.1.2 - November 2023¶
Release v1.1.1 - August 2023¶
: Fixes an error in the
function. (#454)
Release v1.1.0 - August 2023¶
: The definition of the dipolar time axis for RIDME has changed to match the one for 4-pulse DEER (#436).
: The doc theme has moved to furo (#432).
: Fixes errors in documentation (#429).
Changes the file name of figures ‘modelling*.png` to
. To keep all spelling consistent with American english.
Adds a missing
in
Corrects the time axis in
example.
Corrects plotting in
example.
: Fixes an errors in tests (#429).
The test
test_algorithmshad an incorrect search range.
: Fixes an errors in the general Gaussian distribution model (#435).
: Removes the default font from the
function due to conflicts on some systems (#429).
: Methods of the
class are now defined with the class (#440).
class now in file
function now in file
: Added a RIDME example (#438).
: Masked data points are no-longer included in gof statistics in
.
Release v1.0.1 - March 2023¶
: Fixes some minor bugs in the documentation.
The file modelling_guide.rst is renamed to modeling_guide.rst to keep spelling consistency.
The “Simulating a two-pathway 5-pulse DEER signal” and “Simulating a three-pathway 4-pulse DEER signal” examples now run correctly.
: Fixes issues with CVXOPT in tests.
The testing will now use quadprog as the default solver. To account for the change tested values are now generated using the grid method
: Updates GitHub actions to use latest packages.
: Hardcodes out Python 3.11 support. This will remain until quadprog is fixed.
: Removes hard-wired RNG seeding
Release v1.0.0 - December 2022¶
Introduces multi-spin dipolar EPR spectroscopy models (#385).
Implements multi-spin models in
dipolarmodelby taking into account all possible two-spin an three-spin interaction pathways in a multi-pin system. Add a new optional argumentspinsto specify the number of spins in a molecule. From that number and thenpathwaysorexperimentarguments,dipolarmodelautomatically constructs the full set of multi-spin pathways (including permutations) within the pair-wise pathway factorization approximation. Adds a new keyword argumenttriangles, required forspins>3to specify triads of indices of interspin vectors that are connected forming a triangle (must be specified by the user since it defines the geometry of the spins system).Adds a new argument
specpermtodipolarmodel, to enable/disable the assumption of spectral permutability of the multi-spin system. This option allows to account for multi-spin system with chemically or spectrally different spin-1/2 centers.Adds and changes the optional argument
nKnotsindipolarkernelanddipolarmodeltogridsize. Changing the specification from knots to grid points allows a finer control of the computation costs due to the highly non-linear scaling of grid points with number of knots in a spherical grid.Implements a new utility function
sophegridto generate SOPHE grids based on a port of the Easyspinsphgridfunction.The multi-spin models in
dipolarmodelhave at the moment a hard-coded unimodal normal multi-variate distance distribution at its core. This could be adapted in the future to be modular to specify multi-modal distributions and other multi-variate basis functions.
Implements different parametrization strategies for dipolar EPR models (#409). Implements a new optional argument
parametrizationfordipolarmodel, which specifies the parametrization strategy of the dipolar pathway refocusing times. Can be one of the following:'reftimes'- Each refocusing time is represented individually as a parameter. The current behavior.'delays'`- The pulse delays are introduced as parameters from which the refocusing times are computed'shift'- A time shift is introduced as a parameter to represent the variability of the refocusing times from their theoretical values.
Expands the toolset for asserting the goodness-of-fit of model estimates robustly (#388).
Adds new option
goftoFitResults.plot()method to add plots to aid goodness-of-fit assessment. Besides the plot of the data and the model fit, now adds a plot of the residuals with its mean and noise level estimates shown as lines, a plot of the normalized residual histogram compared to the standard normal distribution, and a plot of the autocorrelation in the data along the confidence region expected from white noise.Adds a new quantity,
Residuals autocorr.to the results summary. The value of this quantity is computed asabs(2 - dDW), wheredDWis the Durbin–Watson statistic. It allows a quick assessment of the autocorrelation in the fit residuals. This quantity is also returned by thefitfunction asFitResults.stats['autocorr']Remove the AIC quantity specified for each dataset from the fit’s summary.
Add a new automatic system that colorizes the
chi2redandResiduals autocorr.values depending on their severity, indicating a wrong estimate. Yellow coloring alerts the user of potential failures and red of confidently wrong estimates.
Implements a new NNLS solver function
qpnnlsthat uses the Goldfarb/Idnani dual algorithm implemented in thequadprogpackage (#390). The resulting NNLS solver is more efficient than the current implementation withcvxoptwithout sacrificing any accuracy. Since NNLS problem-solving is the bottleneck of most applications of DeerLab, it results in a significant improvement in speed when analyzing any models with linear parameters. Since it substitutescvxoptas the default solver engine, it removes the hard dependency on thepackage and its issues related to the Apple M1 chip (#407).
Implements a new, more efficient evaluation of multi-pathway dipolar models based to greatly enhance the performance of dipolar EPR spectroscopy analyses (#393). Combined with the new NNLS solver, the analysis time of, e.g., 4-pulse and 5-pulse DEER multi-pathway models, has been reduced on average about 70-80%.
Improves the interface and definition of dipolar pathways in
dipolarmodel(#396).Labels the parameters of the different dipolar pathways included in
dipolarmodelvia theexperimentargument based on the pathway label numbers rather than numerically by order of specification.Harmonizes the pathway ordering of the
ex_rev5pdeerandex_fwd_5pdeermodels according to published literature.Adds new figures to the
ex_model functions to show the table of dipolar pathways along a schematic illustration of their intramolecular contributions. Improved the docstrings of theex_models in general.
Improves and expands the documentation (#397, #408).
Adds multiple new examples, fixes errors in existing ones.
Fixes several graphical bugs in the website.
Thoroughly documents all public and private functions in the code.
Adds release instructions for maintainers.
Adds a
Publicationspage to the documentation linking to all literature for concepts introduced by DeerLab.
Removes the subpackage
deerlab.utilsand makes its functions part of the main package for simpler maintenance (#408). Removes multiple unused private functions.
fit
The function now returns a full uncertainty quantification for the normalization factor of any model parameter with a normalization condition (#372).
Removes the automatic computation of the
modelUncertoutput containing the propagated uncertainty estimate of the model’s response (#401). This significantly speeds up the runtime of the function by disabling the automatic propagation of uncertainty to the model’s response which could take from several seconds to several minutes in complex models (#391).
dipolarkernel
Implements multi-spin dipolar pathways up to three-spin interactions (#385). The function takes now a list of distance vectors
[r1,r2,...,rQ]for multi-spin kernels.Expands the function to be able to account for arbitrary experimental time coordinates (#385). Now a list of time vectors
[t1,t2,...,tD]can be specified to construct a D-dimensional dipolar kernel.: Refactors most code in the function (#385). THe code should now be more logically ordered using mathematical symbols for clearer equations.
Introduces a new and clearer syntax for defining dipolar pathways (#385). Now, instead of specifying a list of pathways, where each pathway is a list of values (being the amplitude, refocusing time, and harmonic in that order), now pathways are specified as a list of dictionaries, e.g.
pathways = [{'amp':0.5}, 'reftime':0, 'harmonic':1].Adds a new optional argument
tinterpto construct a dipolar kernel for a pathway and interpolate other pathways from that one (#393).
dipolarbackground
Implements multi-spin dipolar pathways up to three-spin interactions (#385).
Expands the function to be able to account for arbitrary experimental time coordinates (#385). Now a list of time vectors
[t1,t2,...,tD]can be specified to construct a D-dimensional dipolar background function.Introduces the same new syntax for defining dipolar pathways as in
dipolarkernel(#385).
correctphase
Adds a new optional argument
offsetto enable a numerical optimization of the phase while accounting for a non-zero imaginary component offset (#392, #395).
snlls
Adds an optional argument
modeluqto enable /disable the model uncertainty propagation (#401).
Release v0.14.5 - December 2022¶
The distribution of DeerLab through Anaconda and its
condamanager has been deprecated as of this release (#400).Fix errors in the background function plots used in the examples showing 4-pulse DEER analyses.
fit
Expose the
coresoption ofbootstrap_analysisto parallelize bootstrap analysis from thefitfunction (#387).Correct behavior of masking during fitting (#394). When using the
maskoption of thefitfunction, certain steps such as noise estimation and goodness-of-fit assessment were not taking into account the mask during the analysis.
bootstrap_analysis
Fix error prompted when analyzing scalar variables (#402).
Release v0.14.4 - August 2022¶
The experiment model functions such as
ex_4pdeernow take an additional optional keyword argumentpulselengthto specify the longest durations of a pulse during an experiment. The value is then used to more accurately set the boundaries of refocusing time parameters in dipolar models (#368).The parameter table displayed when printing DeerLab models has been expanded to show the start values and the frozen values, if present (#369).
Added missing documentation for certain attributes of the
UQResultobjects related to the bootstrap and profile-likelihood methods (#360).Behavior of the documention on minimized browser windows and mobile phones (#365).
Multiple issues with the incorrect dark theming of the webpage (#359)
fit
Added multiple missing optional keyword arguments to the documentation of the function (#367).
dd_randcoil
Fixed the erronously switched descriptions of the model parameters (#361).
Release v0.14.3 - July 2022¶
Deprecated support for Python 3.6 and 3.7 (#353).
Added multiple quality of life improvements to the modelling system (#354).
Add new method
paramA.setas(paramB)forParameterobjects to copy the full metadata content fromparamBintoparamA.Expand the
FitResultsummary to report on the regularization parameter and penalty weights when used in the analysis.Improve the report of incorrect attribute requests in
FitResultobjects and provide close matches as suggestions.Improve the report of errors during the evaluation of
Modelobjects.
Fix bug in the
fitfunction unfreezing all frozen model parameters upon fitting if any model parameter included a normalization constraint (#348, #352).Corrected two minor mathematical errors in the physical background models
bg_homfractalandbg_homfractal_phase(#351).Fixed display of the online documentation in browsers with an enabled dark theme that made certain menus and text sections unreadable (#349, #350). The documentation will now default to a light theme even for dark themed browser.
Release v0.14.2 - June 2022¶
(Windows-systems only) Removed the unorthodox default installation procedure of DeerLab based on the installation of Numpy and related packages linked against MKL via the Gohlke repository (#322, #330).
As a result the default performance of DeerLab can be affected in some Windows systems. To link the Numpy and related packages against MKL as in previous versions, an automated script
upgrade_mkl.pyis provided with the package.Fixes the error appearing during installation if the
gitcommand was not installed or available in the system (#326).Allows the distribution of DeerLab as wheels.
Implemented better options for automated and user-supplied noise estimates to improve bootstrapping approaches (#334, #343).
Avoid the installation of (potentially unstable) pre-release versions of Numpy in systems with fresh Python installations (#336).
Improved the robustness of several function against non-numerical values due to division-by-zero errors (#335).
Corrected the behavior of regularization parameter selection with L-curve methods (#340). Fixes the
lcmethod inselgregparamwhich was seeking the optimal regularization parameter by minimizing curvature rather than by maximizing it. Prevents failure of the L-curve methods due to the appearance of non-numeric values when evaluating too large regularization parameter values.Fixes the error when specifying a limited excitation bandwidth in
dipolarmodelvia theexcbandwidthargument (#342).Fixes the navigation menu on the documentation that appeared empty on mobile phones or for partially minimized windows on computers, impeding navigation through the documentation (#346).
Minor corrections to the documentation and examples.
Release v0.14.1 - June 2022¶
Use Scipy’s
eighinstead of Numpy’s to avoid convergence errornumpy.linalg.LinAlgError: Eigenvalues did not convergeduring model uncertainty propagation (#310, #311).Refactored the code to avoid the use of
lambdaand nested functions. This enables pickling DeerLab’s objects with Python’spicklemodule without errors (#312).Added two new utility functions
store_pickleandread_picklethat implement pickling with thedillpackage to be more robust against potentiallambdafunctions defined by the users in scripts (#312).Fixed minor bug when printing fit results with many model parameters being frozen. The print command would return an error message (#329).
Fixed bug when propagating bootstrapped uncertainty in presence of round-off errors (#325).
Multiple minor improvements and corrections in the documentation.
Release v0.14.0 - April 2022¶
Overall changes
Complete overhaul of the DeerLab modeling and fitting interface. Check the new documentation for help and details. (#218, #223, #228, #237, #225, #243).
A new modeling system has been introduced. DeerLab main interface runs on a new
Modelobject class. Models implement and provide the distinction between linear and non-linear parameters.Model parameters are no longer (solely) identified by their indexing inside a parameter vector, but are referenced by name. This avoids the need for a user to recall the ordering of the parameters. This is now all handled internally. For example, before
paramA = parameters[idxA]is nowmodel.paramA.Any model parameter is accessible from the model object and its boundaries, start values and other properties can be easily modified. For example, to change the lower boundary of a parameter:
model.paramA.lb = 0.A new general
fitfunction that fits arbitraryModelobjects to single or multiple datasets has been implemented. The function automatically handles the selection of solvers to optimally fit the data to the model.Implemented a new function
linkto link model parameters (setting equality constraints in models).Implemented a new function
mergeto create a model returning more than one response (allowing the creation of global models).Implemented a new function
relateto define functional relationships between model parameters.Implemented a new function
lincombineto create a model whose response is a linear combination of the inputs’ model responses.Model parameters can now be frozen (set to a constant value and ignored during optimization) in the
Modelobject and on the back-endsnllssolver. For examples, to fix a parameter to a certain value:model.paramA.freeze(0.5).Arbitrary normalization conditions can be imposed to the linear parameters.
Bootstrapping can now be requested directly from the
fitfunction via thebootstrapkeyword argument. The function will then return the bootstrap uncertainty quantification of all model parameters and of the model’s response instead of the covariance-based uncertainty.Implemented a new function
dipolarmodel, which generates models based on the dipolar EPR multi-pathway theoretical model.Added new examples, adapted existing ones, and removed unneeded examples.
Add many new tests and removed tests related to deprecated functionality.
All the built-in parametric models are now pre-compiled
Modelobjects instead of just functions.The function
fitmodelhas been deprecated and removed. The original has been substituted (and greatly expanded) by the newdipolarmodelandfitfunctions.The function
fitmultimodelhas been deprecated and removed. The original functionality can be easily scripted with the new modeling system. An example of has been added, describing how to script the same functionality.
Introduced the profile-likelihood methodology both for uncertainty quantification based on likelihood-confidence intervals, and for identifiability analysis (#222).
Added a new function
profile_analysisto calculate the objective function profiles from model object parameters.Implemented a new uncertainty quantification
UQResultobject type'profile'for results obtained from profile_analysis.
Implemented a system to specify arbitrary penalty functions to be included in the non-linear part of the objective function during optimization. The penalties can be custom-defined and constructed into a
Penaltyobject that can be passed to thefitfunction. Outer optimization of the penalty weights can also be included based on certain information-based criteria (#197, #218, #225).Implemented a new object
Penaltythat includes the penalty function, weight parameter (and its boundaries), and the selection functional for optimization.Adds new outer optimization options for the penalty weights, based on hard-coded model selection functionals. For now, the ICC, AIC, AICc, and BIC functionals are available.
Implemented a new function
dipolarpenaltythat generates dipolar-EPR-specific penalties, e.g. to induce compactness and/or smoothness.
Implemented masking of datasets during optimization (#250).
Added a
verboseoption to display progress of the fit routines (#250).Added support for analyzing and fitting complex-valued models and data (#127, #218).
Orientation selection in dipolar signals can now be simulated for arbitrary orientation weights distributions via the
oriselkeyword argument in the newdipolarmodelor thedipolarkernelfunctions (#183, #203).Re-purposed the
ex_models. Each of these function represents a specific dipolar EPR experiment. These now take the experimental time delays as input, and return a newExperimentInfoobject. This can be passed todipolarmodelvia the optional keyword argumentexperimentto refine the boundaries and start values of the dipolar pathway refocusing times and amplitudes based on the experimental setup (#225).Implemented masking of datasets during optimization (#250).
Overhaul of the DeerLab documentation website (#235).
Full HTML/CSS overhaul. The new web design based on the PyData theme has a clearer design, with more readable pages and code blocks.
Deprecates the use of the RTD theme. This removes the hard constraint of using Sphinx 1.8.0. Now the documentation builds with the latest Sphinx release.
Add a user-guide for the new modeling and fitting system.
Re-organize all of the website content.
Improved the dipolar EPR starting guide, and adapted it to the new system.
Fixed some minor errors in the examples.
Redesigned all examples towards the use of actual experimental data files in BES3T format. Examples can now be taken and easily adapted by users to their experiment data files (#304).
Added the functionality to print a
FitResultobject to display a summary of the fit goodness-of-fit statistics and a table of all estimated parameters and their uncertainties (#234).Added a new keyword argument
regparamrangetosnllsandfitto specify the search range of the optimal regularization parameter (#225).Noise levels of the datasets can be optionally specified in all functions taking datasets (#213).
Added the option to include or exclude the edges of vector in
regoperatorvia a new keyword argumentincludeedges(#204). The default for all functions in DeerLab has been set toincludeedges=False(#205, #230).Generalized the regularization operator. Related functions no longer take
regorder(regularization operator order) as an argument. Instead they now takeregop(the full regularization operator) as an argument (#216).Generalized the regularized linear least-squares functionality. Now it can handle arbitrary bounds on linear parameters and adapts the linear LSQ solver back end accordingly (#216).
Improved performance of post-optimization model evaluation/propagation for large datasets (#200, #238).
Implemented (adaptable) memory limits for potentially memory-intense functions (#201, #239).
The function
correctscalehas been deprecated (#293). Its limited functionality is included in the now broader functionality provided by the new modeling and fitting system.The functions
fitregmodelandfitparamodelhave been deprecated and their core functionality merged intosnlls. Thesnllsfunction now handles any kind of least-squares problem and automatically employs optimal combinations of solvers to find the solution to the problems (#218).Renamed the function
bootantobootstrap_analysis(#227).Deprecated TV and Huber regularization. Accordingly the keyword arguments
regtype,huberparameterhave been removed throughout (#216).Deprecated the
nnlsbppNNLS solver (#231).Deprecated the
regparamrangefunction (#232). It depended on home-written code for the GSVD, which (as shown in previous issues) was prone to LAPACK backend problems and other bugs. This function was still a derelict from DeerAnalysis methodology.The function
time2disthas been renamed todistancerange(#273, #274).-The function
time2disthas been renamed todistancerange(#273, #274).The convergence control arguments of the fit functions have now been renamed for consistency with the
least_squaresfunction of the SciPy package (#296).Changed the name of the parameter
widthtostdin thedd_gauss,dd_gauss2,dd_gauss3, anddd_skewgaussmodels (#278, #280).When using the
multistartkeyword argument, no longer includes the parameter boundaries in the set of multiple start values (#218).Fixed error (manifesting as
nanvalues in the confidence intervals) caused by a division-by-zero in the covariance matrix estimation (#218).Fix encoding error during installation (#252). This error could disrupt the installation in OS with default encoding different from CP-1252.
Implement a new function to ensure that estimated Jacobians are positive semi-definite matrices. This fixes the appearance of warnings and bugs when calculating confidence intervals (#216).
Corrected the scale invariance behavior of the covariance-based uncertainty estimates (#218).
Fixed multiple
numpy.VisibleDeprecationWarningandRunTimewarnings (#207, #212).Corrected the math in the documentation of some distance distribution models (#215).
Corrected the behavior of dataset weights. These are no longer normalized at runtime and kept as specified by the users (#248, #250).
While testing, now skips a unit test if an error with the Tk backend of Matplotlib occurs (#211).
Fix multiple bugs and errors related to the new modeling and fitting system (#226, #233, #235, #241, #242, #244, #245, #246, #249).
Correct behavior of multistart optimization for one-sided parameter boundaries (#252).
Fix bug when globally fitting multiple datasets. The global weights were not being manipulated correctly in the estimation of the linear parameters leading to incorrect results (#302)
bootstrap_analysis
Added a new keyword argument
memorylimitto specify the maximal memory used by the bootstrap analysis (by default 8GB). If the total analysis is expected to exceed the memory limit, the function will abort the execution (#200, #238).
dipolarkernel
Added a new option
to request the complex-valued dipolar kernel to simulate the out-of-phase contributions to the dipolar signals (#258).
Added a new keyword argument
memorylimitto specify the maximal memory used by the dipolar kernel (by default 8GB). If the dipolar kernel is expected to exceed the memory limit, the function will abort the execution (#200, #238).Prompts error if wrong method is selected when specifying a limited excitation bandwidth (#181, #183).
bg_models
Implemented the time-dependent phase shifts for all the built-in physical background models, namely
bg_hon3d_phase,bg_hom3dex_phase, andbg_homfractal_phase(#258).Changed the implementation of
bg_hom3dex(#258). This avoids the use of tabulated pre-calculated values. Accordingly the utility functionscalculate_exvolume_redfactorandload_exvolume_redfactorhave been removed.Improved the implementation and behavior of the
bg_homfractalmodel (#258).
diststats
Fixed the behavior when dealing with distributions with arbitrary integral values
selregparam
Implemented a general LSQ solver as backend to adapt to different regularized optimization problem structures.
Generalized the linear least-squares solver. (#216).
In the
brentmode, the search range is no longer selected from the min/max ofregparamrangeoutput, but from a new keyword argumentsearchrangeset by default to[1e-8,1e2]. The default values were chosen as the statistical means of Monte-Carlo simulations of the min/max values ofregparamrange’s output for typical 4-pulse DEER kernels (#232).In the
gridmode, the grid-values are passed by the pre-existing keyword argumentcandidates. By default, if not specified, a grid will be generated from thesearchrangeargument (#232).
UQResult
Ensures non-negativity of estimated parameter uncertainty probability density functions.
Improve the behavior of
UQresult.propagate()for bootstrapped uncertainty results. Now, instead of propagating bootstrapped uncertainty via the estimated covariance matrix, the uncertainty is propagated by bootstrapping from the bootstrapped uncertainty distributions (#218).Fix behavior of the bootstrap median (#254).
Suppress multiple
DeprecationWarningwarnings during uncertainty calculations (#255).Fix error prompt when requesting private methods such as
__deepcopy__(#301, #303).
correctphase
Implement a fully vectorized analytical solution, resulting in a 30-150x speedup (#256, #279).
Eliminate the
phase='posrealint'andphase='negrealint'options (#279).
deerload
Raise warning instead of exception when parsing lines without key-value pairs (#256). This avoid errors when trying to load BES3T files with PulseSPEL scripts edited in different OS systems.
whitegaussnoise
Release v0.13.2 - July 2021¶
Overall changes
Fixed an error appearing during installation in Windows systems. If during installation a
pythonexecutable alias was not created, the call to thepipwinmanager returned an error and the installation failed to download and install Numpy, SciPy and CVXOpt (#187).Fixed the rendering of certain code-blocks in the documentation examples which were appearing as plain text (#179, #184).
Fixed the execution and rendering of the model examples in the documentation (#189, #190).
Fixed a bug in
snllswhere one of the linear least-squares solvers can return results that violate the boundary conditions due to float-point round-off errors (#177, #188).
Release v0.13.1 - May 2021¶
Overall changes
Fixed the behavior of global weights throughout DeerLab fit functions. The keyword argument
weightswas not having any or the expected effect in the results in some fit functions. Also fixes the behavior of built-in plots for global fits (#168, #171).Optimize default weights in global fitting according to the datasets noise levels (#169, #174).
Fixed a bug in
snllsthat was causing the confidence intervals insnlls,fitmodelandfitmultimodelto vanish for large signal scales (#165, #166).
deerload
Corrected a bug that happened in certain BES3T Bruker spectrometer files, when there are entries under the
MANIPULATION HISTORY LAYERsection at the end of the descriptor file. Also fixed the reading of.XGFpartner files (#164).
snlls
The keyword argument
extrapenaltynow requires a function that takes both non-linear and linear parameters. Corrected the name of the keyword in the documentation (#175).
fitparamodel
Fixed the scaling of the output
FitResult.modelandFitResult.modelUncert(#173).
ex_pseudotitration_parameter_free:
Removed
Ctotfrom second order term in thechemicalequalibriumpolynomial (#163).
Release v0.13.0 - April 2021¶
Overall changes
DeerLab is now distributed via the Anaconda repository and can be installed with the
condapackage manager (#12, #157). The installation instructions have been expanded to describe the Anaconda installation (#155).DeerLab now supports Python 3.9.
The function
fitsignalhas been re-named tofitmodelfor correctness and consistency with other functions (#102).Added new experiment models for RIDME on systems with one to seven harmonic pathways (S=1/2 to S=7/2) to include all higher harmonics (overtones) (#79).
Bootstrapping is now embedded into
fitmodelto automatically bootstrap all output quantities without the need to write additional script lines (#55). Infitmodela new optionuqallows to switch between covariance or bootstrapping uncertainty quantification (#88).The function
fitmodelnow returnsVmodandVunmod, the modulated and unmodulated contributions to the fitted dipolar signal, respectively, along their uncertainties as additional outputs (#78).Implemented several initialization strategies in
fitmultimodelfor multi-model components (#67). Three different new strategies'spread','split'and'merge'will initialize the parameter values of the N-component fit based on the results of the N-1/N+1 component fit to improve quality of results and speed.Added contribution guidelines to the documentation and automated list of DeerLab contributors.
The function
snllsnow accepts additional custom penalties to include in the optimization (#76, #112).All fit functions now return the fit of the data along its uncertainty automatically as part of the
FitResultobject(#130, #134).Implemented a new method
UQResult.join()to merge multiple uncertainty quantification objects (#154). This permits error propagation from multiple uncertainty sources to a common function.The performance of all fit functions has been considerably accelerated by removing call overheads in built-in DeerLab models (#100, #101, #143).
Improved robustness of the installation from PyPI (#65):
The installer no longer assumes the alias
pipto be setup on the system.The installation will now handle cases when system-wide privileges are not available (#52).
Improved robustness of the installation in Windows systems to avoid missing DLL errors (#64).
The installer will now get the latest Numpy/Scipy releases in Windows systems available at the [Gohlke repository](https://www.lfd.uci.edu/~gohlke/pythonlibs/).
Adapted piece of code leading to a
VisibleDeprecationWarningvisible during execution of certain DeerLab functions.Improved interface of built-in plots in
FitResult.plot(). The method now returns a Matplotlib figure object (matplotlib.figure.Figure) instead of an axes object (matplotlib.axes._subplots.AxesSubplot) which can be modified more freely to adjust graphical elements (#85). The method now takes an optional keywordFitResult.plot(show=True\False)to enable/disable rendering of the graphics upon calling the method (#87).The fit objective values returned in
FitResult.costare now correct (previous versions had an erroneous 1/2 factor) (#80). The value is now returned as a scalar value instead of a single-element list (#81).Removed the re-normalization conventions
K(t=0,r)=1andB(t=0)=1and associated optionsrenormalizeandrenormpathsin thedipolarkernelanddipolarbackgroundfunctions (#99) to avoid identifiability issues between dipolar pathway amplitudes and signal scales during fitting (#76).The fit convergence criteria
tol(objective function tolerance) andmaxiter(iteration limit) are now exposed as keyword argument in all fit functions (#111, #112).Multiple improvements and corrections to the documentation (#95, #96, #104, #106, #107, #115, #122)
Corrections in the metadata of multiple
dd_models. The keyParametersof some models contained the wrong names.The metadata of the built-in models is now accessible and manipulable via function attributes (e.g.
dd_gauss.parameters) rather than trought a returned dictionary (e.g.dd_gauss()['Parameters']) (#143).The keyword argument to request uncertainty quantification has been unified across all fitting functions. It is now
uq(#120).The
UncertQuantclass has been renamed intoUQResult(#123).Uncertainty quantification is now tested numerically against an external package (
lmfit) to ensue quality and accuracy(#121).Expanded the collection of examples in the documentation, and improved existing ones (#144, #148, #153).
deerload
Fixed behavior of the function when loading certain 2D-datasets in the BES3T format (#82, #83).
In 2D-datasets, the abscissas are now returned as a list of abscissas instead of a single 2D-matrix (#83).
fitmodel
Corrected the scaling behaviour of all outputs related to components of the dipolar signal to match the scaling of the original experimental data (#78).
The built-in plot method
FitResult.plot()now plots the unmodulated component fit as well with its uncertainty (#78).When plotting bootstrapped results with
FitResult.plot(), the fit is substituted with the median of the bootstrapped distribution (#148).Extended information included in the verbose summary (#78).
Simplified the interface for defining initial values and boundaries of parameters in
fitsignal(#71). Now instead of defining, e.g.,fitsignal(..., lb = [[],[50],[0.2, 0.5]])one can define the individual vales/boundariesfitsignal(..., bg_lb = 50, ex_lb = [0.2,0.5])by using the new keywords.Removed the keyword argument
uqanalysis=True/False. The uncertainty quantification can now be disabled via the new keyworduq=None(#98).Corrected the behaviour of built-in start values when manually specifying boundaries (#73). If the built-in start values are outside of the user-specified boundaries the program will now automatically set the start values in the middle of the boundaries to avoid errors (#72)).
Implemented the constraint
Lam0+sum(lam)<=1to ensure the structural-identifiability ofLam0andV0during SNLLS optimization of experiment models with more than one modulated dipolar pathway (i.e. does not affectex_4pdeer) (#76, #108).The function now accepts any sequence input (lists, arrays, tuples, etc.) instead of just lists (#152).
Removed the optional keyword argument
regtype(#137).Fixed a bug in the scaling of the distance distribution uncertainty quantification (#148).
fitregmodel
Corrected the behaviour of the uncertainty quantification when disabling the non-negativity constraint (#121).
fitparamodel
Made
par0a positional argument instead of an optional keyword (#70). to avoid errors when not defined (#69).Keyword argument
rescalehas been renamed tofitscale(#128, pr:).
snlls
Corrected bug that was leading to the smoothness penalty being accounted for twice in the least-squares residual during optimization (#103).
Now returns the uncertainty quantification of linear and nonlinear parts as separate objects
nonlinUncertandlinUncert(#108).Improved the covariance-based uncertainty analysis by including correlations between linear and non-linear parameters(#108).
Improved the behavior of signal scale determination (#108).
Enabled prescaling of the data to avoid scaling issues during uncertainty quantification (#132, #133).
Corrected the behaviour of the uncertainty quantification when disabling the regularization penalty (#121).
diststats
Now compatible with non-uniformly defined distance distributions (#92, #94)).
Added internal validation step to avoid non-sensical results when confounding the syntax (#91).
dipolarkernel
Now allows defining pathways without unmodulated components.
All optional keyword arguments can only be passed as named and not positional arguments (#138)).
The keyword
pathwaysnow only takes lists of pathways and not modulation depth parameters. A new separate keywordmodtakes the modulation depth parameter for the simplified 4-pulse DEER kernel (#118, #138).Renamed the background argument keyword
Bintobg(#138).
regparamrange
Implemented new CSD algorithm to avoid LAPACK library crashes encountered when using multiple DeerLab functions calling
regparamrangeinternally (#68).
correctphase
Release v0.12.2 - October 2020¶
Overall changes
Fit functions using the
multistartoption are now fully deterministic. The functions was using now a random generator to define the different start points, this is now deterministic.Documentation UI has been re-designed for a more confortable reading. Minor errors and outdated information have been corrected throughout. Expanded reference documentation of several functions for better understanding.
regparamrange
The exception handling introduced in the previous release was still too specific. The function kept crashing due to SVD non-convergence errors during the GSVD. This has been fixed and the error will not lead to a crash. (#42).
dd_skewgauss
Corrected an error in the implementation that was leading to wrong distributions (#61).
dd_models, ex_models
Adapted numerical boundaries and start values of some built-in models to reflect better the physical reality. Afected models:
dd_skewgauss,dd_triangle,dd_gengauss,ex_5pdeer,ex_ovl4pdeer.
Release v0.12.1 - October 2020¶
Overall changes
The calculation of the Jacobian for covariance-based uncertainty analysis has been simplified providing a significant boost in performance for all fit functions (#55).
The Jacobian computation is more robust, now taking into consideration parameter boundaries (#58). This solves errors such as the ones reported in (#50).
Broken examples in the documentation have been corrected (#57).
When requesting attributes or method of a UncertQuant object under disabled uncertainty analysis (
uqanalysis=False) now it will prompt an explanatory error instead of just crashing (#56).
fitsignal
Corrected the behaviour of the scaling output (
fit.scale). Now all fitted dipolar signals (fit.V) have the same scaling as the input signal (#53).
regparamrange
Relaxed the exception handling to catch errors occuring under certain conditions. The function seems to crash due to LAPACK or SVD non-convergence errors during the GSVD, now these are catched and the alpha-range is estimated using simple SVD as an approximation. This function might be deprecated in a future release (#42).
Release v0.12.0 - October 2020¶
Overall changes
Added new function
diststatsto calculate different statistical quantities of the distance distribution and their corresponding uncertainties (#37).Introduced the option
corestobootanparallelize the bootstrapping using multiple CPUs (#35).The regularization operator matrices
regoperatornow include the edges of the distribution (#38). Now the smoothness penalty is imposed on the distribution edges avoiding the accumulation of distribution mass at the edges ofr.The interface for defining dipolar pathways has been simplified (#41). For example, a signal with two dipolar pathways had to be defined as
pathways = [[Lam0,np.nan], [lam1,T0]]. Now the unmodulated pathway must be defined by its amplitude and does not accept the use ofnp.nan, e.g.pathways = [Lam0, [lam1,T0]].The project version control has been switched from the Git-flow to the GitHub-flow design. The default branch has been switched from
mastertomain, which is now always production-ready. All new contributions are merged intomainexclusively by pull requests.The dependency on the
lambdaparameter has been removed from all phenomenological background models, and kept only for physical models (#43). Their interface withdipolarbackgroundanddipolarkernelhave been updated accordingly.
bg_homfractal
Corrected behavior of the model. For
d=3the model returned wrong values, and ford~=3the model resulted in an error.
UncertQuant
Fixed bug when propagating uncertainty to scalar functions.
deerload
Fixed UTF-8 error when loading certain spectrometer files in MacOS (#30)
fitsignal
The fitted scale of the signal is now properly calculated when fitting fully parametric signals.
Fixed error occuring when fitting a dipolar evolution function with a non-parametric distribution.
selregparam
Fixed bug occuring when requesting the
lcorlrselection methods.
regparamange
An error occuring at the BLAS/LAPLACK error ocurring under certain conditions in MacOS and Ubuntu is now handled to avoid a crash.
Release v0.11.0 - September 2020¶
Overall changes
All Gauss models (
dd_gauss,etc.) now use the standard deviationsigmainstead of the FWHM as the width parameter for consistency with other method such as Rice distributions (#19).All hard-wired random seeds have been removed.
A new method
plot()has been added to theFitResultclass returned by all fit functions. This will create a basic plot of the fit results (#7).
snlls
Renamed option
penaltyasregand improved its interface (#13).The regularization parameter of the optimal solution is returned now (#20).
whitegaussnoise
Added a
seedoption to select static noise realizations.
correctzerotime
Fixed bug when zero-time is at start/end of array (#24).
Function no longer rescales the experimental data passed on to the function.
fitsignal
The regularization parameter of the optimal solution is returned now (#20).
Bug fixed when fitting dipolar evolution functions (no background and no experiment models) with a parametric distance distribution.
fitmultimodel
Start points are now spread over constrained parameter space grid instead of being randomble initiated(#22).
deerload
Now returns the time axis in microseconds instead of nanoseconds (#21).
The bug appearing when loading certain BES3T files has been fixed (#14).
fitregmodel
Now returns the fitted dipolar signal in the
FitResultoutput
correctscale
The parameter fit ranges have been adjusted.
Release v0.10.0 - August 2020¶
As of this version, DeerLab is based on Python in contrast to older versions based on MATLAB found [here](https://github.com/JeschkeLab/DeerLab-Matlab).
Overall changes
The following functions have been deprecated due to limited usability or due to functionality overlap with other DeerLab functions:
aptkernel,backgroundstart,fitbackground,paramodel, andtime2freq.All fit functions now return a single
FitResultoutput which will contain all results.All functions are now compatible with non-uniformly increasing distance axes.
All fit functions are completely agnostic with respect of the abolute values of the signal amplitude. This is automatically fitted by all function and return as part of the results.
Uncertainty quantification for all fit functions is returned as a
UncertQuantobject from which confidence intervals, parameter distributions, etc. can be generated generalizing the uncertainty interface for all DeerLab. Uncertainty can now be propagated to arbitrary functions.
fitparamodel
The functionality has been streamlined. Function now fits arbitrary parametric models using non-linear leas-squares without consideration of whether it is a time-domain or distance-domain model. The models no longer need to take two inputs (axis+parameters) and now only tk the parameters as input.
fitregmodel
Goodness-of-fit estimators are now computed using the proper estimation the degrees of freedom.
fitmultimodel
Added internal measures to avoid situations where one or several components are suppressed by fitting zero-amplitudes making the method more stable.
uqst
The uncertainty distributions of the parameters are now returned as properly normalized probability density functions.
fftspec
Frequency axis construction has been corrected.
regoperator
Now calculates the numerically exact finite-difference matrix using Fornberg’s method.
correctphase
Now can handle 2D-datasets.