From 853cb6f09e6b313411ed4bf3ccd28138375bc238 Mon Sep 17 00:00:00 2001 From: "clemens.schmid@esrf.fr" Date: Tue, 25 Aug 2026 10:54:45 +0200 Subject: [PATCH 1/3] Add method GetRwHistory to lsq turns internal std::vector into Python list --- src/extensions/lsq_ext.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/extensions/lsq_ext.cpp b/src/extensions/lsq_ext.cpp index b28ba8d..f34420c 100644 --- a/src/extensions/lsq_ext.cpp +++ b/src/extensions/lsq_ext.cpp @@ -62,6 +62,15 @@ bp::dict _GetVarianceCovarianceMap(LSQNumObj & lsq) return d; } +bp::list _GetRwHistory(const LSQNumObj & lsq) +{ + bp::list out; + const std::vector & h = lsq.GetRwHistory(); + for (std::vector::const_iterator it = h.begin(); it != h.end(); ++it) + out.append(*it); + return out; +} + } // namespace void wrap_lsq() @@ -98,6 +107,7 @@ void wrap_lsq() bp::arg("minChi2var")=0.01)) .def("Rfactor", &LSQNumObj::Rfactor) .def("RwFactor", &LSQNumObj::RwFactor) + .def("GetRwHistory", &_GetRwHistory) .def("ChiSquare", &LSQNumObj::ChiSquare) .def("SetRefinedObj", &LSQNumObj::SetRefinedObj, (bp::arg("obj"), bp::arg("LSQFuncIndex")=0, From 385287ca22f0052a172b461211defd9169087335 Mon Sep 17 00:00:00 2001 From: Clemens Schmid Date: Tue, 25 Aug 2026 13:48:02 +0200 Subject: [PATCH 2/3] add news file --- news/rw_history.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 news/rw_history.rst diff --git a/news/rw_history.rst b/news/rw_history.rst new file mode 100644 index 0000000..a348487 --- /dev/null +++ b/news/rw_history.rst @@ -0,0 +1,23 @@ +**Added:** + +* Add method ``GetRwHistory`` on LSQ object to get history of Rw values through one run of ``lsq.Refine()``. + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* From 6b15a8f779302f158593e64748192048f121915e Mon Sep 17 00:00:00 2001 From: Clemens Schmid Date: Wed, 23 Sep 2026 12:48:37 +0200 Subject: [PATCH 3/3] bump libobjcryst version to 2026.3.0 --- requirements/conda.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/conda.txt b/requirements/conda.txt index 476a320..e48448d 100644 --- a/requirements/conda.txt +++ b/requirements/conda.txt @@ -1,5 +1,5 @@ numpy -libobjcryst>=2026.2.0 +libobjcryst>=2026.3.0 libboost-devel libboost-python packaging # for matplotlib version parsing in powderpattern.py