- needed to position the dropdown content */
-.dropdown {
-position: relative;
-display: inline-block;
-}
-
-/* The container
- needed to position the dropdown content */
-.dropbtn {
-padding: 0 .5rem;
-color: rgba(var(--pst-color-navbar-link),1);
-}
-
-/* Dropdown Content (Hidden by Default) */
-.dropdown-content {
-display: none;
-position: absolute;
-background-color: #fff;
-box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
-z-index: 1;
-}
-
-/* Links inside the dropdown */
-.dropdown-content a {
-color: black;
-padding: 8px 12px;
-text-decoration: none;
-display: block;
-font-size: 15px;
-}
-
-.dropbtn::after {
-display: inline-block;
-margin-left: .255em;
-vertical-align: .255em;
-content: "";
-border-top: .3em solid;
-border-right: .3em solid transparent;
-border-bottom: 0;
-border-left: .3em solid transparent;
-}
-
-/* Change color of dropdown links on hover */
-.dropdown-content a:hover {
-background-color: var(--main-color-light);
-color: var(--main-color);
-font-size: 15px;
-}
-
-/* Show the dropdown menu on hover */
-.dropdown:hover .dropdown-content {
-display: block;
-}
-
-/* Change the background color of the dropdown button when the dropdown content is shown */
-.dropdown:hover .dropbtn {
-background-color: var(--main-color-light);
-color: var(--main-color);
-border-radius: 10px;
-text-decoration: none;
-}
-
-/* Hide the paragraph symbol next to each header*/
-h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink {
-visibility: hidden;
-}
-
-.sphx-glr-timing {
-margin-top: 50px;
-}
-
-@font-face {
-font-family: 'Berlin Sans FB';
-font-style: normal;
-font-weight: normal;
-src: local('Berlin Sans FB'), url('BRLNSR.woff') format('woff');
-}
-
-
-@font-face {
-font-family: 'Berlin Sans FB Bold';
-font-style: normal;
-font-weight: normal;
-src: local('Berlin Sans FB Bold'), url('BRLNSB.woff') format('woff');
-}
-
-.heading-style, h1 {
-
- margin: 2.75rem 0 1.05rem;
- margin-top: 0.75rem;
- font-family: "Berlin Sans FB";
- font-weight: 400;
- line-height: 1.15;
-}
-
-.topfloatcontainer {
- float: initial;
- display: flex;
- margin-top: -60px;
- margin-bottom: 25px;
-}
-
-.topfloatcontainer_title {
- float: initial;
- display: flex;
- margin-top: -60px;
- margin-bottom: 25px;
-}
-
-
-.illustration {
- width: 45%;
-}
-
-
-@media all and (max-width:1000px) /*800px for tablets and phones.*/
-{
- div.illustration{
- display: block;
- float: none;
- width: 90%;
- }
-
- .topfloatcontainer_title {
- float: initial;
- display: block;
- margin-top: -60px;
- margin-bottom: 25px;
- }
-
-}
-
-.title2 {
- font-size:65px; color:#4550e6;
- font-family: "Berlin Sans FB";
- margin-left:-0px
-}
-.h1:has(> .invisibletitle) {
- height: 0px
-}
-.version {
- font-size: 30px;
- color: #999b9e;
- font-family: "Berlin Sans FB";
- margin-left:5px
-}
-.title1 {
- font-size:65px;
- font-family: "Berlin Sans FB"
-}
-.col-xl-2 {
- flex: 0 0 20.667%;
- max-width: 20.667%;
-}
-.col-xl-8 {
- flex: 0 0 68.667%;
- max-width: 73.667%;
-}
-.titlep {
- margin-top: -100px;
- margin-bottom: -10px;
-}
-.invisibletitle {
- font-size:0px
-}
-.prev-next-area a.right-next {
- float: right;
- visibility: hidden;
-}
-.title {
- padding-top: 75px;
- padding-left: 22px;
- width:95%
-}
-
-
-img.math {
- vertical-align: middle;
- margin-top: 0;
- margin-bottom: 0;
-}
-
-div.gallery {
- margin: 5px;
- border: 1px solid #ccc;
- float: left;
- width: 180px;
- }
-
-div.gallery:hover {
- border: 1px solid #777;
-}
-
-div.gallery img {
- width: 100%;
- height: auto;
-}
-
-div.desc {
- padding: 15px;
- text-align: left;
-}
-
-.publications-float-container {
- border: 3px solid #fff;
- height: 300px;
- display: flex;
- padding-left: 30px;
-}
-
-.publications-float-child-left {
- width: 30%;
- float: left;
- padding: 20px;
- height: inherit
-}
-
-.publications-float-child-right {
- width: 70%;
- float: left;
- padding: 20px;
- height: inherit;
-}
-
-.download-publication {
- background-color: #4550e6;
- width: fit-content;
- padding: 5px 16px;
- color: #d2d5f9;
- border-radius: 37px;
- border-color: aqua;
- border: solid #d0d3f9;
- }
-
-.publication-title {
- font-weight: bold;
- padding-bottom: 10px;
- padding-top: 15px;
- font-size: 105%;
- line-height: normal;
- }
-
-.publication-metadata {
- padding-bottom: 30px;
-}
-
-.publication-image{
- margin-left: auto;
- margin-right: auto;
- display: block;
- height: 100%;
- width: auto;
-}
\ No newline at end of file
diff --git a/docsrc/source/changelog.rst b/docsrc/source/changelog.rst
index 7658140e7..1fa8c24db 100644
--- a/docsrc/source/changelog.rst
+++ b/docsrc/source/changelog.rst
@@ -1,5 +1,16 @@
.. _changelog:
+.. |feature| image:: https://img.shields.io/badge/Feature-28A744
+ :alt: feature
+.. |efficiency| image:: https://img.shields.io/badge/Efficiency-15A2B8
+ :alt: efficiency
+.. |enhancement| image:: https://img.shields.io/badge/Enhancement-5356E1
+ :alt: enhancement
+.. |fix| image:: https://img.shields.io/badge/Fix-DC3545
+ :alt: fix
+.. |api| image:: https://img.shields.io/badge/Api-C79502
+ :alt: api
+
--------------
Release Notes
@@ -24,19 +35,20 @@ Release ``v1.0.2`` - July 2023
- |fix| : Fixes an errors in tests (:pr:`429`).
- * The test `test_algorithms` had an incorrect search range.
+ * The test ``test_algorithms`` had an incorrect search range.
- |fix| : Fixes an errors in the general Gaussian distribution model (:pr:`435`).
- |fix| : Removes the default font from the `fit` function due to conflicts on some systems (:pr:`429`).
+
Release ``v1.0.1`` - March 2023
------------------------------------------
- |fix| : 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.
- *
+
- |fix| : 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
@@ -93,11 +105,13 @@ Release ``v1.0.0`` - December 2022
- |api| Removes the subpackage ``deerlab.utils`` and makes its functions part of the main package for simpler maintenance (:pr:`408`). Removes multiple unused private functions.
.. rubric:: ``fit``
+
- |enhancement| The function now returns a full uncertainty quantification for the normalization factor of any model parameter with a normalization condition (:pr:`372`).
- |efficiency| |api| Removes the automatic computation of the ``modelUncert`` output containing the propagated uncertainty estimate of the model's response (:pr:`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 (:issue:`391`).
.. rubric:: ``dipolarkernel``
+
- |feature| Implements multi-spin dipolar pathways up to three-spin interactions (:pr:`385`). The function takes now a list of distance vectors ``[r1,r2,...,rQ]`` for multi-spin kernels.
- |feature| Expands the function to be able to account for arbitrary experimental time coordinates (:pr:`385`). Now a list of time vectors ``[t1,t2,...,tD]`` can be specified to construct a D-dimensional dipolar kernel.
- |enhancement| : Refactors most code in the function (:pr:`385`). THe code should now be more logically ordered using mathematical symbols for clearer equations.
@@ -105,31 +119,37 @@ Release ``v1.0.0`` - December 2022
- |feature| |efficiency| Adds a new optional argument ``tinterp`` to construct a dipolar kernel for a pathway and interpolate other pathways from that one (:pr:`393`).
.. rubric:: ``dipolarbackground``
+
- |feature| Implements multi-spin dipolar pathways up to three-spin interactions (:pr:`385`).
- |feature| Expands the function to be able to account for arbitrary experimental time coordinates (:pr:`385`). Now a list of time vectors ``[t1,t2,...,tD]`` can be specified to construct a D-dimensional dipolar background function.
- |api| Introduces the same new syntax for defining dipolar pathways as in ``dipolarkernel`` (:pr:`385`).
.. rubric:: ``correctphase``
+
- Adds a new optional argument ``offset`` to enable a numerical optimization of the phase while accounting for a non-zero imaginary component offset (:issue:`392`, :pr:`395`).
.. rubric:: ``snlls``
+
- Adds an optional argument ``modeluq`` to enable /disable the model uncertainty propagation (:pr:`401`).
Release ``v0.14.5`` - December 2022
------------------------------------------
-- |fix| The distribution of DeerLab through Anaconda and its ``conda`` manager has been deprecated as of this release (:pr:`400`).
+- |fix| The distribution of DeerLab through Anaconda and its ``conda`` manager has been deprecated as of this release (:pr:`400`).
- |fix| Fix errors in the background function plots used in the examples showing 4-pulse DEER analyses.
.. rubric:: ``fit``
+
- |fix| Expose the ``cores`` option of ``bootstrap_analysis`` to parallelize bootstrap analysis from the ``fit`` function (:pr:`387`).
- |fix| Correct behavior of masking during fitting (:pr:`394`). When using the ``mask`` option of the ``fit`` function, certain steps such as noise estimation and goodness-of-fit assessment were not taking into account the mask during the analysis.
.. rubric:: ``bootstrap_analysis``
+
- |fix| Fix error prompted when analyzing scalar variables (:pr:`402`).
+
Release ``v0.14.4`` - August 2022
------------------------------------------
@@ -140,12 +160,15 @@ Release ``v0.14.4`` - August 2022
- |fix| Multiple issues with the incorrect dark theming of the webpage (:pr:`359`)
.. rubric:: ``fit``
+
- |fix| Added multiple missing optional keyword arguments to the documentation of the function (:pr:`367`).
.. rubric:: ``dd_randcoil``
+
- |fix| Fixed the erronously switched descriptions of the model parameters (:pr:`361`).
+
Release ``v0.14.3`` - July 2022
------------------------------------------
@@ -270,28 +293,34 @@ Release ``v0.14.0`` - April 2022
- |fix| 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 (:pr:`302`)
.. rubric:: ``bootstrap_analysis``
+
- |efficiency| 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 (:issue:`200`, :pr:`238`).
.. rubric:: ``dipolarkernel``
+
- |feature| Added a new option `complex` to request the complex-valued dipolar kernel to simulate the out-of-phase contributions to the dipolar signals (:pr:`258`).
- |efficiency| 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 (:issue:`200`, :pr:`238`).
- |fix| Prompts error if wrong method is selected when specifying a limited excitation bandwidth (:issue:`181`, :pr:`183`).
.. rubric:: ``bg_models``
+
- |feature| Implemented the time-dependent phase shifts for all the built-in physical background models, namely ``bg_hon3d_phase``, ``bg_hom3dex_phase``, and ``bg_homfractal_phase`` (:pr:`258`).
- |enhancement| Changed the implementation of ``bg_hom3dex`` (:pr:`258`). This avoids the use of tabulated pre-calculated values. Accordingly the utility functions ``calculate_exvolume_redfactor`` and ``load_exvolume_redfactor`` have been removed.
- |fix| Improved the implementation and behavior of the ``bg_homfractal`` model (:pr:`258`).
.. rubric:: ``diststats``
+
- |fix| Fixed the behavior when dealing with distributions with arbitrary integral values
.. rubric:: ``selregparam``
+
- |enhancement| Implemented a general LSQ solver as backend to adapt to different regularized optimization problem structures.
- |enhancement| Generalized the linear least-squares solver. (:pr:`216`).
- |enhancement| In the ``brent`` mode, the search range is no longer selected from the min/max of ``regparamrange`` output, but from a new keyword argument ``searchrange`` 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 of ``regparamrange``'s output for typical 4-pulse DEER kernels (:pr:`232`).
- |enhancement| In the ``grid`` mode, the grid-values are passed by the pre-existing keyword argument ``candidates``. By default, if not specified, a grid will be generated from the ``searchrange`` argument (:pr:`232`).
.. rubric:: ``UQResult``
+
- |fix| Ensures non-negativity of estimated parameter uncertainty probability density functions.
- |enhancement| 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 (:pr:`218`).
- |fix| Fix behavior of the bootstrap median (:pr:`254`).
@@ -299,13 +328,16 @@ Release ``v0.14.0`` - April 2022
- |fix| Fix error prompt when requesting private methods such as ``__deepcopy__`` (:issue:`301`, :pr:`303`).
.. rubric:: ``correctphase``
+
- |fix| Implement a fully vectorized analytical solution, resulting in a 30-150x speedup (:pr:`256`, :pr:`279`).
- |api| Eliminate the ``phase='posrealint'`` and ``phase='negrealint'`` options (:pr:`279`).
.. rubric:: ``deerload``
+
- |fix| Raise warning instead of exception when parsing lines without key-value pairs (:pr:`256`). This avoid errors when trying to load BES3T files with PulseSPEL scripts edited in different OS systems.
.. rubric:: ``whitegaussnoise``
+
- |api| Renamed the argument ``level`` to ``std`` for clarity (:pr:`276`).
- |api| Make the argument ``std`` a required positional argument and no longer provide a default value (:pr:`276`).
diff --git a/docsrc/source/conf.py b/docsrc/source/conf.py
index 7d08f462f..910cbe418 100644
--- a/docsrc/source/conf.py
+++ b/docsrc/source/conf.py
@@ -18,7 +18,7 @@
# Project details
project = 'DeerLab'
-copyright = '2019-2022, Luis Fábregas-Ibáñez, Stefan Stoll, and others'
+copyright = '2019-2023, Luis Fábregas-Ibáñez, Stefan Stoll, Hugo Karas and others'
author = 'Fabregas Ibanez'
language = 'en'
@@ -36,7 +36,8 @@
'sphinx.ext.autosummary',
'sphinx.ext.autodoc',
'sphinx_issues',
- 'sphinx_copybutton'
+ 'sphinx_copybutton',
+ 'sphinx_design'
]
# Configureation of Sphinx-Issues
@@ -99,7 +100,7 @@
# Setup template stuff
exclude_patterns = ['.', './functions']
numpydoc_show_class_members = False
-html_theme = "pydata_sphinx_theme"
+html_theme = "furo"
source_suffix = '.rst'
exclude_patterns = []
master_doc = 'index'
@@ -115,142 +116,22 @@
'version' : version,
"default_mode": "light",
}
-html_theme_options = {
- "navbar_start": ["navbar-logo"],
- "navbar_center": ["nav"],
- "navbar_end": ["search-field"],
-}
-html_sidebars = {
- "index": [],
- "modelsref": [],
- "reference": [],
- "_autosummary/**": [],
- "examples": [],
- "auto_examples/**": [],
- "auto_examples/**": [],
- "**": ["sidebar-nav-bs"],
- "page_sidebar_items": ["page-toc"],
-}
+
html_copy_source = False
html_theme_path = ["../.."]
html_show_sourcelink = True
html_favicon = '_static/favicon.ico'
html_static_path = ['_static']
+html_theme_options = {
+ "sidebar_hide_name": True,
+ "light_logo": "logo_docs.svg",
+ "dark_logo": "logo_docs_light.svg",
+}
-# Extensions to theme docs
-def setup(app):
- from sphinx.domains.python import PyField
- from sphinx.util.docfields import Field
- app.add_object_type(
- 'confval',
- 'confval',
- objname='configuration value',
- indextemplate='pair: %s; configuration value',
- doc_field_types=[
- PyField(
- 'type',
- label=_('Type'),
- has_arg=False,
- names=('type',),
- bodyrolename='class'
- ),
- Field(
- 'default',
- label=_('Default'),
- has_arg=False,
- names=('default',),
- ),
- ]
- )
-
-# These folders are copied to the documentation's HTML output
-html_static_path = ['_static']
-# Add path to custom CSS file to overwrite some of the default CSS settings
-html_css_files = [
- 'theme_override.css'
-]
-# Default role
default_role = 'math' # with this, :math:`\psi` can be written simply as `\psi`
html_title = 'DeerLab'
highlight_language = 'python'
primary_domain = 'py'
-html_logo = '_static/logo_docs_paths.svg'
-
-
-# Patch Code highlighting
-# --------------------------------------------------------
-# Import the pygments python library
-from pygments.style import Style
-from pygments.token import Keyword, Name, Comment, String, Error, Number, Operator, Generic, Text, Other, Comment, Whitespace
-
-class MyFancyStyle(Style):
- default_style = "default"
- styles = {
- Text: '#fff',
- Comment: '#6a737d',
- Keyword: '#d73a49',
- Operator.Word: '#d73a49',
- Name.Variable: '#dddee4',
- Name.Function: '#9065e2',
- Name.Class: '#0000FF',
- Name.Builtin: '#9065e2',
- Name.Attribute: '#9065e2',
- String: '#244679',
- Operator: '#005cc5',
- Number: '#0e56b1',
- }
-
-# Create patch for applying the style
-def pygments_monkeypatch_style(mod_name, cls):
- import sys
- import pygments.styles
- cls_name = cls.__name__
- mod = type(__import__("os"))(mod_name)
- setattr(mod, cls_name, cls)
- setattr(pygments.styles, mod_name, mod)
- sys.modules["pygments.styles." + mod_name] = mod
- from pygments.styles import STYLE_MAP
- STYLE_MAP[mod_name] = mod_name + "::" + cls_name
-
-pygments_monkeypatch_style("my_fancy_style", MyFancyStyle)
-pygments_style = "my_fancy_style"
-
-
-# Print the HTML code for the landing page with dynamically compiled version number
-string = f"""
-:raw-html:`
-
-

-
-
-
DeerLabDocs{version}
-
- DeerLab is a comprehensive free scientific software package for Python focused on modeling, penalized least-squares regression, and uncertainty quantification. It also provides specialized models and tools for the analysis of dipolar EPR (electron paramagnetic resonance) spectroscopy techniques such as DEER (double electron-electron resonance), and others.
-
-
-
Get started →
-
-
-
`
-"""
-string = re.sub('\s+',' ',string)
-rst_epilog = f"""
-.. role:: raw-html(raw)
- :format: html
-
-.. |title_version| replace:: {string}
-
-.. |fix| replace:: :raw-html:`
Fix`
-
-.. |efficiency| replace:: :raw-html:`
Efficiency`
-
-.. |enhancement| replace:: :raw-html:`
Enhancement`
-
-.. |feature| replace:: :raw-html:`
Feature`
-
-.. |api| replace:: :raw-html:`
API Change`
-"""
-
diff --git a/docsrc/source/dipolar_epr_guide.rst b/docsrc/source/dipolar_epr_guide.rst
deleted file mode 100644
index d349db961..000000000
--- a/docsrc/source/dipolar_epr_guide.rst
+++ /dev/null
@@ -1,13 +0,0 @@
-.. _dipolar_epr_guide:
-
-Dipolar EPR Guide
-============================================================
-
-This is the guide for dipolar EPR specific applications of DeerLab.
-
-.. toctree::
- :maxdepth: 2
-
- ./basics
- ./getting_started
- ./theory
\ No newline at end of file
diff --git a/docsrc/source/getting_started.rst b/docsrc/source/getting_started.rst
index 95238399a..7db78b76b 100644
--- a/docsrc/source/getting_started.rst
+++ b/docsrc/source/getting_started.rst
@@ -101,4 +101,3 @@ The correction is based on an optimization approach. This works well in most cas
Vexp = np.real(Vexp*np.exp(-1j*phase)) # manual phase correction
----------------
\ No newline at end of file
diff --git a/docsrc/source/index.rst b/docsrc/source/index.rst
index 138067e9f..4da26db28 100644
--- a/docsrc/source/index.rst
+++ b/docsrc/source/index.rst
@@ -1,95 +1,69 @@
-.. raw:: html
-
-
-
-.. role:: title1
-.. role:: title2
-.. role:: invisibletitle
-
-:invisibletitle:`DeerLabDocs`
---------------------------------
-
-|title_version|
-
-
-.. raw:: html
-
-
-
-
What is new?
-
Check the Release Notes for the changes introduced in the latest releases.
-
Learn more →
-
-
-
How to cite?
-
When you use DeerLab in scientific work, please cite the following publication
-
Publication →
-
-
-
Contributing
-
DeerLab is hosted on Github. Look at the contribution guidelines and how to report issues.
-
Contribute →
-
-
-
-
-.. include:: changelog.rst
- :start-after: Version
+
+DeerLab
+=========================================
-.. toctree::
- :hidden:
- :caption: User Guide
- ./user_guide
+.. image:: _static/landingpage.svg
+ :align: right
+ :width: 30%
+ :alt: DeerLab logo
+DeerLab is a comprehensive free scientific software package for Python focused on modeling, penalized least-squares regression, and uncertainty quantification. It also provides specialized models and tools for the analysis of dipolar EPR (electron paramagnetic resonance) spectroscopy techniques such as DEER (double electron-electron resonance), and others.
-.. toctree::
- :hidden:
- :caption: Advanced
+DeerLab's Key Applications
+-----------------------------------------
- ./advanced_guide
+- **Modeling** of dipolar EPR signals
+- **Uncertainty quantification** of dipolar EPR signals
+- **Multi-pathway** modeling support
+- **Comapactness criterion** to improve background selection
+- **Global fitting** of multiple datasets simultaneously
+- ... and much more!
+Getting Started with DeerLab
+-----------------------------------------
-.. toctree::
- :hidden:
- :caption: Examples
+We have a User Guide that explains how to install and use DeerLab. In addition, we have a set of examples that demonstrate how to use DeerLab for various applications, from basic to advanced.
- ./examples
+In addition, there is both a cheatsheet that can be downloaded and printed for quick reference, and a online workshop that covers the basics of DeerLab.
+.. grid:: 2
-.. toctree::
- :hidden:
- :caption: Models
+ .. grid-item-card:: Cheatsheet
+ :img-top: _static/CheatSheet_low.jpg
+ :link: https://github.com/JeschkeLab/DeerLabWorkshop2023/blob/main/CheatSheet.pdf?raw
- ./modelsref
+ .. grid-item-card:: Workshop 2023 @ EFEPR
+ :img-top: https://github.com/JeschkeLab/DeerLabWorkshop2023/blob/main/images/Title_slide.png?raw=true
+ :link: https://github.com/JeschkeLab/DeerLabWorkshop2023
.. toctree::
:hidden:
- :caption: Reference Index
+ :caption: User Guide
+ ./installation
+ ./user_guide
+ ./advanced_guide
+ ./examples
+ ./modelsref
./reference
+
.. toctree::
:hidden:
- :caption: Contributing
+ :caption: About
./contributing
+ ./changelog
+ ./license
+ ./publications
+ ./support
+ Github
+ Discussion Board
-.. toctree::
- :hidden:
- :caption: Release Notes
-
- ./changelog
.. Indices and tables
.. ==================
diff --git a/docsrc/source/publications.rst b/docsrc/source/publications.rst
index 7078ef291..169d50e6f 100644
--- a/docsrc/source/publications.rst
+++ b/docsrc/source/publications.rst
@@ -3,111 +3,103 @@
Publications
=========================
-.. raw:: html
+.. card:: Original publication of the DeerLab package
+ .. image:: ./_static/publications_mr_deerlab.png
+ :width: 25%
+ :align: right
- Original publication of the DeerLab package (old MATLAB version). If you publish results obtained with DeerLab, please cite
-
-
-
-
-
- DeerLab: a comprehensive software package for analyzing dipolar electron paramagnetic resonance spectroscopy data
-
-
- Luis Fábregas Ibáñez, Gunnar Jeschke, and Stefan Stoll
- Magn. Reson., 1, 209–224, 2020
- DOI: 10.5194/mr-1-209-2020
-
-
Download
-
-
-
- DeerLab's modeling, data analysis and dipolar EPR model capabilities are extensively described in
-
-
-
-
-
- Advanced Data Analysis and Modeling in Dipolar EPR Spectroscopy
-
-
- Luis Fábregas Ibáñez
- ETH Doctoral Dissertation Nr. 28808
- DOI: 10.3929/ethz-b-000585847
-
-
Download
-
-
-
- DeerLab's dipolar pathway models are implemented based on the following article
-
-
-
-
-
- Dipolar pathways in dipolar EPR spectroscopy
-
-
- Luis Fábregas Ibáñez, Maxx H. Tessmer, Gunnar Jeschke, and Stefan Stoll
- Phys. Chem. Chem. Phys., 2022,24, 2504-2520
- DOI: 10.1039/D1CP03305K
-
-
Download
-
-
-
-
- The following article describes the expansion of the dipolar pathways formalism to multi-spin systems (as implemented in DeerLab)
-
-
+ If you publish results obtained with DeerLab, please cite this paper.
+
+ **DeerLab: a comprehensive software package for analyzing dipolar electron paramagnetic resonance spectroscopy data**
+
+ Luis Fábregas Ibáñez, Gunnar Jeschke, and Stefan Stoll
+
+ Magn. Reson., 1, 209–224, 2020
+
+ DOI: 10.5194/mr-1-209-2020
-
-
- Dipolar pathways in multi-spin and multi-dimensional dipolar EPR spectroscopy
-
-
- Luis Fábregas-Ibáñez, Valerie Mertens, Irina Ritsch, Tona von Hagens, Stefan Stoll, Gunnar Jeschke
- Phys. Chem. Chem. Phys., 2022,24, 22645-22660
- DOI: 10.1039/D2CP03048A
-
-
Download
-
-
-
- The use of compactness regularization for analysis of dipolar EPR data as implemented in DeerLab is described in the following article
-
-
+ .. image:: https://img.shields.io/badge/Download-blue
+ :alt: Static Badge
+ :target: https://mr.copernicus.org/articles/1/209/2020/mr-1-209-2020.pdf
+
+.. card:: Dipolar pathways in dipolar EPR spectroscopy
+
+ .. image:: _static/publications_pccp_dipolar_pathways.png
+ :width: 25%
+ :align: right
+
+ If you use multi-pathways, please additionally cite this paper.
+
+ **Dipolar pathways in dipolar EPR spectroscopy**
+
+ Luis Fábregas Ibáñez, Maxx H. Tessmer, Gunnar Jeschke, and Stefan Stoll
+
+ Phys. Chem. Chem. Phys., 2022,24, 2504-2520
+
+ DOI: 10.1039/D1CP03305K
+
+ .. image:: https://img.shields.io/badge/Download-blue
+ :alt: Static Badge
+ :target: https://pubs.rsc.org/en/content/articlepdf/2022/cp/d1cp03305k
+
+.. card:: Dipolar pathways in multi-spin and multi-dimensional dipolar EPR spectroscopy
+
+ .. image:: _static/publications_pccp_multispin.png
+ :width: 25%
+ :align: right
+
+ If you use multi-spin models, please additionally cite this paper.
+
+ **Dipolar pathways in multi-spin and multi-dimensional dipolar EPR spectroscopy**
+
+ Luis Fábregas-Ibáñez, Valerie Mertens, Irina Ritsch, Tona von Hagens, Stefan Stoll, Gunnar Jeschke
+ Phys. Chem. Chem. Phys., 2022,24, 22645-22660
+
+ DOI: 10.1039/D2CP03048A
+
+ .. image:: https://img.shields.io/badge/Download-blue
+ :alt: Static Badge
+ :target: https://pubs.rsc.org/en/content/articlepdf/2022/cp/d2cp03048a
+
+
+.. card:: Compactness regularization in the analysis of dipolar EPR spectroscopy data
+
+ .. image:: _static/publications_jmr_compactness.png
+ :width: 25%
+ :align: right
+
+ If you use the compactness criterion, please additionally cite this paper.
+
+ **Compactness regularization in the analysis of dipolar EPR spectroscopy data**
+
+ Luis Fábregas-Ibáñez, Gunnar Jeschke, Stefan Stoll
+
+ J. Magn. Res., 2022, 339, 107218
+
+ DOI: 10.1016/j.jmr.2022.107218
+
+ .. image:: https://img.shields.io/badge/Download-blue
+ :alt: Static Badge
+ :target: https://www.sciencedirect.com/science/article/pii/S1090780722000763/pdfft?md5=2c5627f0aa0bbd0449811abf5ae05bed&pid=1-s2.0-S1090780722000763-main.pdf
-
-
- Compactness regularization in the analysis of dipolar EPR spectroscopy data
-
-
- Luis Fábregas-Ibáñez, Gunnar Jeschke, Stefan Stoll
- J. Magn. Res., 2022, 339, 107218
- DOI: 10.1016/j.jmr.2022.107218
-
-
Download
-
-
\ No newline at end of file
+.. card:: Advanced Data Analysis and Modeling in Dipolar EPR Spectroscopy
+
+ .. image:: _static/publications_thesis.png
+ :width: 25%
+ :align: right
+
+ Luis's Doctoral thesis, which describes the DeerLab package in detail and provides a comprehensive overview of data analysis in dipolar EPR spectroscopy and its mathematical foundation.
+
+ **Advanced Data Analysis and Modeling in Dipolar EPR Spectroscopy**
+
+ Luis Fábregas Ibáñez
+
+ ETH Doctoral Dissertation Nr. 28808
+
+ DOI: 10.3929/ethz-b-000585847
+
+
+ .. image:: https://img.shields.io/badge/Download-blue
+ :alt: Static Badge
+ :target: https://www.research-collection.ethz.ch/handle/20.500.11850/585847
\ No newline at end of file
diff --git a/examples/intermediate/ex_selregparam.py b/examples/intermediate/ex_selregparam.py
index 7bd1b0e11..e4f999583 100644
--- a/examples/intermediate/ex_selregparam.py
+++ b/examples/intermediate/ex_selregparam.py
@@ -1,4 +1,4 @@
-# %% [markdown]
+#%% [markdown]
"""
Analysing the selection of regularisation parameter
-------------------------------------------------------------------------
@@ -40,28 +40,25 @@
# Fit the model to the data with compactness criterion
results= dl.fit(Vmodel,Vexp,regparam='bic')
print(results)
-
-"""
-The regularisation parameter in DeerLab can be selected using a variety of criteria.
-The default criterion is the Akaike complexity criterion (aic) however other
-criterion exists and can be selected.
-
-Each criterion has its own functional, which is minimised. These functionals
-are often based on the residuals of the fit vs the raw data, such that a minimal functional value
-will occur at the location of the best fit. Some methods such as the L-Curve-based methods do not follow this approach.
-
-Traditionally the L-Curve has been used to investigate and select the regularisation parameter.
-The L-Curve is a plot of the Residual Norm against the Penalty Norm. Each point represents a
-different regularisation parameter. Normally the optimal regularisation parameter can be found at the kink
-of the curve, i.e. the place that has both a low Residual Norm and a low Pentalty Norm.
-Recently, this approach has taken a back foot as the existence of an L-shape or kink is not guaranteed.
-Nonetheless, it can be useful to diagnose problems in the selection of the regularisation parameter.
-
-"""
-# %%
+#%%
+# The regularisation parameter in DeerLab can be selected using a variety of criteria.
+# The default criterion is the Akaike complexity criterion (aic) however other
+# criterion exists and can be selected.
+#
+# Each criterion has its own functional, which is minimised. These functionals
+# are often based on the residuals of the fit vs the raw data, such that a minimal functional value
+# will occur at the location of the best fit. Some methods such as the L-Curve-based methods do not follow this approach.
+#
+# Traditionally the L-Curve has been used to investigate and select the regularisation parameter.
+# The L-Curve is a plot of the Residual Norm against the Penalty Norm. Each point represents a
+# different regularisation parameter. Normally the optimal regularisation parameter can be found at the kink
+# of the curve, i.e. the place that has both a low Residual Norm and a low Pentalty Norm.
+# Recently, this approach has taken a back foot as the existence of an L-shape or kink is not guaranteed.
+# Nonetheless, it can be useful to diagnose problems in the selection of the regularisation parameter.
+
+#%%
fig, axs =plt.subplots(1,3, figsize=(9,4),width_ratios=(1,1,0.1))
-fig.tight_layout()
alphas = results.regparam_stats['alphas_evaled'][1:]
funcs = results.regparam_stats['functional'][1:]
@@ -92,25 +89,22 @@
axs[1].plot(x[i], y[i],marker = '.', ms=8, color=cmap(norm(lams[i])))
i_optimal = np.argmin(np.abs(lams - results.regparam))
-axs[1].annotate(fr"$\lambda =$ {results.regparam:.2g}", xy = (x[i_optimal],y[i_optimal]),arrowprops=dict(facecolor='black', shrink=0.05, width=5), xytext=(20, 20),textcoords='offset pixels')
+axs[1].annotate(fr"$\alpha =$ {results.regparam:.2g}", xy = (x[i_optimal],y[i_optimal]),arrowprops=dict(facecolor='black', shrink=0.05, width=5), xytext=(20, 20),textcoords='offset pixels')
fig.colorbar(mpl.cm.ScalarMappable(norm=norm, cmap=cmap),cax=axs[2])
axs[1].set_ylabel("Penalties")
axs[2].set_ylabel("Regularisation Parameter")
axs[1].set_xlabel("Residuals")
axs[1].set_title("L-Curve");
-
-# %%
-"""
-Over and Under selection of the regularisation parameter
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-Here we will demonstrate the effect of selecting a regularisation parameter
-that is either too small or too large.
-
+fig.tight_layout()
-"""
+# %%
+# Over and Under selection of the regularisation parameter
+# --------------------------------------------------------
+# Here we will demonstrate the effect of selecting a regularisation parameter
+# that is either too small or too large.
+#%%
result_high= dl.fit(Vmodel,Vexp,regparam=1.0)
result_low= dl.fit(Vmodel,Vexp,regparam=1e-4)
@@ -145,18 +139,13 @@
axs[1].set_ylabel('$P(r)$ (nm$^{-1}$)')
-# %%
-"""
-As we can see when the regularisation parameter is too small we still get a high
-quality fit in the time domain, however, our distance domain data is now way too
-spikey and non-physical.
-
-In contrast when the regularisation parameter is too large we struggle to get
-a good fit, however, we get a much smoother distance distribution.
-
-This could have been seen from the selection functional above. The effect of
-lower regularisation parameter had a smaller effect on the functional than the
-effect of going to a larger one.
-
-
-"""
+#%%
+#
+# As we can see when the regularisation parameter is too small we still get a high
+# quality fit in the time domain, however, our distance domain data is now way too
+# spikey and non-physical.
+# In contrast when the regularisation parameter is too large we struggle to get
+# a good fit, however, we get a much smoother distance distribution.
+# This could have been seen from the selection functional above. The effect of
+# lower regularisation parameter had a smaller effect on the functional than the
+# effect of going to a larger one.