From 95f02d9e87fabce8ed14adc50366ac1d31d3f11a Mon Sep 17 00:00:00 2001 From: Clemens Schmid Date: Fri, 16 Jan 2026 09:07:17 +0100 Subject: [PATCH 1/2] Add SetPowderPatternObsSigma --- ObjCryst/ObjCryst/PowderPattern.cpp | 15 +++++++++++++++ ObjCryst/ObjCryst/PowderPattern.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/ObjCryst/ObjCryst/PowderPattern.cpp b/ObjCryst/ObjCryst/PowderPattern.cpp index dc58494..891736b 100644 --- a/ObjCryst/ObjCryst/PowderPattern.cpp +++ b/ObjCryst/ObjCryst/PowderPattern.cpp @@ -3862,6 +3862,21 @@ supplied vector of observed intensities does not have the expected number of poi (*fpObjCrystInformUser)((string)buf); } } + +void PowderPattern::SetPowderPatternObsSigma(const CrystVector_REAL& sigma) +{ + VFN_DEBUG_MESSAGE("PowderPattern::SetPowderPatternObsSigma()",5) + if((unsigned long)sigma.numElements() != mNbPoint) + { + throw(ObjCrystException("PowderPattern::SetPowderPatternObsSigma(vect): The \ +supplied vector of sigma does not have the expected number of points!")); + } + + mPowderPatternObsSigma = sigma; + mPowderPatternWeight.resize(mNbPoint); + this->SetWeightToInvSigmaSq(); + mClockIntegratedFactorsPrep.Reset(); +} void PowderPattern::SavePowderPattern(const string &filename) const { VFN_DEBUG_MESSAGE("PowderPattern::SavePowderPattern",5) diff --git a/ObjCryst/ObjCryst/PowderPattern.h b/ObjCryst/ObjCryst/PowderPattern.h index 86bf3a4..c42fff5 100644 --- a/ObjCryst/ObjCryst/PowderPattern.h +++ b/ObjCryst/ObjCryst/PowderPattern.h @@ -816,6 +816,8 @@ class PowderPattern : public RefinableObj * for example by calling DiffractionDataPowder::InitPowderPatternPar(). */ void SetPowderPatternObs(const CrystVector_REAL& obs); + /// Set sigma for each point of the observed powder pattern. + void SetPowderPatternObsSigma(const CrystVector_REAL& sigma); ///Save powder pattern to one file, text format, 3 columns theta Iobs Icalc. ///If Iobs is missing, the column is omitted. From 3d83807cb1fa87cc40b817068719e7910191eda2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 13:08:30 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit hooks --- Fox/src/Fox.cpp | 4 ++-- Fox/src/foxgrid/FoxGridSlave.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Fox/src/Fox.cpp b/Fox/src/Fox.cpp index dcb60e1..693913c 100644 --- a/Fox/src/Fox.cpp +++ b/Fox/src/Fox.cpp @@ -1018,7 +1018,7 @@ int main (int argc, char *argv[]) } else { wxMessageDialog d(NULL,_T("Failed loading file:\n")+name,_T("Error"),wxOK|wxICON_ERROR); d.ShowModal(); - } + } }; } else @@ -1047,7 +1047,7 @@ int main (int argc, char *argv[]) } else { wxMessageDialog d(NULL,_T("Failed loading file:\n")+name,_T("Error"),wxOK|wxICON_ERROR); d.ShowModal(); - } + } }; } } diff --git a/Fox/src/foxgrid/FoxGridSlave.cpp b/Fox/src/foxgrid/FoxGridSlave.cpp index eff7f7d..7bf0abb 100644 --- a/Fox/src/foxgrid/FoxGridSlave.cpp +++ b/Fox/src/foxgrid/FoxGridSlave.cpp @@ -347,7 +347,7 @@ void FoxGridSlave::CheckJobsAndStartCalculation() WriteLogMessage("ERROR: Can't write a file " + proc->dir + _T("\\input.xml")); return; } - + wxString cmd_content; wxString appname = wxApp::GetInstance()->argv[0]; if(rand) {