Skip to content

Commit 518de11

Browse files
authored
Release 1.1.2
* Added chi^2 value and success flag to fit results * Set bumps version dependency to the working 1.0.0b7 (refl1d and EasyScience)
1 parent 92ab3d7 commit 518de11

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ dependencies = [
3636
"refl1d[webview]==1.0.0a12",
3737
"orsopy==1.2.1",
3838
"xhtml2pdf==0.2.17",
39+
"bumps==1.0.0b7",
3940
]
4041

4142
[project.optional-dependencies]

src/easyreflectometry/fitting.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def fit(self, data: sc.DataGroup, id: int = 0) -> sc.DataGroup:
5454
new_data['coords'][f'z_{id}'] = sc.array(
5555
dims=[f'z_{id}'], values=sld_profile[0], unit=(1 / new_data['coords'][f'Qz_{id}'].unit).unit
5656
)
57+
new_data['reduced_chi'] = float(result[i].reduced_chi)
58+
new_data['success'] = result[i].success
5759
return new_data
5860

5961
def fit_single_data_set_1d(self, data: DataSet1D) -> FitResults:

tests/test_fitting.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,5 @@ def test_fitting(minimizer):
6060
analysed = fitter.fit(data)
6161
assert 'R_0_model' in analysed.keys()
6262
assert 'SLD_0' in analysed.keys()
63+
assert 'success' in analysed.keys()
64+
assert analysed['success']

0 commit comments

Comments
 (0)