musrview gets the new feature: calculate theory points only at data points.

Conflicts:
	doc/html/searchindex.js
	doc/html/setup-dks.html
	src/classes/PMusrCanvas.cpp
	src/include/PMusrCanvas.h
	src/musrview.cpp
This commit is contained in:
2020-08-29 11:15:02 +02:00
parent ae105bacb4
commit 3b5060c061
75 changed files with 5223 additions and 35364 deletions

View File

@@ -140,6 +140,8 @@ bool PAdminXMLParser::startElement()
fKeyWord = eMusrviewShowFourier;
} else if (qName == "musrview_show_avg") {
fKeyWord = eMusrviewShowAvg;
} else if (qName == "musrview_show_one_to_one") {
fKeyWord = eMusrviewShowOneToOne;
} else if (qName == "enable_musrt0") {
fKeyWord = eEnableMusrT0;
} else if (qName == "dark_theme_icons_menu") {
@@ -315,6 +317,13 @@ bool PAdminXMLParser::characters()
flag = false;
fAdmin->setMusrviewShowAvgFlag(flag);
break;
case eMusrviewShowOneToOne:
if (str == "y")
flag = true;
else
flag = false;
fAdmin->setMusrviewShowOneToOneFlag(flag);
break;
case eEnableMusrT0:
if (str == "y")
flag = true;

View File

@@ -72,7 +72,7 @@ class PAdminXMLParser
private:
enum EAdminKeyWords {eEmpty, eTimeout, eKeepMinuit2Output, eDumpAscii, eDumpRoot,
eTitleFromDataFile, eChisqPreRunBlock, eEstimateN0,
eMusrviewShowFourier, eMusrviewShowAvg, eEnableMusrT0,
eMusrviewShowFourier, eMusrviewShowAvg, eMusrviewShowOneToOne, eEnableMusrT0,
eDarkThemeIconsMenu, eDarkThemeIconsToolbar,
eFontName, eFontSize, eExecPath, eDefaultSavePath,
eRecentFile, eBeamline, eInstitute, eFileFormat, eLifetimeCorrection,
@@ -123,6 +123,7 @@ class PAdmin : public QObject
bool getTitleFromDataFileFlag() { return fTitleFromDataFile; }
bool getMusrviewShowFourierFlag() { return fMusrviewShowFourier; }
bool getMusrviewShowAvgFlag() { return fMusrviewShowAvg; }
bool getMusrviewShowOneToOneFlag() { return fMusrviewShowOneToOne; }
bool getEnableMusrT0Flag() { return fEnableMusrT0; }
bool getKeepMinuit2OutputFlag() { return fKeepMinuit2Output; }
bool getDumpAsciiFlag() { return fDumpAscii; }
@@ -148,6 +149,7 @@ class PAdmin : public QObject
void setTitleFromDataFileFlag(const bool flag) { fTitleFromDataFile = flag; }
void setMusrviewShowFourierFlag(const bool flag) { fMusrviewShowFourier = flag; }
void setMusrviewShowAvgFlag(const bool flag) { fMusrviewShowAvg = flag; }
void setMusrviewShowOneToOneFlag(const bool flag) { fMusrviewShowOneToOne = flag; }
void setEnableMusrT0Flag(const bool flag) { fEnableMusrT0 = flag; }
void setKeepMinuit2OutputFlag(const bool flag) { fKeepMinuit2Output = flag; }
void setDumpAsciiFlag(const bool flag) { fDumpAscii = flag; }
@@ -190,16 +192,17 @@ class PAdmin : public QObject
QVector<QString> fRecentFile; ///< keep vector of recent path-file names
bool fMusrviewShowFourier; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
bool fMusrviewShowAvg; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
bool fKeepMinuit2Output; ///< flag indicating if the Minuit2 output shall be kept (default: no)
bool fDumpAscii; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
bool fDumpRoot; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
bool fMusrviewShowFourier; ///< flag indicating if musrview should show at startup data (=false) or Fourier of data (=true).
bool fMusrviewShowAvg; ///< flag indicating if musrview should show at startup averaged (=true) or original (=false) data/Fourier.
bool fMusrviewShowOneToOne; ///< flag indicating if theory points are calculate only at the data points (=true) or a higher density theory points is calculated
bool fKeepMinuit2Output; ///< flag indicating if the Minuit2 output shall be kept (default: no)
bool fDumpAscii; ///< flag indicating if musrfit shall make an ascii-dump file (for debugging purposes, default: no).
bool fDumpRoot; ///< flag indicating if musrfit shall make an root-dump file (for debugging purposes, default: no).
bool fTitleFromDataFile; ///< flag indicating if the title should be extracted from the data file (default: yes).
bool fChisqPreRunBlock; ///< flag indicating if musrfit shall write 'per run block' chisq to the msr-file (default: no).
bool fEstimateN0; ///< flag indicating if musrfit shall estimate N0 for single histogram fits (default: yes).
bool fEnableMusrT0; ///< flag indicating if musrT0 shall be enabled at startup from within musredit (default: yes).
bool fDarkThemeIconsMenu; ///< flag indicating if dark theme icons shall be used in the menu (default: no)
bool fDarkThemeIconsToolbar; ///< flag indicating if dark theme icons shall be used in the toolbar (default: no)
QString fBeamline; ///< name of the beamline. Used to generate default run header lines.

View File

@@ -76,6 +76,7 @@ PPrefsDialog::PPrefsDialog(PAdmin *admin) : fAdmin(admin)
fEstimateN0_checkBox->setChecked(fAdmin->getEstimateN0Flag());
fFourier_checkBox->setChecked(fAdmin->getMusrviewShowFourierFlag());
fAvg_checkBox->setChecked(fAdmin->getMusrviewShowAvgFlag());
fOneToOne_checkBox->setChecked(fAdmin->getMusrviewShowOneToOneFlag());
fTimeout_lineEdit->setText(QString("%1").arg(fAdmin->getTimeout()));
fTimeout_lineEdit->setValidator(new QIntValidator(fTimeout_lineEdit));

View File

@@ -48,6 +48,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
bool getMusrviewShowFourierFlag() { return fFourier_checkBox->isChecked(); }
bool getMusrviewShowAvgFlag() { return fAvg_checkBox->isChecked(); }
bool getMusrviewShowOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
bool getKeepMinuit2OutputFlag() { return fKeepMn2Output_checkBox->isChecked(); }
bool getTitleFromDataFileFlag() { return fTitleFromData_checkBox->isChecked(); }
bool getEnableMusrT0Flag() { return fEnableMusrT0_checkBox->isChecked(); }
@@ -55,6 +56,7 @@ class PPrefsDialog : public QDialog, private Ui::PPrefsDialog
bool getEstimateN0Flag() { return fEstimateN0_checkBox->isChecked(); }
bool getDarkThemeIconsMenuFlag() { return fDarkThemeIconsMenu_checkBox->isChecked(); }
bool getDarkThemeIconsToolbarFlag() { return fDarkThemeIconsToolbar_checkBox->isChecked(); }
bool getOneToOneFlag() { return fOneToOne_checkBox->isChecked(); }
int getDump();
int getTimeout() { return fTimeout_lineEdit->text().toInt(); }

View File

@@ -2542,6 +2542,10 @@ void PTextEdit::musrView()
if (fAdmin->getMusrviewShowAvgFlag())
arg << "-a";
// check if theory shall only be calculated at the data points
if (fAdmin->getMusrviewShowOneToOneFlag())
arg << "-1";
QProcess *proc = new QProcess(this);
connect(proc, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(musrViewFinished(int, QProcess::ExitStatus)));
@@ -2697,6 +2701,7 @@ void PTextEdit::musrPrefs()
fAdmin->setDarkThemeIconsToolbarFlag(dlg->getDarkThemeIconsToolbarFlag());
fAdmin->setMusrviewShowFourierFlag(dlg->getMusrviewShowFourierFlag());
fAdmin->setMusrviewShowAvgFlag(dlg->getMusrviewShowAvgFlag());
fAdmin->setMusrviewShowOneToOneFlag(dlg->getMusrviewShowOneToOneFlag());
fAdmin->setKeepMinuit2OutputFlag(dlg->getKeepMinuit2OutputFlag());
fAdmin->setTitleFromDataFileFlag(dlg->getTitleFromDataFileFlag());
fAdmin->setEnableMusrT0Flag(dlg->getEnableMusrT0Flag());

View File

@@ -33,7 +33,7 @@
<item>
<widget class="QTabWidget" name="fTabWidget">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="fGeneral_tab">
<attribute name="title">
@@ -52,13 +52,13 @@
<string>Change Default Search Paths</string>
</property>
</widget>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>12</x>
<y>10</y>
<width>415</width>
<height>52</height>
<height>62</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
@@ -219,6 +219,19 @@
<string>start with averaged data/Fourier</string>
</property>
</widget>
<widget class="QCheckBox" name="fOneToOne_checkBox">
<property name="geometry">
<rect>
<x>260</x>
<y>10</y>
<width>181</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>theo at data points only</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="fMusrt0_tab">
<attribute name="title">

View File

@@ -16,6 +16,7 @@
<estimate_n0>y</estimate_n0>
<musrview_show_fourier>n</musrview_show_fourier>
<musrview_show_avg>n</musrview_show_avg>
<musrview_show_one_to_one>n</musrview_show_one_to_one>
<enable_musrt0>y</enable_musrt0>
<dark_theme_icons_menu>n</dark_theme_icons_menu>
<dark_theme_icons_toolbar>n</dark_theme_icons_toolbar>