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
dipolarkernel
function 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_algorithms
had 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
dipolarmodel
by taking into account all possible two-spin an three-spin interaction pathways in a multi-pin system. Add a new optional argumentspins
to specify the number of spins in a molecule. From that number and thenpathways
orexperiment
arguments,dipolarmodel
automatically constructs the full set of multi-spin pathways (including permutations) within the pair-wise pathway factorization approximation. Adds a new keyword argumenttriangles
, required forspins>3
to 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
specperm
todipolarmodel
, 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
nKnots
indipolarkernel
anddipolarmodel
togridsize
. 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
sophegrid
to generate SOPHE grids based on a port of the Easyspinsphgrid
function.The multi-spin models in
dipolarmodel
have 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
parametrization
fordipolarmodel
, 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
gof
toFitResults.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)
, wheredDW
is the Durbin–Watson statistic. It allows a quick assessment of the autocorrelation in the fit residuals. This quantity is also returned by thefit
function asFitResults.stats['autocorr']
Remove the AIC quantity specified for each dataset from the fit’s summary.
Add a new automatic system that colorizes the
chi2red
andResiduals 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
qpnnls
that uses the Goldfarb/Idnani dual algorithm implemented in thequadprog
package (#390). The resulting NNLS solver is more efficient than the current implementation withcvxopt
without 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 substitutescvxopt
as the default solver engine, it removes the hard dependency on the package 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
dipolarmodel
via theexperiment
argument based on the pathway label numbers rather than numerically by order of specification.Harmonizes the pathway ordering of the
ex_rev5pdeer
andex_fwd_5pdeer
models 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
Publications
page to the documentation linking to all literature for concepts introduced by DeerLab.
Removes the subpackage
deerlab.utils
and 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
modelUncert
output 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
tinterp
to 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
offset
to enable a numerical optimization of the phase while accounting for a non-zero imaginary component offset (#392, #395).
snlls
Adds an optional argument
modeluq
to enable /disable the model uncertainty propagation (#401).
Release v0.14.5
- December 2022¶
The distribution of DeerLab through Anaconda and its
conda
manager 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
cores
option ofbootstrap_analysis
to parallelize bootstrap analysis from thefit
function (#387).Correct behavior of masking during fitting (#394). When using the
mask
option of thefit
function, 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_4pdeer
now take an additional optional keyword argumentpulselength
to 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
UQResult
objects 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)
forParameter
objects to copy the full metadata content fromparamB
intoparamA
.Expand the
FitResult
summary to report on the regularization parameter and penalty weights when used in the analysis.Improve the report of incorrect attribute requests in
FitResult
objects and provide close matches as suggestions.Improve the report of errors during the evaluation of
Model
objects.
Fix bug in the
fit
function 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_homfractal
andbg_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.py
is provided with the package.Fixes the error appearing during installation if the
git
command 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
lc
method inselgregparam
which 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
dipolarmodel
via theexcbandwidth
argument (#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
eigh
instead of Numpy’s to avoid convergence errornumpy.linalg.LinAlgError: Eigenvalues did not converge
during model uncertainty propagation (#310, #311).Refactored the code to avoid the use of
lambda
and nested functions. This enables pickling DeerLab’s objects with Python’spickle
module without errors (#312).Added two new utility functions
store_pickle
andread_pickle
that implement pickling with thedill
package to be more robust against potentiallambda
functions 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
Model
object 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
fit
function that fits arbitraryModel
objects 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
link
to link model parameters (setting equality constraints in models).Implemented a new function
merge
to create a model returning more than one response (allowing the creation of global models).Implemented a new function
relate
to define functional relationships between model parameters.Implemented a new function
lincombine
to 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
Model
object and on the back-endsnlls
solver. 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
fit
function via thebootstrap
keyword 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
Model
objects instead of just functions.The function
fitmodel
has been deprecated and removed. The original has been substituted (and greatly expanded) by the newdipolarmodel
andfit
functions.The function
fitmultimodel
has 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_analysis
to calculate the objective function profiles from model object parameters.Implemented a new uncertainty quantification
UQResult
object 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
Penalty
object that can be passed to thefit
function. Outer optimization of the penalty weights can also be included based on certain information-based criteria (#197, #218, #225).Implemented a new object
Penalty
that 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
dipolarpenalty
that generates dipolar-EPR-specific penalties, e.g. to induce compactness and/or smoothness.
Implemented masking of datasets during optimization (#250).
Added a
verbose
option 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
orisel
keyword argument in the newdipolarmodel
or thedipolarkernel
functions (#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 newExperimentInfo
object. This can be passed todipolarmodel
via the optional keyword argumentexperiment
to 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
FitResult
object 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
regparamrange
tosnlls
andfit
to 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
regoperator
via 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
correctscale
has been deprecated (#293). Its limited functionality is included in the now broader functionality provided by the new modeling and fitting system.The functions
fitregmodel
andfitparamodel
have been deprecated and their core functionality merged intosnlls
. Thesnlls
function 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
bootan
tobootstrap_analysis
(#227).Deprecated TV and Huber regularization. Accordingly the keyword arguments
regtype
,huberparameter
have been removed throughout (#216).Deprecated the
nnlsbpp
NNLS solver (#231).Deprecated the
regparamrange
function (#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
time2dist
has been renamed todistancerange
(#273, #274).- The functiontime2dist
has been renamed todistancerange
(#273, #274).The convergence control arguments of the fit functions have now been renamed for consistency with the
least_squares
function of the SciPy package (#296).Changed the name of the parameter
width
tostd
in thedd_gauss
,dd_gauss2
,dd_gauss3
, anddd_skewgauss
models (#278, #280).When using the
multistart
keyword argument, no longer includes the parameter boundaries in the set of multiple start values (#218).Fixed error (manifesting as
nan
values 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.VisibleDeprecationWarning
andRunTime
warnings (#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
memorylimit
to 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
memorylimit
to 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_redfactor
andload_exvolume_redfactor
have been removed.Improved the implementation and behavior of the
bg_homfractal
model (#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
brent
mode, the search range is no longer selected from the min/max ofregparamrange
output, but from a new keyword argumentsearchrange
set 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
grid
mode, the grid-values are passed by the pre-existing keyword argumentcandidates
. By default, if not specified, a grid will be generated from thesearchrange
argument (#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
DeprecationWarning
warnings 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
python
executable alias was not created, the call to thepipwin
manager 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
snlls
where 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
weights
was 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
snlls
that was causing the confidence intervals insnlls
,fitmodel
andfitmultimodel
to 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 LAYER
section at the end of the descriptor file. Also fixed the reading of.XGF
partner files (#164).
snlls
The keyword argument
extrapenalty
now 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.model
andFitResult.modelUncert
(#173).
ex_pseudotitration_parameter_free
:
Removed
Ctot
from second order term in thechemicalequalibrium
polynomial (#163).
Release v0.13.0
- April 2021¶
Overall changes
DeerLab is now distributed via the Anaconda repository and can be installed with the
conda
package manager (#12, #157). The installation instructions have been expanded to describe the Anaconda installation (#155).DeerLab now supports Python 3.9.
The function
fitsignal
has been re-named tofitmodel
for 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
fitmodel
to automatically bootstrap all output quantities without the need to write additional script lines (#55). Infitmodel
a new optionuq
allows to switch between covariance or bootstrapping uncertainty quantification (#88).The function
fitmodel
now returnsVmod
andVunmod
, the modulated and unmodulated contributions to the fitted dipolar signal, respectively, along their uncertainties as additional outputs (#78).Implemented several initialization strategies in
fitmultimodel
for 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
snlls
now 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
FitResult
object(#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
pip
to 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
VisibleDeprecationWarning
visible 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.cost
are 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)=1
andB(t=0)=1
and associated optionsrenormalize
andrenormpaths
in thedipolarkernel
anddipolarbackground
functions (#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 keyParameters
of 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
UncertQuant
class 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)<=1
to ensure the structural-identifiability ofLam0
andV0
during 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
par0
a positional argument instead of an optional keyword (#70). to avoid errors when not defined (#69).Keyword argument
rescale
has 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
nonlinUncert
andlinUncert
(#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
pathways
now only takes lists of pathways and not modulation depth parameters. A new separate keywordmod
takes the modulation depth parameter for the simplified 4-pulse DEER kernel (#118, #138).Renamed the background argument keyword
B
intobg
(#138).
regparamrange
Implemented new CSD algorithm to avoid LAPACK library crashes encountered when using multiple DeerLab functions calling
regparamrange
internally (#68).
correctphase
Release v0.12.2
- October 2020¶
Overall changes
Fit functions using the
multistart
option 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
diststats
to calculate different statistical quantities of the distance distribution and their corresponding uncertainties (#37).Introduced the option
cores
tobootan
parallelize the bootstrapping using multiple CPUs (#35).The regularization operator matrices
regoperator
now 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
master
tomain
, which is now always production-ready. All new contributions are merged intomain
exclusively by pull requests.The dependency on the
lambda
parameter has been removed from all phenomenological background models, and kept only for physical models (#43). Their interface withdipolarbackground
anddipolarkernel
have been updated accordingly.
bg_homfractal
Corrected behavior of the model. For
d=3
the model returned wrong values, and ford~=3
the 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
lc
orlr
selection 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 deviationsigma
instead 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 theFitResult
class returned by all fit functions. This will create a basic plot of the fit results (#7).
snlls
Renamed option
penalty
asreg
and improved its interface (#13).The regularization parameter of the optimal solution is returned now (#20).
whitegaussnoise
Added a
seed
option 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
FitResult
output
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
FitResult
output 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
UncertQuant
object 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.