Skip to content

Commit

Permalink
Release v0.14.4 (#370)
Browse files Browse the repository at this point in the history
* bumb version to v0.15.0-dev (#307)

* examples: fix identifiablity analysis grid values (#314)

* remove line that should be substituted by the subsequent GHA (#313)

* Use Scipy's `eigh` instead of Numpy's to avoid convergence error (#311)

* Use Scipy's eigh instead of Numpy's to avoid convergence error

* fix error

* Enable the pickling of DeerLab's objects  (#312)

* fix pickling of fit result objects

* add save and load utility functions for pickling, add test

* improve test

* fix pickling of model objects

* fix pickling of merged and linearly combined models

* fix pickling of model objects with linked parameters

* fix some tests

* fix pickling of model objects with functionalized parameters

- introduces the dill package as a dependency

* fix error

* improve docstrings and add to API reference

* rename save to store_pickle and load to load_pickle

add safety warning about reading pickles

* rename imports

* remove unused import

* fix another import error

* `docs`: add important note to user guide on experimental deadtime correction  (#320)

* Fix dependency of DeerLab's documentation logo on system fonts (#328)

* add specific web font of DeerLab's title font

* docs: make web logo independent of system fonts

* docs: minor CSS fixes

* fix minor bug when printing fit results with most parameters frozen (#329)

* Fix bug when propagating bootstrapped uncertainty in presence of round-off errors (#325)

* UQresult: expand join() method to work with bootstrapped results

* fix bug when propagating bootstrapped results with round-off errors

* docs: add docstring for evaluate and propagate methods (#321)

* docs: minor edits, CSS fixes, and one 404 fix (#331)

* docs: minor edits, CSS fixes, and one 404 fix

* add missing functions to reference

* minor edit and fix

* Remove hard dependency of the DeerLab's installation routine and scripts on MKL (#330)

* installation: remove hard dependency of installer on MKL 

- simplify setup.py
- update workflows 
- add new script for linking against MKL in Windows

* fixr random numerical error and warning during tests

* check failing tests

* CI workflow, do not use caching

* change Ci job names

* Avoid use of pre-release Numpy versions during installation (#336)

* setup.py: avoid installation of numpy pre-releases

* Fix randomly failing GHA WinOS workflow (#337)

* refactor CI workflow

* reintroduce MKL for GHA WinOS runners

* fix MKL upgrade script

* answer yes to uninstall

* Prevent potential future bugs when normalizing distributions throughout (#335)

* `bootstrap_analysis`: better noise estimation and add option to specify noise levels (#334)

* bootstrap_analysis: allow specifying noise levels

- otherwise estimate noise level from experimental dataset not from the fit residuals

* refactor bootstrap_analysis for more general and faster tests

* Fix automated upload to PyPI via token (#338)

* Correct behavior of L-curve selection methods (#340)

* selregparam: fix behavior of L-curve (LC method)  selection criterion

* selregparam: prevent `np.log(0)=np.inf ` cases in L-curve methods

* selregparam: remove useless line from a debugging stage

* Remove unused lines in `dipolarmodel` (#341)

* Fix apparent typo

* Remove unused lines

Co-authored-by: Luis Fabregas <luis.fabregas@phys.chem.ethz.ch>

* `dipolarmodel`: Fix error when specifying a limited excitation bandwidth (#342)

* dipolarmodel: fix bug when specifying the excitation bandwidth

* small fix

* fix logic error

* fit: properly pass the user-supplied noise level to the bootstrapping (#343)

* remove unused lines in example (#345)

* Fix documentation navigation menu on mobile phones and collapsed windows and other edits (#346)

* fix navigation menu on mobile phone and collapsed windows

* remove unnecessary navbar items

* remove non-existent references

* minor CSS fix

* docs: force light theme even in dark themed browsers (#350)

* fit: avoid unfreezing of all parameters when applying normalization (#352)

* Background models mathematical fixes (#351)

* bg_models: fix sign of background phase-shift's time-dependence

* add strong tests against numerical integration

* fix small mathematical errors in bg_homfractal models

* Fix scheduled CI test suite (#353)

* fix scheduled CI

- deprecate testing of Python 3.6 and 3.7
- add MKL linking to Windows
- fix pip installation errors

* fix typo in package name

* Modelling system quality of life improvements (#354)

* model: add method setas to import parameter metadata

* add hyperparameter info to results summary

* improve attribute request error messages in FitResult object

* improve error messaging during model evaluation

* Fix errors in GHA publishing workflow (#355)

* fix build and publish to PyPI and Anaconda

- deprecate conda support for python 3.6 and 3.7

* minor edit

* Minor edits to files edited in previous PRs (#356)

* fix minor logic error

* minor documentation update

* fix minor bug

* docs: fix theme package version to solve dark theme issues (#359)

* docs: fix theme package version to solve dark theme issues

* upgrade Python version in workflows

* use older Sphinx version to build for compatibility

* UQResults: add docstrings for undocumented attributes (#360)

* dd_randcoil: fix description of model parameters (#361)

* add chemistry travel award funding to support page (#364)

* Fix PyPI and Anaconda build and upload workflows (#363)

* fix PyPI build and upload workflow according to official Python docs

* fix GHA for conda build and upload

* docs: fix multiple CSS issues and flex container bugs (#365)

* bump VERSION to v0.14.4

* update the changelog

* `fit`: add missing arguments to docstring (#367)

* `dipolarmodel`: add `pulselength` optional argument to experiment models (#368)

* model: add start values and frozen values to the printed parameter table (#369)

* update changelog

Co-authored-by: edmundxcvi <59712516+edmundxcvi@users.noreply.github.com>
  • Loading branch information
luisfabib and edmundxcvi committed Aug 10, 2022
1 parent 11f4b1d commit 56856d9
Show file tree
Hide file tree
Showing 22 changed files with 484 additions and 202 deletions.
4 changes: 2 additions & 2 deletions .github/actions/conda_build_publish_package/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ build_package(){
done
for platform in "${PLATFORMS[@]}"; do
for filename in /$platform/*.tar.bz2; do
conda convert -p $platform linux-64/*.tar.bz2
conda convert /$platform/$filename -p $platform linux-64/*.tar.bz2 -o .
done
done
}
Expand All @@ -38,7 +38,7 @@ upload_package(){
export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN

for platform in "${PLATFORMS[@]}"; do
for filename in ./"$platform"/*.tar.bz2; do
for filename in ./$platform/*.tar.bz2; do
anaconda upload $filename
done
done
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy_ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Python 3.7
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.9
- uses: actions/cache@v2
with:
path: |
Expand All @@ -26,14 +26,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pydata-sphinx-theme
python -m pip install pydata-sphinx-theme==0.7.1
python -m pip install numpydoc
python -m pip install sphinx-gallery
python -m pip install sphinxcontrib-httpdomain
python -m pip install sphinxcontrib-ghcontributors
python -m pip install sphinx-issues
python -m pip install sphinx-copybutton
python -m pip install sphinx
python -m pip install sphinx==4.2
sudo apt install texlive-extra-utils
sudo apt-get install texlive-latex-extra
python -m pip install .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs_PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Python 3.7
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.7
python-version: 3.9
- uses: actions/cache@v2
with:
path: |
Expand All @@ -30,14 +30,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pydata-sphinx-theme
python -m pip install pydata-sphinx-theme==0.7.1
python -m pip install numpydoc
python -m pip install sphinx-gallery
python -m pip install sphinxcontrib-httpdomain
python -m pip install sphinxcontrib-ghcontributors
python -m pip install sphinx-copybutton
python -m pip install sphinx-issues
python -m pip install sphinx
python -m pip install sphinx==4.2
sudo apt install texlive-extra-utils
sudo apt-get install texlive-latex-extra
python -m pip install .
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/package_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install setuptools --user
python -m pip install build --user
python -m pip install twine --user
- name: Build distribution
run: |
python setup.py sdist
./setup.py bdist_wheel --user
python-version: "3.10"
- name: Install pypa/build
run: >-
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: >-
python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.14.3
v0.14.4
19 changes: 17 additions & 2 deletions deerlab/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,34 @@ class UQResult:
type : string
Uncertainty quantification approach:
* 'covariance' - Covariance-based uncertainty analysis
* 'bootstrap' - Bootstrapped uncertainty analysis
* ``'covariance'`` - Covariance-based uncertainty analysis
* ``'bootstrap'`` - Bootstrapped uncertainty analysis
* ``'profile'`` - Likelihood profile uncertainty analysis
* ``'void'`` - Empty uncertainty analysis
mean : ndarray
Mean values of the uncertainty distribution of the parameters.
median : ndarray
Median values of the uncertainty distribution of the parameters.
std : ndarray
Standard deviations of the uncertainty distribution of the parameters.
covmat : ndarray
Covariance matrix
nparam : int scalar
Number of parameters in the analysis.
samples : ndarray
Bootstrap samples of the parameters. Only available for ``type='bootstrap'``.
profile : ndarray
Likelihood profile of the parameters. Only available for ``type='profile'``.
threshold : scalar
Treshold value used for the profile method. Only available for ``type='profile'``.
Methods
-------
Expand Down
4 changes: 2 additions & 2 deletions deerlab/dd_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ def _randcoil(r,Nres,scaling,length):
dd_randcoil.description = 'Random-coil model for an unfolded peptide/protein'
# Parameters
dd_randcoil.Nres.set(description='Number of residues', lb=2.0, ub=1000, par0=50, unit='')
dd_randcoil.scaling.set(description='Segment length', lb=0.1, ub=0.4, par0=0.2, unit='nm')
dd_randcoil.length.set(description='Scaling exponent', lb=0.33, ub=1.00, par0=0.602, unit='')
dd_randcoil.scaling.set(description='Scaling exponent', lb=0.1, ub=0.4, par0=0.2, unit='nm')
dd_randcoil.length.set(description='Segment length', lb=0.33, ub=1.00, par0=0.602, unit='')
# Add documentation
dd_randcoil.__doc__ = _dd_docstring(dd_randcoil,notes) + docstr_example('dd_randcoil')

Expand Down
55 changes: 40 additions & 15 deletions deerlab/dipolarmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ def Vnonlinear_fcn(*nonlin):
for n in range(npathways):
getattr(DipolarSignal,reftime_names[n]).set(
par0 = experiment.reftimes[n],
lb = experiment.reftimes[n] - 0.05,
ub = experiment.reftimes[n] + 0.05
lb = experiment.reftimes[n] - 3*experiment.pulselength,
ub = experiment.reftimes[n] + 3*experiment.pulselength
)

# Set other dipolar model specific attributes
Expand Down Expand Up @@ -337,15 +337,16 @@ class ExperimentInfo():
r"""
Represents information about a dipolar EPR experiment"""

def __init__(self,name,reftimes,harmonics):
def __init__(self,name,reftimes,harmonics,pulselength):
self.npathways = len(reftimes)
self.reftimes = reftimes
self.harmonics = harmonics
self.pulselength = pulselength
self.name = name
#===============================================================================

#===============================================================================
def ex_3pdeer(tau, pathways=None):
def ex_3pdeer(tau, pathways=None, pulselength=0.016):
r"""
Generate a 3-pulse DEER dipolar experiment model.
Expand Down Expand Up @@ -375,6 +376,10 @@ def ex_3pdeer(tau, pathways=None):
Pathways to include in the model. The pathways are specified based to the pathways numbers.
By default, both pathways are included in the order given in the table above.
pulselength : float scalar, optional
Length of the longest microwave pulse in the sequence in microseconds. Used to determine the uncertainty in the
boundaries of the pathay refocusing times.
Returns
-------
experiment : ``ExperimentInfo`` object
Expand All @@ -394,11 +399,11 @@ def ex_3pdeer(tau, pathways=None):
reftimes = [reftimes[pathway-1] for pathway in pathways]
harmonics = [harmonics[pathway-1] for pathway in pathways]

return ExperimentInfo('3-pulse DEER',reftimes,harmonics)
return ExperimentInfo('3-pulse DEER',reftimes,harmonics,pulselength)
#===============================================================================

#===============================================================================
def ex_4pdeer(tau1, tau2, pathways=None):
def ex_4pdeer(tau1, tau2, pathways=None, pulselength=0.016):
r"""
Generate a 4-pulse DEER dipolar experiment model.
Expand Down Expand Up @@ -432,6 +437,10 @@ def ex_4pdeer(tau1, tau2, pathways=None):
Pathways to include in the model. The pathways are specified based to the pathways numbers.
By default, all 4 pathways are included in the order given in the table above.
pulselength : float scalar, optional
Length of the longest microwave pulse in the sequence in microseconds. Used to determine the uncertainty in the
boundaries of the pathay refocusing times.
Returns
-------
experiment : ``ExperimentInfo`` object
Expand All @@ -450,11 +459,11 @@ def ex_4pdeer(tau1, tau2, pathways=None):
reftimes = [reftimes[pathway-1] for pathway in pathways]
harmonics = [harmonics[pathway-1] for pathway in pathways]

return ExperimentInfo('4-pulse DEER', reftimes, harmonics)
return ExperimentInfo('4-pulse DEER', reftimes, harmonics, pulselength)
#===============================================================================

#===============================================================================
def ex_rev5pdeer(tau1, tau2, tau3, pathways=None):
def ex_rev5pdeer(tau1, tau2, tau3, pathways=None, pulselength=0.016):
r"""
Generate a reverse 5-pulse DEER dipolar experiment model.
Expand Down Expand Up @@ -494,6 +503,10 @@ def ex_rev5pdeer(tau1, tau2, tau3, pathways=None):
Pathways to include in the model. The pathways are specified based to the pathways numbers.
By default, all 8 pathways are included in the order given in the table above.
pulselength : float scalar, optional
Length of the longest microwave pulse in the sequence in microseconds. Used to determine the uncertainty in the
boundaries of the pathay refocusing times.
Returns
-------
experiment : ``ExperimentInfo`` object
Expand All @@ -512,12 +525,12 @@ def ex_rev5pdeer(tau1, tau2, tau3, pathways=None):
reftimes = [reftimes[pathway-1] for pathway in pathways]
harmonics = [harmonics[pathway-1] for pathway in pathways]

return ExperimentInfo('Reverse 5-pulse DEER',reftimes,harmonics)
return ExperimentInfo('Reverse 5-pulse DEER',reftimes,harmonics,pulselength)
#===============================================================================


#===============================================================================
def ex_fwd5pdeer(tau1, tau2, tau3, pathways=None):
def ex_fwd5pdeer(tau1, tau2, tau3, pathways=None, pulselength=0.016):
r"""
Generate a forward 5-pulse DEER dipolar experiment model.
Expand Down Expand Up @@ -557,6 +570,10 @@ def ex_fwd5pdeer(tau1, tau2, tau3, pathways=None):
Pathways to include in the model. The pathways are specified based to the pathways numbers.
By default, all pathways are included in the order given in the table above.
pulselength : float scalar, optional
Length of the longest microwave pulse in the sequence in microseconds. Used to determine the uncertainty in the
boundaries of the pathay refocusing times.
Returns
-------
experiment : ``ExperimentInfo`` object
Expand All @@ -575,11 +592,11 @@ def ex_fwd5pdeer(tau1, tau2, tau3, pathways=None):
reftimes = [reftimes[pathway-1] for pathway in pathways]
harmonics = [harmonics[pathway-1] for pathway in pathways]

return ExperimentInfo('Forward 5-pulse DEER', reftimes, harmonics)
return ExperimentInfo('Forward 5-pulse DEER',reftimes,harmonics,pulselength)
#===============================================================================

#===============================================================================
def ex_sifter(tau1, tau2, pathways=None):
def ex_sifter(tau1, tau2, pathways=None, pulselength=0.016):
r"""
Generate a SIFTER dipolar experiment model.
Expand Down Expand Up @@ -611,6 +628,10 @@ def ex_sifter(tau1, tau2, pathways=None):
Pathways to include in the model. The pathways are specified based to the pathways numbers.
By default, all 3 pathways are included and ordered as given in the table above.
pulselength : float scalar, optional
Length of the longest microwave pulse in the sequence in microseconds. Used to determine the uncertainty in the
boundaries of the pathay refocusing times.
Returns
-------
experiment : ``ExperimentInfo`` object
Expand All @@ -630,12 +651,12 @@ def ex_sifter(tau1, tau2, pathways=None):
reftimes = [reftimes[pathway-1] for pathway in pathways]
harmonics = [harmonics[pathway-1] for pathway in pathways]

return ExperimentInfo('SIFTER',reftimes,harmonics)
return ExperimentInfo('SIFTER',reftimes,harmonics,pulselength)
#===============================================================================


#===============================================================================
def ex_ridme(tau1, tau2, pathways=None):
def ex_ridme(tau1, tau2, pathways=None, pulselength=0.016):
r"""
Generate a RIDME dipolar experiment model.
Expand Down Expand Up @@ -668,6 +689,10 @@ def ex_ridme(tau1, tau2, pathways=None):
Pathways to include in the model. The pathways are specified based to the pathways numbers.
By default, all 4 pathways are included in the order given in the table above.
pulselength : float scalar, optional
Length of the longest microwave pulse in the sequence in microseconds. Used to determine the uncertainty in the
boundaries of the pathay refocusing times.
Returns
-------
experiment : ``ExperimentInfo`` object
Expand All @@ -687,5 +712,5 @@ def ex_ridme(tau1, tau2, pathways=None):
reftimes = [reftimes[pathway-1] for pathway in pathways]
harmonics = [harmonics[pathway-1] for pathway in pathways]

return ExperimentInfo('RIDME',reftimes,harmonics)
return ExperimentInfo('RIDME',reftimes,harmonics,pulselength)
#===============================================================================

0 comments on commit 56856d9

Please sign in to comment.