Skip to content

Commit 9578d50

Browse files
committed
Revert "ADD: New report feature, fixed Ba-133 only calibration"
This reverts commit ab45652.
1 parent 75217f4 commit 9578d50

8 files changed

Lines changed: 26 additions & 429 deletions

File tree

resource/libraries/Calibration.isotopes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ Ba 133 34.987 11.6 E
3131
Ba 133 35.818 3.58 E
3232
Ba 133 53.161 2.199 E
3333
# Ba 133 79.614 2.62 E this mini line just screws things up in melinator -- we pretend we do not know it...
34-
Ba 133 80.997 34.06 P
34+
Ba 133 80.997 34.06 D
3535
Ba 133 276.398 7.164
3636
Ba 133 302.853 18.33
37-
Ba 133 356.017 62.05 S
37+
Ba 133 356.017 62.05
3838
Ba 133 383.851 8.94
3939

4040
# 137-Cs

src/fretalon/base/src/MCalibrateEnergyAssignEnergies.cxx

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ bool MCalibrateEnergyAssignEnergies::CalibrateLinear()
224224
if (g_Verbosity >= c_Info) cout<<endl<<"Assigning energies via linear method"<<endl;
225225

226226
// Inventory:
227-
unsigned int TotalNumberOfGoodPoints = 0;
228227
bool NoROGHasMoreThanOneGoodSpectralPoint = true;
229228
if (g_Verbosity >= c_Info) cout<<"Current line inventory: "<<endl;
230229
for (unsigned int r = 0; r < m_Results.GetNumberOfReadOutDataGroups(); ++r) {
@@ -235,7 +234,6 @@ bool MCalibrateEnergyAssignEnergies::CalibrateLinear()
235234
} else {
236235
if (g_Verbosity >= c_Info) cout<<"Included: "<<m_Results.GetSpectralPoint(r, p)<<endl;
237236
++NumberOfGoodPoints;
238-
++TotalNumberOfGoodPoints;
239237
}
240238
}
241239
if (NumberOfGoodPoints > 1) {
@@ -267,47 +265,6 @@ bool MCalibrateEnergyAssignEnergies::CalibrateLinear()
267265
return true;
268266
}
269267

270-
// Special case: We have one ROG with one isotope (which has a primary and secondary line) with two spectral points - this handles Ba-133 only calibrations:
271-
if (m_Results.GetNumberOfReadOutDataGroups() == 1 && m_Isotopes[0].size() == 1 && m_Isotopes[0][0].GetPrimaryLine() != -1 && m_Isotopes[0][0].GetSecondaryLine() != -1 && TotalNumberOfGoodPoints == 2) {
272-
273-
if (g_Verbosity >= c_Info) cout<<"Assign energies: Special case with 1 ROG, 1 isotope with 2 spectral point"<<endl;
274-
275-
unsigned int r = 0; // our single ROG
276-
unsigned int i = 0; // our single Isotope
277-
int PrimaryLineID = m_Isotopes[r][i].GetPrimaryLine();
278-
int SecondaryLineID = m_Isotopes[r][i].GetSecondaryLine();
279-
280-
vector<unsigned int> GoodSpectralPointIDs;
281-
for (unsigned int p = 0; p < m_Results.GetNumberOfSpectralPoints(r); ++p) {
282-
if (m_Results.GetSpectralPoint(r, p).IsGood() == true) {
283-
GoodSpectralPointIDs.push_back(p);
284-
}
285-
}
286-
287-
unsigned int plow = 0;
288-
unsigned int phigh = 0;
289-
if (m_Results.GetSpectralPoint(r, GoodSpectralPointIDs[0]).GetPeak() < m_Results.GetSpectralPoint(r, GoodSpectralPointIDs[1]).GetPeak()) {
290-
plow = GoodSpectralPointIDs[0];
291-
phigh = GoodSpectralPointIDs[1];
292-
} else {
293-
plow = GoodSpectralPointIDs[1];
294-
phigh = GoodSpectralPointIDs[0];
295-
}
296-
297-
if (m_Isotopes[r][0].GetLineEnergy(PrimaryLineID) < m_Isotopes[r][0].GetLineEnergy(SecondaryLineID)) {
298-
m_Results.GetSpectralPoint(r, plow).SetIsotope(m_Isotopes[r][0]);
299-
m_Results.GetSpectralPoint(r, plow).SetEnergy(m_Isotopes[r][0].GetLineEnergy(PrimaryLineID));
300-
m_Results.GetSpectralPoint(r, phigh).SetIsotope(m_Isotopes[r][0]);
301-
m_Results.GetSpectralPoint(r, phigh).SetEnergy(m_Isotopes[r][0].GetLineEnergy(SecondaryLineID));
302-
} else {
303-
m_Results.GetSpectralPoint(r, plow).SetIsotope(m_Isotopes[r][0]);
304-
m_Results.GetSpectralPoint(r, plow).SetEnergy(m_Isotopes[r][0].GetLineEnergy(SecondaryLineID));
305-
m_Results.GetSpectralPoint(r, phigh).SetIsotope(m_Isotopes[r][0]);
306-
m_Results.GetSpectralPoint(r, phigh).SetEnergy(m_Isotopes[r][0].GetLineEnergy(PrimaryLineID));
307-
}
308-
309-
return true;
310-
}
311268

