Skip to content

Commit 4e630d2

Browse files
committed
Merge branch 'develop'
2 parents 9c73ad8 + b0806b1 commit 4e630d2

File tree

7 files changed

+176
-159
lines changed

7 files changed

+176
-159
lines changed

.readthedocs.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,20 @@ version: 2
99
build:
1010
os: ubuntu-22.04
1111
tools:
12-
python: "3.11"
12+
python: "3.12"
1313
jobs:
14-
post_install:
14+
post_create_environment:
15+
# Install Poetry for dependency management
1516
- pip install poetry
16-
- poetry config virtualenvs.create false
17-
- poetry install
17+
post_install:
18+
# Install dependencies with 'docs' dependency group
19+
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
20+
# VIRTUAL_ENV needs to be set manually for now, see #11150
21+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs
1822

1923
# Build documentation in the "docs/" directory with Sphinx
2024
sphinx:
21-
configuration: docs/conf.py
22-
25+
configuration: docs/conf.py
2326
# Optionally, build your docs in additional formats such as PDF and ePub
2427
# formats:
2528
# - pdf

changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.2.1 (2025/07/21)
2+
3+
### Bugfixes
4+
5+
- when optimizing the density, the lorch modififcation function is applied in accordance with the calculation configuration. This means, that it is applied before the chi-square calculation.
6+
7+
18
## 2.2.0 (2025/07/21)
29

310
### New features

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1010

1111
project = 'Glassure'
12-
copyright = '2023, Clemens Prescher'
12+
copyright = '2025, Clemens Prescher'
1313
author = 'Clemens Prescher'
14-
release = '1.3.0'
14+
release = '2.2.1'
1515

1616
sys.path.insert(0, os.path.abspath('..'))
1717
# -- General configuration ---------------------------------------------------

glassure/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from .pattern import Pattern
55

6-
__version__ = "2.2.0"
6+
__version__ = "2.2.1"
77

88

99
def _module_path():

glassure/optimization.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ def optimize_density(
117117
The density in the SampleConfig of the DataConfig is taking as starting parameter
118118
119119
For method='gr' or method='fr' the optimization is based on the g(r) or f(r) function, and the density is
120-
optimized to minimize the low g(r) or f(r) region to be close to zero. For better results, the g(r) function
121-
is calculated with the Lorch modification function. The general procedure is explained in
122-
Eggert et al. 2002 PRB, 65, 174105.
120+
optimized to minimize the low g(r) or f(r) region to be close to zero. The Lorch modification function will be
121+
applied before calculating the chi square of the low r region if it is applied in the calculation configuration.
122+
The general procedure is explained in Eggert et al. 2002 PRB, 65, 174105.
123123
124124
For method='sq' the optimization is based on the low Q part of the S(Q) function, and the density is optimized
125125
to minimize the difference between the original S(Q) function without any optimization and the optimized S(Q)
@@ -171,7 +171,9 @@ def optimize_density(
171171
172172
:return:
173173
a tuple with four values:
174-
- the density, the standard error, the background scaling and the standard error for optimization_method='lsq'
174+
- the density, its error value, the background scaling and the error value
175+
whereby the error value is the standard error of the fit parameter for optimization_method ='lsq' and the
176+
sum of the squared residuals for optimization_method='nelder'.
175177
"""
176178

177179
if calculation_config.optimize is None and min_range is None and not method == "sq":
@@ -191,7 +193,6 @@ def optimize_density(
191193
)
192194

193195
optim_config = calculation_config.model_copy(deep=True)
194-
optim_config.transform.use_modification_fcn = False
195196

196197
if method == "sq":
197198
reference_config = calculation_config.model_copy(deep=True)

0 commit comments

Comments
 (0)