Skip to content

Commit ee30fa0

Browse files
committed
Correct spacegroup explorer, make sure wxPowderPattern and RunAll function perform similarly
1 parent a1f2c6f commit ee30fa0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ObjCryst/ObjCryst/PowderPattern.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7025,7 +7025,6 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
70257025
const string hm=s.universal_hermann_mauguin();
70267026
// cout<<s.number()<<","<<hm.c_str()<<","<<(int)compat<<endl;
70277027
pCrystal->Init(a,b,c,d,e,f,hm,name);
7028-
if(s.number() == 1) nb_refl_p1 = mpDiff->GetNbReflBelowMaxSinThetaOvLambda();
70297028

70307029
std::vector<bool> fgp=spgExtinctionFingerprint(*pCrystal,spg);
70317030
std::map<std::vector<bool>,SPGScore>::iterator posfgp=mvSPGExtinctionFingerprint.find(fgp);
@@ -7035,7 +7034,7 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
70357034
mpDiff->SetExtractionMode(true,true); //:TODO: why is this needed to actually get the updated GetNbReflBelowMaxSinThetaOvLambda ?
70367035
unsigned int nbrefl = mpDiff->GetNbReflBelowMaxSinThetaOvLambda();
70377036
REAL ngof = (posfgp->second.ngof * nbrefl) / posfgp->second.nbreflused;
7038-
mvSPG.push_back(SPGScore(hm.c_str(),posfgp->second.rw,posfgp->second.gof,posfgp->second.nbextinct446, ngof, posfgp->second.nbreflused));
7037+
mvSPG.push_back(SPGScore(hm.c_str(),posfgp->second.rw,posfgp->second.gof,posfgp->second.nbextinct446, ngof, nbrefl));
70397038
if(verbose) cout<<boost::format(" (#%3d) %-14s: Rwp= %5.2f%% GoF=%9.2f nGoF=%9.2f (%3u reflections, %3u extinct)")
70407039
% s.number() % hm.c_str() % mvSPG.back().rw % mvSPG.back().gof % mvSPG.back().ngof % mvSPG.back().nbreflused % mvSPG.back().nbextinct446
70417040
<<" [same extinctions as:"<<posfgp->second.hm<<"]\n";
@@ -7044,6 +7043,7 @@ void SpaceGroupExplorer::RunAll(const bool fitprofile_all, const bool verbose, c
70447043
{
70457044
if(((s.number()==1) && fitprofile_p1) || fitprofile_all) mvSPG.push_back(this->Run(spg, true, false, false, update_display));
70467045
else mvSPG.push_back(this->Run(spg, false, false, true, update_display));
7046+
if(s.number() == 1) nb_refl_p1 = mvSPG.back().nbreflused;
70477047
mvSPG.back().ngof *= mpDiff->GetNbReflBelowMaxSinThetaOvLambda() / (float)nb_refl_p1;
70487048
mvSPGExtinctionFingerprint.insert(make_pair(fgp, mvSPG.back()));
70497049

@@ -7085,8 +7085,8 @@ REAL SpaceGroupExplorer::GetP1IntegratedGoF()
70857085
mpDiff->GetPowderPatternIntegratedCalc();
70867086
mP1IntegratedProfileMin = mpDiff->GetParentPowderPattern().GetIntegratedProfileMin();
70877087
mP1IntegratedProfileMax = mpDiff->GetParentPowderPattern().GetIntegratedProfileMax();
7088-
cout<<"Updating mP1IntegratedProfileMin/Max:"<<endl
7089-
<<FormatVertVectorHKLFloats<REAL>(mP1IntegratedProfileMin, mP1IntegratedProfileMax,mP1IntegratedProfileMax)<<endl;
7088+
// cout<<"Updating mP1IntegratedProfileMin/Max:"<<endl
7089+
// <<FormatVertVectorHKLFloats<REAL>(mP1IntegratedProfileMin, mP1IntegratedProfileMax,mP1IntegratedProfileMax)<<endl;
70907090
}
70917091
else if (mP1IntegratedProfileMin.size()==0) return 0;
70927092

ObjCryst/wxCryst/wxPowderPattern.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4915,11 +4915,11 @@ void WXProfileFitting::OnExploreSpacegroups(wxCommandEvent &event)
49154915
cout<<s.number()<<","<<hm.c_str()<<","<<(int)compat<<endl;
49164916
mpLog->AppendText(wxString::Format(_T(" (#%3d) %-14s:"),s.number(),wxString::FromAscii(hm.c_str()).c_str()));
49174917

4918+
pCrystal->Init(a,b,c,d,e,f,hm,name);
49184919
std::vector<bool> fgp=spgExtinctionFingerprint(*pCrystal,spg);
49194920
std::map<std::vector<bool>,SPGScore>::iterator posfgp=vSPGExtinctionFingerprint.find(fgp);
49204921
if(posfgp!=vSPGExtinctionFingerprint.end())
49214922
{
4922-
pCrystal->Init(a,b,c,d,e,f,hm,name);
49234923
mpDiff->SetExtractionMode(true,true); //:TODO: why is this needed to actually get the updated GetNbReflBelowMaxSinThetaOvLambda ?
49244924
unsigned int nbrefl = pDiff->GetNbReflBelowMaxSinThetaOvLambda();
49254925
REAL ngof = (posfgp->second.ngof * nbrefl) / posfgp->second.nbreflused;

0 commit comments

Comments
 (0)