312269

313270
// Create a list of spectral points

src/fretalon/melinator/inc/MGUIMainMelinator.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ class MGUIMainMelinator : public TGMainFrame
111111
virtual bool OnLoad();
112112
//! Actions when the save as button has been pressed
113113
virtual bool OnSaveAs();
114-
//! Actions when the show report as button has been pressed
115-
virtual bool OnShowReport();
116114
//! Actions when the next button has been pressed
117115
virtual bool OnNext();
118116
//! Actions when the back button has been pressed
@@ -287,7 +285,6 @@ class MGUIMainMelinator : public TGMainFrame
287285
static const int c_CalibrationModelDeterminationMethodFittingFWHMModel = 73;
288286
static const int c_Save = 80;
289287
static const int c_SaveAs = 81;
290-
static const int c_ShowReport = 90;
291288
static const int c_Remove = 400;
292289
static const int c_Options = 500;
293290
static const int c_Change = 600;

src/fretalon/melinator/inc/MMelinator.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,10 @@ class MMelinator
160160

161161
//! Remove all collection which don't have positive data entries
162162
//void RemoveCollectionsWithNoPositiveEntries() { m_Store.RemoveCollectionsWithNoPositiveEntries(); }
163-
163+
164164
//! Save the calibration in e-cal format
165165
bool Save(MString FileName);
166-
167-
//! Create a calibration report
168-
bool CreateReport();
169-
166+
170167
//! Dump a string
171168
virtual MString ToString() const;
172169

src/fretalon/melinator/src/MGUIMainMelinator.cxx

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ void MGUIMainMelinator::Create()
169169
MenuFiles->AddEntry("Choose files and isotopes", c_ChooseCalibrationFiles);
170170
MenuFiles->AddEntry("Load files", c_LoadLast);
171171
MenuFiles->AddSeparator();
172+
MenuFiles->AddLabel("Calibration result");
173+
MenuFiles->AddEntry("Save As...", c_SaveAs);
174+
MenuFiles->AddEntry("Save", c_Save);
175+
MenuFiles->AddSeparator();
172176
MenuFiles->AddLabel("Configuration file");
173177
//MenuFiles->AddEntry("Open", c_LoadConfig);
174178
MenuFiles->AddEntry("Open -> use command line at launch", c_LoadConfig);
@@ -179,18 +183,7 @@ void MGUIMainMelinator::Create()
179183
MenuFiles->AddSeparator();
180184
MenuFiles->AddEntry("Exit", c_Exit);
181185
MenuFiles->Associate(this);
182-
MenuBar->AddPopup("Input", MenuFiles, MenuBarItemLayoutLeft);
183-
184-
TGPopupMenu* MenuResults = new TGPopupMenu(gClient->GetRoot());
185-
MenuResults->AddLabel("Calibration file");
186-
MenuResults->AddEntry("Save As...", c_SaveAs);
187-
MenuResults->AddEntry("Save", c_Save);
188-
MenuResults->AddSeparator();
189-
MenuResults->AddLabel("Calibration report");
190-
MenuResults->AddEntry("Create and Show", c_ShowReport);
191-
//MenuResults->AddSeparator();
192-
MenuResults->Associate(this);
193-
MenuBar->AddPopup("Output", MenuResults, MenuBarItemLayoutLeft);
186+
MenuBar->AddPopup("Files", MenuFiles, MenuBarItemLayoutLeft);
194187

195188
TGPopupMenu* MenuInfo = new TGPopupMenu(fClient->GetRoot());
196189
MenuInfo->AddEntry("About", c_About);
@@ -939,10 +932,6 @@ bool MGUIMainMelinator::ProcessMessage(long Message, long Parameter1, long Param
939932
Status = OnSaveAs();
940933
break;
941934

942-
case c_ShowReport:
943-
Status = OnShowReport();
944-
break;
945-
946935
case c_About:
947936
Status = OnAbout();
948937
break;
@@ -1453,22 +1442,6 @@ bool MGUIMainMelinator::OnSaveAs()
14531442
////////////////////////////////////////////////////////////////////////////////
14541443

14551444

1456-
//! Actions when the show report button has been pressed
1457-
bool MGUIMainMelinator::OnShowReport()
1458-
{
1459-
bool Return = m_Melinator.CreateReport();
1460-
1461-
if (Return == false) {
1462-
mgui<<"Unable to create calibration report"<<error;
1463-
}
1464-
1465-
return Return;
1466-
}
1467-
1468-
1469-
////////////////////////////////////////////////////////////////////////////////
1470-
1471-
14721445
bool MGUIMainMelinator::OnLoad()
14731446
{
14741447
return false;

0 commit comments

Comments
 (0)