Merged muonspin/musrfit/root6 into master

This commit is contained in:
Zaher Salman 2017-02-15 11:01:44 +01:00
commit c63f9e0ce1
17 changed files with 772 additions and 670 deletions

View File

@ -1263,8 +1263,6 @@ AC_CONFIG_FILES([Makefile \
src/musredit_qt5/Makefile \
src/musredit/Makefile \
src/musrgui/Makefile \
src/musredit_qt5/musredit_startup.xml \
src/musredit/musredit_startup.xml \
src/musrgui/musrgui_startup.xml])
AC_OUTPUT
@ -1425,3 +1423,15 @@ echo " Programs: ${INSTALLDIR}/bin"
echo " XML configuration files: ${HOME}/.musrfit"
echo " Documentation: ${DOCDIR}"
echo ""
dnl --------------
dnl create header file that musredit knows at runtime where to find the documentation
dnl --------------
if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit_qt5"; then
echo \#define MUSRFIT_PREFIX \"${INSTALLDIR}\" > src/musredit_qt5/musrfit-info.h
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit_qt5/musrfit-info.h
fi
if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit"; then
echo \#define MUSRFIT_PREFIX \"${INSTALLDIR}\" > src/musredit/musrfit-info.h
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit/musrfit-info.h
fi

View File

@ -60,9 +60,6 @@ write_musrRoot_runHeader_SOURCES = write_musrRoot_runHeader.cpp
musrRootValidation_SOURCES = musrRootValidation.cpp
dump_header_SOURCES = dump_header.cpp
xmldir = $(HOME)/.musrfit
xml_DATA = musrfit_startup.xml
LIBADD = $(PMUSR_LIBS) $(MUSR_ROOT_LIBS) $(LEM_LIBS) $(PSIBIN_LIBS) $(MUD_LIBS) $(PNEXUS_LIBS)
AM_CXXFLAGS = $(LOCAL_BIN_CXXFLAGS)
@ -75,42 +72,3 @@ endif
LIBS = $(PMUSR_LIBS) $(USERFCN_LIBS) $(MUSR_ROOT_LIBS) $(LEM_LIBS) $(PSIBIN_LIBS) $(MUD_LIBS) $(PNEXUS_LIBS) \
$(FFTW3_LIBS) $(GSL_LIBS) $(ROOT_LIBS) $(LIBXML2_LIBS)
install-xmlDATA: $(xml_DATA)
test -z "$(xmldir)" || $(mkdir_p) "$(DESTDIR)$(xmldir)"
@if test -e "$(DESTDIR)$(xmldir)/$(xml_DATA)"; then \
DIFF="$$(diff "$(DESTDIR)$(xmldir)/$(xml_DATA)" "$(xml_DATA)" 2>&1)"; \
if test "x$$DIFF" != "x"; then \
echo " " && \
echo " musrfit_startup.xml in $(xmldir)" && \
echo " is different from the distribution's version." && \
echo " Do you want to overwrite it? [y/N]" && \
read OVERWRITE && \
if test "$$OVERWRITE" = "y" || test "$$OVERWRITE" = "Y"; then \
echo "$(INSTALL_DATA) '$(xml_DATA)' '$(DESTDIR)$(xmldir)'" && \
$(INSTALL_DATA) '$(xml_DATA)' '$(DESTDIR)$(xmldir)'; \
fi; \
fi; \
else \
echo "$(INSTALL_DATA) '$(xml_DATA)' '$(DESTDIR)$(xmldir)'" && \
$(INSTALL_DATA) '$(xml_DATA)' '$(DESTDIR)$(xmldir)'; \
fi
uninstall-xmlDATA:
@if test -e "$(DESTDIR)$(xmldir)/$(xml_DATA)"; then \
DIFF="$$(diff "$(DESTDIR)$(xmldir)/$(xml_DATA)" "$(xml_DATA)" 2>&1)"; \
if test "x$$DIFF" != "x"; then \
echo " " && \
echo " musrfit_startup.xml in $(xmldir)" && \
echo " is different from the distribution's version." && \
echo " Do you want to remove it? [y/N]" && \
read REMOVE && \
if test "$$REMOVE" = "y" || test "$$REMOVE" = "Y"; then \
echo "$(RM) '$(DESTDIR)$(xmldir)/$(xml_DATA)'" && \
$(RM) "$(DESTDIR)$(xmldir)/$(xml_DATA)"; \
fi; \
else \
echo "$(RM) '$(DESTDIR)$(xmldir)/$(xml_DATA)'" && \
$(RM) "$(DESTDIR)$(xmldir)/$(xml_DATA)"; \
fi; \
fi

View File

@ -27,6 +27,9 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <sys/types.h>
#include <sys/stat.h>
#include <cstdlib>
#include <iostream>
#include <fstream>
@ -140,6 +143,23 @@ PStartupHandler::PStartupHandler()
}
}
}
// if musrfit_startup.xml is still not found, will create a default one
if (!fStartupFileFound) {
cout << endl << "**INFO** no musrfit_startup.xml file found, will write a default one." << endl;
if (!WriteDefaulStartupFile()) {
cerr << endl << "**ERROR** couldn't write default musrfit_startup.xml." << endl;
} else {
home = getenv("HOME");
if (home != 0) {
sprintf(startup_path_name, "%s/.musrfit/musrfit_startup.xml", home);
if (StartupFileExists(startup_path_name)) {
fStartupFilePath = TString(startup_path_name);
fStartupFileFound = true;
}
}
}
}
}
//--------------------------------------------------------------------------
@ -566,6 +586,107 @@ Bool_t PStartupHandler::StartupFileExists(Char_t *fln)
return result;
}
//--------------------------------------------------------------------------
// WriteDefaulStartupFile
//--------------------------------------------------------------------------
Bool_t PStartupHandler::WriteDefaulStartupFile()
{
// get home
Char_t startup_path_name[256];
Char_t *home=0;
home = getenv("HOME");
if (home == 0) {
cerr << endl << "**ERROR** couldn't obtain $HOME." << endl;
return false;
}
// first check that $HOME/.musrfit exists and if NOT create it
struct stat info;
sprintf(startup_path_name, "%s/.musrfit", home);
if (!stat(startup_path_name, &info)) {
if (!(info.st_mode & S_IFDIR))
return false;
} else {
if (mkdir(startup_path_name, 0777)) {
cerr << endl << "**ERROR** couldn't create '" << startup_path_name << "'" << endl;
return false;
}
}
// set path-name for musrfit_startup.xml
sprintf(startup_path_name, "%s/.musrfit/musrfit_startup.xml", home);
ofstream fout(startup_path_name, ofstream::out);
if (!fout.is_open()) {
cerr << endl << "**ERROR** couldn't open '" << startup_path_name << "' for writing." << endl;
return false;
}
// write default musrfit_startup.xml
fout << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
fout << "<musrfit xmlns=\"http://lmu.web.psi.ch/musrfit/user/MUSR/WebHome.html\">" << endl;
fout << " <comment>" << endl;
fout << " Defines default settings for the musrfit package" << endl;
fout << " </comment>" << endl;
fout << " <data_path>/mnt/data/nemu/his</data_path>" << endl;
fout << " <data_path>/mnt/data/nemu/wkm</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/nemu/data/his</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/nemu/data/wkm</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gps</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/dolly</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/gpd</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/ltf</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/alc</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/hifi</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/bulkmusr/data/lem</data_path>" << endl;
fout << " <fourier_settings>" << endl;
fout << " <units>Gauss</units>" << endl;
fout << " <fourier_power>0</fourier_power>" << endl;
fout << " <apodization>none</apodization>" << endl;
fout << " <plot>real_and_imag</plot>" << endl;
fout << " <phase>0.0</phase>" << endl;
fout << " <phase_increment>1.0</phase_increment>" << endl;
fout << " </fourier_settings>" << endl;
fout << " <root_settings>" << endl;
fout << " <marker_list>" << endl;
fout << " <!-- Root marker numbers -->" << endl;
fout << " <marker>24</marker> <!-- open circle -->" << endl;
fout << " <marker>25</marker> <!-- open square -->" << endl;
fout << " <marker>26</marker> <!-- open triangle -->" << endl;
fout << " <marker>27</marker> <!-- open diamond -->" << endl;
fout << " <marker>28</marker> <!-- open cross -->" << endl;
fout << " <marker>29</marker> <!-- full star -->" << endl;
fout << " <marker>30</marker> <!-- open star -->" << endl;
fout << " <marker>20</marker> <!-- full circle -->" << endl;
fout << " <marker>21</marker> <!-- full square -->" << endl;
fout << " <marker>22</marker> <!-- full triangle -->" << endl;
fout << " <marker>23</marker> <!-- full triangle down -->" << endl;
fout << " <marker>2</marker> <!-- thin cross -->" << endl;
fout << " <marker>3</marker> <!-- thin star -->" << endl;
fout << " <marker>5</marker> <!-- thin x -->" << endl;
fout << " </marker_list>" << endl;
fout << " <color_list>" << endl;
fout << " <!-- Color as RGB coded string -->" << endl;
fout << " <color>0,0,0</color> <!-- kBlack -->" << endl;
fout << " <color>255,0,0</color> <!-- kRed -->" << endl;
fout << " <color>0,255,0</color> <!-- kGreen -->" << endl;
fout << " <color>0,0,255</color> <!-- kBlue -->" << endl;
fout << " <color>255,0,255</color> <!-- kMagenta -->" << endl;
fout << " <color>0,255,255</color> <!-- kCyan -->" << endl;
fout << " <color>153,0,255</color> <!-- kViolet-3 -->" << endl;
fout << " <color>102,102,51</color> <!-- kYellow-1 -->" << endl;
fout << " <color>51,102,51</color> <!-- kGreen-1 -->" << endl;
fout << " <color>153,0,0</color> <!-- kRed+2 -->" << endl;
fout << " </color_list>" << endl;
fout << " </root_settings>" << endl;
fout << "</musrfit>" << endl;
fout.close();
return true;
}
// -------------------------------------------------------------------------
// end
// -------------------------------------------------------------------------

View File

@ -68,12 +68,3 @@ uninstall-hook:
rm -f $(libdir)/libPNL_PippardFitter.so
endif
xmldir = $(HOME)/.musrfit/external
xml_DATA = nonlocal_startup.xml
install-xml_DATA: $(xml_DATA)
$(INSTALL_DATA) '$(xml_DATA)' '$xmldir'
uninstall-xml_DATA: $(xml_DATA)
$(RM) '$(xml_DATA)' '$xmldir'

View File

@ -65,13 +65,3 @@ uninstall-hook:
rm -f $(libdir)/libPPhotoMeissner.so
endif
# define default xml install
xmldir = $(HOME)/.musrfit/external
xml_DATA = ../test/photoMeissner_startup.xml
instal-xml_DATA: $(xml_DATA)
$(INSTALL_DATA) '$(xml_DATA)' '$(xmldir)'
uninstal-xml_DATA: $(xml_DATA)
$(RM) '$(xml_DATA)' '$(xmldir)'

View File

@ -65,13 +65,3 @@ uninstall-hook:
rm -f $(libdir)/libPSpinValve.so
endif
# define default xml install
xmldir = $(HOME)/.musrfit/external
xml_DATA = ../test/spinValve_startup.xml
instal-xml_DATA: $(xml_DATA)
$(INSTALL_DATA) '$(xml_DATA)' '$(xmldir)'
uninstal-xml_DATA: $(xml_DATA)
$(RM) '$(xml_DATA)' '$(xmldir)'

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<spin_valve_proximity xmlns="http://nemu.web.psi.ch/musrfit/libSpinValve">
<comment>
$Id$
number_of_fields: number of sampling points in field around the Lorentzian peak
range: range in which the sampling points are placed, given in units of \beta(1\pm\Delta)
</comment>

View File

@ -94,6 +94,7 @@ class PStartupHandler : public TObject, public TQObject
PIntVector fColorList; ///< color list
Bool_t StartupFileExists(Char_t *fln);
Bool_t WriteDefaulStartupFile();
ClassDef(PStartupHandler, 1)
};

View File

@ -36,7 +36,10 @@ using namespace std;
#include <QFile>
#include <QTextStream>
#include <QVector>
#include <QDir>
#include <QProcessEnvironment>
#include "musrfit-info.h"
#include "PAdmin.h"
//--------------------------------------------------------------------------
@ -259,7 +262,7 @@ bool PAdminXMLParser::characters(const QString& str)
else
flag = false;
fAdmin->setMusrviewShowAvgFlag(flag);
break;
break;
case eEnableMusrT0:
if (str == "y")
flag = true;
@ -578,13 +581,21 @@ QString PAdminXMLParser::expandPath(const QString &str)
QString msg;
QString newStr="";
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
QStringList list = str.split("/");
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
token = *it;
if (token.contains("$")) {
token.remove('$');
path = std::getenv(token.toLatin1());
if (!procEnv.contains(token)) {
msg = QString("Couldn't find '%1'. Some things might not work properly").arg(token);
QMessageBox::warning(0, "**WARNING**", msg, QMessageBox::Ok, QMessageBox::NoButton);
newStr = "";
break;
}
path = procEnv.value(token, "");
if (path.isEmpty()) {
msg = QString("Couldn't expand '%1'. Some things might not work properly").arg(token);
QMessageBox::warning(0, "**WARNING**", msg, QMessageBox::Ok, QMessageBox::NoButton);
@ -658,18 +669,25 @@ PAdmin::PAdmin() : QObject()
QString path = QString("./");
QString fln = QString("musredit_startup.xml");
QString pathFln = path + fln;
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
if (!QFile::exists(pathFln)) {
// 2nd: check $HOME/.musrfit/musredit/musredit_startup.xml
path = std::getenv("HOME");
path = procEnv.value("HOME", "");
pathFln = path + "/.musrfit/musredit/" + fln;
if (!QFile::exists(pathFln)) {
// 3rd: check $MUSRFITPATH/musredit_startup.xml
path = std::getenv("MUSRFITPATH");
path = procEnv.value("MUSRFITPATH", "");
pathFln = path + "/" + fln;
if (!QFile::exists(pathFln)) {
// 4th: check $ROOTSYS/bin/musredit_startup.xml
path = std::getenv("ROOTSYS");
path = procEnv.value("ROOTSYS", "");
pathFln = path + "/bin/" + fln;
if (!QFile::exists(pathFln)) {
// 5th: not found anyware hence create it
path = procEnv.value("HOME", "");
pathFln = path + "/.musrfit/musredit/" + fln;
createMusreditStartupFile();
}
}
}
}
@ -861,6 +879,12 @@ int PAdmin::savePrefs(QString pref_fln)
else
data[i] = " <enable_musrt0>n</enable_musrt0>";
}
if (data[i].contains("<font_name>") && data[i].contains("</font_name>")) {
data[i] = QString(" <font_name>%1</font_name>").arg(fFontName);
}
if (data[i].contains("<font_size>") && data[i].contains("</font_size>")) {
data[i] = QString(" <font_size>%1</font_size>").arg(fFontSize);
}
}
// write prefs
@ -910,6 +934,7 @@ void PAdmin::saveRecentFiles()
{
// check if musredit_startup.xml is present in the current directory, and if yes, use this file to
// save the recent file names otherwise use the "master" musredit_startup.xml
QString str("");
QString fln = QString("./musredit_startup.xml");
if (!QFile::exists(fln))
@ -967,6 +992,302 @@ void PAdmin::saveRecentFiles()
}
}
//--------------------------------------------------------------------------
/**
* @brief PAdmin::createMusreditStartupFile
*/
void PAdmin::createMusreditStartupFile()
{
// get $HOME
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
QString pathName = procEnv.value("HOME", "");
pathName += "/.musrfit/musredit";
// check if the directory $HOME/.musrfit/musredit exists if not create it
QDir dir(pathName);
if (!dir.exists()) {
// directory $HOME/.musrfit/musredit does not exist hence create it
dir.mkpath(pathName);
}
// create default musredit_startup.xml file in $HOME/.musrfit/musredit
pathName += "/musredit_startup.xml";
QFile file(pathName);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
QTextStream fout(&file);
fout << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
fout << "<musredit_startup xmlns=\"http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html\">" << endl;
fout << " <comment>" << endl;
fout << " This is handling default setting parameters for the musredit." << endl;
fout << " </comment>" << endl;
fout << " <general>" << endl;
fout << " <exec_path>" << MUSRFIT_PREFIX << "/bin</exec_path>" << endl;
fout << " <default_save_path>./</default_save_path>" << endl;
fout << " <msr_default_file_path>" << MUSRFIT_DOC_DIR << "/templates</msr_default_file_path>" << endl;
fout << " <timeout>3600</timeout>" << endl;
fout << " <keep_minuit2_output>n</keep_minuit2_output>" << endl;
fout << " <dump_ascii>n</dump_ascii>" << endl;
fout << " <dump_root>n</dump_root>" << endl;
fout << " <title_from_data_file>y</title_from_data_file>" << endl;
fout << " <chisq_per_run_block>n</chisq_per_run_block>" << endl;
fout << " <estimate_n0>y</estimate_n0>" << endl;
fout << " <musrview_show_fourier>n</musrview_show_fourier>" << endl;
fout << " <musrview_show_avg>n</musrview_show_avg>" << endl;
fout << " <enable_musrt0>y</enable_musrt0>" << endl;
fout << " </general>" << endl;
fout << " <recent_files>" << endl;
fout << " <path_file_name>" << MUSRFIT_DOC_DIR << "/examples/test-histo-PSI-BIN.msr</path_file_name>" << endl;
fout << " </recent_files>" << endl;
fout << " <help_section>" << endl;
fout << " <musr_web_main>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html</musr_web_main>" << endl;
fout << " <musr_web_title>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheTitle</musr_web_title>" << endl;
fout << " <musr_web_parameters>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheFitparameterBlock</musr_web_parameters>" << endl;
fout << " <musr_web_theory>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheTheoryBlock</musr_web_theory>" << endl;
fout << " <musr_web_functions>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheFunctionsBlock</musr_web_functions>" << endl;
fout << " <musr_web_run>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheRunBlock</musr_web_run>" << endl;
fout << " <musr_web_command>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheCommandsBlock</musr_web_command>" << endl;
fout << " <musr_web_fourier>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheFourierBlock</musr_web_fourier>" << endl;
fout << " <musr_web_plot>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#ThePlotBlock</musr_web_plot>" << endl;
fout << " <musr_web_statistic>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheStatisticBlock</musr_web_statistic>" << endl;
fout << " <musr_web_msr2data>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/Msr2Data.html</musr_web_msr2data>" << endl;
fout << " <musr_web_musrFT>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#A_2.3_musrFT</musr_web_musrFT>" << endl;
fout << " </help_section>" << endl;
fout << " <font_settings>" << endl;
#ifdef Q_OS_MAC
fout << " <font_name>Courier New</font_name>" << endl;
fout << " <font_size>16</font_size>" << endl;
#else
fout << " <font_name>Monospace</font_name>" << endl;
fout << " <font_size>12</font_size>" << endl;
#endif
fout << " </font_settings>" << endl;
fout << " <msr_file_defaults>" << endl;
fout << " <beamline>mue4</beamline>" << endl;
fout << " <institute>psi</institute>" << endl;
fout << " <file_format>root-npp</file_format>" << endl;
fout << " <lifetime_correction>y</lifetime_correction>" << endl;
fout << " </msr_file_defaults>" << endl;
fout << " <msr2data_defaults>" << endl;
fout << " <chain_fit>y</chain_fit>" << endl;
fout << " <write_data_header>y</write_data_header>" << endl;
fout << " <ignore_data_header_info>n</ignore_data_header_info>" << endl;
fout << " <keep_minuit2_output>n</keep_minuit2_output>" << endl;
fout << " <write_column_data>n</write_column_data>" << endl;
fout << " <recreate_data_file>n</recreate_data_file>" << endl;
fout << " <open_file_after_fitting>y</open_file_after_fitting>" << endl;
fout << " <create_msr_file_only>n</create_msr_file_only>" << endl;
fout << " <fit_only>n</fit_only>" << endl;
fout << " <global>n</global>" << endl;
fout << " <global_plus>n</global_plus>" << endl;
fout << " </msr2data_defaults>" << endl;
fout << " <func_pixmap_path>" << MUSRFIT_DOC_DIR << "/latex_images</func_pixmap_path>" << endl;
fout << " <theory_functions>" << endl;
fout << " <func>" << endl;
fout << " <name>asymmetry</name>" << endl;
fout << " <comment></comment>" << endl;
fout << " <label>Asymmetry</label>" << endl;
fout << " <pixmap>asymmetry.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>simplExpo</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>simple Exp</label>" << endl;
fout << " <pixmap>simpleExp.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>generExpo</name>" << endl;
fout << " <comment>(rate exponent)</comment>" << endl;
fout << " <label>general Exp</label>" << endl;
fout << " <pixmap>generalExp.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>simpleGss</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>simple Gauss</label>" << endl;
fout << " <pixmap>simpleGauss.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statGssKT</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>static Gauss KT</label>" << endl;
fout << " <pixmap>statGssKT.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statGssKTLF</name>" << endl;
fout << " <comment>(frequency damping)</comment>" << endl;
fout << " <label>static Gauss KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynGssKTLF</name>" << endl;
fout << " <comment>(frequency damping hopping-rate)</comment>" << endl;
fout << " <label>dynamic Gauss KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statExpKT</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>static Lorentz KT</label>" << endl;
fout << " <pixmap>statExpKT.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statExpKTLF</name>" << endl;
fout << " <comment>(frequency damping)</comment>" << endl;
fout << " <label>static Lorentz KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynExpKTLF</name>" << endl;
fout << " <comment>(frequency damping hopping-rate)</comment>" << endl;
fout << " <label>dynamic Lorentz KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>combiLGKT</name>" << endl;
fout << " <comment>(lorentzRate gaussRate)</comment>" << endl;
fout << " <label>combined Lorentz-Gauss KT</label>" << endl;
fout << " <pixmap>combiLGKT.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>strKT</name>" << endl;
fout << " <comment>(rate beta)</comment>" << endl;
fout << " <label>stretched Kubo-Toyabe</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>spinGlass</name>" << endl;
fout << " <comment>(rate hopping-rate order)</comment>" << endl;
fout << " <label>zero field spin glass function</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>rdAnisoHf</name>" << endl;
fout << " <comment>(frequency rate)</comment>" << endl;
fout << " <label>random anisotropic hyperfine function</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>abragam</name>" << endl;
fout << " <comment>(rate hopping-rate)</comment>" << endl;
fout << " <label>Abragam</label>" << endl;
fout << " <pixmap>abragam.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>TFieldCos</name>" << endl;
fout << " <comment>(phase frequency)</comment>" << endl;
fout << " <label>TF cos</label>" << endl;
fout << " <pixmap>tfCos.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internFld</name>" << endl;
fout << " <comment>(fraction phase frequency Trate Lrate)</comment>" << endl;
fout << " <label>internal Lorentz field</label>" << endl;
fout << " <pixmap>internalField.png</pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internFldGK</name>" << endl;
fout << " <comment>(fraction frequency Trate Lrate beta)</comment>" << endl;
fout << " <label>internal field, Gaussian broadened</label>" << endl;
fout << " <pixmap>internalFieldGK.png</pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internFldLL</name>" << endl;
fout << " <comment>(fraction frequency Trate Lrate)</comment>" << endl;
fout << " <label>internal field, Lorentzian broadened</label>" << endl;
fout << " <pixmap>internalFieldLL.png</pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>bessel</name>" << endl;
fout << " <comment>(phase frequency)</comment>" << endl;
fout << " <label>spherical Bessel 0th order</label>" << endl;
fout << " <pixmap>bessel.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internBsl</name>" << endl;
fout << " <comment>(fraction phase frequency Trate Lrate)</comment>" << endl;
fout << " <label>static internal Bessel</label>" << endl;
fout << " <pixmap>internalBessel.png</pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>skewedGss</name>" << endl;
fout << " <comment>(phase frequency rate_m rate_p)</comment>" << endl;
fout << " <label>skewed Gaussian</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>staticNKZF</name>" << endl;
fout << " <comment>(damping_D0 R_b)</comment>" << endl;
fout << " <label>static Noakes-Kalvius ZF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>staticNKTF</name>" << endl;
fout << " <comment>(phase frequency damping_D0 R_b)</comment>" << endl;
fout << " <label>static Noakes-Kalvius TF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynamicNKZF</name>" << endl;
fout << " <comment>(damping_D0 R_b nu_c)</comment>" << endl;
fout << " <label>dynamic Noakes-Kalvius ZF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynamicNKTF</name>" << endl;
fout << " <comment>(phase frequency damping_D0 R_b nu_c)</comment>" << endl;
fout << " <label>dynamic Noakes-Kalvius TF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>polynom</name>" << endl;
fout << " <comment>(tshift p0 p1 ... pn)</comment>" << endl;
fout << " <label>polynom</label>" << endl;
fout << " <pixmap>polynom.png</pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>userFcn</name>" << endl;
fout << " <comment></comment>" << endl;
fout << " <label>user function</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>0</params>" << endl;
fout << " </func>" << endl;
fout << " </theory_functions>" << endl;
fout << "</musredit_startup>" << endl;
file.close();
}
//--------------------------------------------------------------------------
// END
//--------------------------------------------------------------------------

View File

@ -209,6 +209,7 @@ class PAdmin : public QObject
QVector<PTheory> fTheory; ///< stores all known theories. Needed when generating theory blocks from within musredit.
void saveRecentFiles(); ///< save recent file list
void createMusreditStartupFile(); ///< create default musredit_startup.xml
};
#endif // _PADMIN_H_

View File

@ -1,10 +1,6 @@
TEMPLATE = app
TARGET = musredit
!exists( musredit_startup.xml ) {
error( "Configuration file musredit_startup.xml not found! Please configure musrfit first, before trying to install musredit!" )
}
# install path for musredit
count( PREFIX, 1 ) {
MUSREDIT_INSTALL_PATH = $${PREFIX}/bin
@ -67,8 +63,6 @@ macx {
unix:xml.path = $$(HOME)/.musrfit/musredit
macx:xml.path = $$(HOME)/.musrfit/musredit
win32:xml.path = c:/musrfit/bin
xml.files = musredit_startup.xml
INSTALLS += xml
CONFIG += qt \
warn_on \
@ -78,7 +72,10 @@ QT += xml
QT += webkit
QT += network
INCLUDEPATH += "../include"
HEADERS = musredit.h \
musrfit-info.h \
PHelp.h \
PTextEdit.h \
PSubTextEdit.h \
@ -101,7 +98,8 @@ HEADERS = musredit.h \
PGetFourierBlockDialog.h \
PGetPlotBlockDialog.h \
PMsr2DataDialog.h \
PMusrEditAbout.h
PMusrEditAbout.h \
../include/git-revision.h
SOURCES = PHelp.cpp \
PTextEdit.cpp \

View File

@ -1,260 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<musredit_startup xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html">
<comment>
This is handling default setting parameters for the musredit.
</comment>
<general>
<exec_path>@prefix@/bin</exec_path>
<default_save_path>./</default_save_path>
<msr_default_file_path>@DOCDIR@/templates</msr_default_file_path>
<timeout>3600</timeout>
<keep_minuit2_output>n</keep_minuit2_output>
<dump_ascii>n</dump_ascii>
<dump_root>n</dump_root>
<title_from_data_file>y</title_from_data_file>
<chisq_per_run_block>n</chisq_per_run_block>
<estimate_n0>y</estimate_n0>
<musrview_show_fourier>n</musrview_show_fourier>
<musrview_show_avg>n</musrview_show_avg>
<enable_musrt0>y</enable_musrt0>
</general>
<recent_files>
<path_file_name>/home/nemu/analysis/musrfit/doc/examples/test-histo-PSI-BIN.msr</path_file_name>
</recent_files>
<help_section>
<musr_web_main>file://@DOCDIR@/html/user/MUSR/MusrFit.html</musr_web_main>
<musr_web_title>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheTitle</musr_web_title>
<musr_web_parameters>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFitparameterBlock</musr_web_parameters>
<musr_web_theory>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheTheoryBlock</musr_web_theory>
<musr_web_functions>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFunctionsBlock</musr_web_functions>
<musr_web_run>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheRunBlock</musr_web_run>
<musr_web_command>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheCommandsBlock</musr_web_command>
<musr_web_fourier>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFourierBlock</musr_web_fourier>
<musr_web_plot>file://@DOCDIR@/html/user/MUSR/MusrFit.html#ThePlotBlock</musr_web_plot>
<musr_web_statistic>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheStatisticBlock</musr_web_statistic>
<musr_web_msr2data>file://@DOCDIR@/html/user/MUSR/Msr2Data.html</musr_web_msr2data>
<musr_web_musrFT>file://@DOCDIR@/html/user/MUSR/MusrFit.html#A_2.3_musrFT</musr_web_musrFT>
</help_section>
<font_settings>
<font_name>Courier New</font_name>
<font_size>12</font_size>
</font_settings>
<msr_file_defaults>
<beamline>mue4</beamline>
<institute>psi</institute>
<file_format>root-npp</file_format>
<lifetime_correction>y</lifetime_correction>
</msr_file_defaults>
<msr2data_defaults>
<chain_fit>y</chain_fit>
<write_data_header>y</write_data_header>
<ignore_data_header_info>n</ignore_data_header_info>
<keep_minuit2_output>n</keep_minuit2_output>
<write_column_data>n</write_column_data>
<recreate_data_file>n</recreate_data_file>
<open_file_after_fitting>y</open_file_after_fitting>
<create_msr_file_only>n</create_msr_file_only>
<fit_only>n</fit_only>
<global>n</global>
<global_plus>n</global_plus>
</msr2data_defaults>
<func_pixmap_path>@DOCDIR@/latex_images</func_pixmap_path>
<theory_functions>
<func>
<name>asymmetry</name>
<comment></comment>
<label>Asymmetry</label>
<pixmap>asymmetry.png</pixmap>
<params>1</params>
</func>
<func>
<name>simplExpo</name>
<comment>(rate)</comment>
<label>simple Exp</label>
<pixmap>simpleExp.png</pixmap>
<params>1</params>
</func>
<func>
<name>generExpo</name>
<comment>(rate exponent)</comment>
<label>general Exp</label>
<pixmap>generalExp.png</pixmap>
<params>2</params>
</func>
<func>
<name>simpleGss</name>
<comment>(rate)</comment>
<label>simple Gauss</label>
<pixmap>simpleGauss.png</pixmap>
<params>1</params>
</func>
<func>
<name>statGssKT</name>
<comment>(rate)</comment>
<label>static Gauss KT</label>
<pixmap>statGssKT.png</pixmap>
<params>1</params>
</func>
<func>
<name>statGssKTLF</name>
<comment>(frequency damping)</comment>
<label>static Gauss KT LF</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>dynGssKTLF</name>
<comment>(frequency damping hopping-rate)</comment>
<label>dynamic Gauss KT LF</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>statExpKT</name>
<comment>(rate)</comment>
<label>static Lorentz KT</label>
<pixmap>statExpKT.png</pixmap>
<params>1</params>
</func>
<func>
<name>statExpKTLF</name>
<comment>(frequency damping)</comment>
<label>static Lorentz KT LF</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>dynExpKTLF</name>
<comment>(frequency damping hopping-rate)</comment>
<label>dynamic Lorentz KT LF</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>combiLGKT</name>
<comment>(lorentzRate gaussRate)</comment>
<label>combined Lorentz-Gauss KT</label>
<pixmap>combiLGKT.png</pixmap>
<params>2</params>
</func>
<func>
<name>strKT</name>
<comment>(rate beta)</comment>
<label>stretched Kubo-Toyabe</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>spinGlass</name>
<comment>(rate hopping-rate order)</comment>
<label>zero field spin glass function</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>rdAnisoHf</name>
<comment>(frequency rate)</comment>
<label>random anisotropic hyperfine function</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>abragam</name>
<comment>(rate hopping-rate)</comment>
<label>Abragam</label>
<pixmap>abragam.png</pixmap>
<params>2</params>
</func>
<func>
<name>TFieldCos</name>
<comment>(phase frequency)</comment>
<label>TF cos</label>
<pixmap>tfCos.png</pixmap>
<params>2</params>
</func>
<func>
<name>internFld</name>
<comment>(fraction phase frequency Trate Lrate)</comment>
<label>internal Lorentz field</label>
<pixmap>internalField.png</pixmap>
<params>5</params>
</func>
<func>
<name>internFldGK</name>
<comment>(fraction frequency Trate Lrate beta)</comment>
<label>internal field, Gaussian broadened</label>
<pixmap>internalFieldGK.png</pixmap>
<params>5</params>
</func>
<func>
<name>internFldLL</name>
<comment>(fraction frequency Trate Lrate)</comment>
<label>internal field, Lorentzian broadened</label>
<pixmap>internalFieldLL.png</pixmap>
<params>4</params>
</func>
<func>
<name>bessel</name>
<comment>(phase frequency)</comment>
<label>spherical Bessel 0th order</label>
<pixmap>bessel.png</pixmap>
<params>2</params>
</func>
<func>
<name>internBsl</name>
<comment>(fraction phase frequency Trate Lrate)</comment>
<label>static internal Bessel</label>
<pixmap>internalBessel.png</pixmap>
<params>5</params>
</func>
<func>
<name>skewedGss</name>
<comment>(phase frequency rate_m rate_p)</comment>
<label>skewed Gaussian</label>
<pixmap></pixmap>
<params>4</params>
</func>
<func>
<name>staticNKZF</name>
<comment>(damping_D0 R_b)</comment>
<label>static Noakes-Kalvius ZF</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>staticNKTF</name>
<comment>(phase frequency damping_D0 R_b)</comment>
<label>static Noakes-Kalvius TF</label>
<pixmap></pixmap>
<params>4</params>
</func>
<func>
<name>dynamicNKZF</name>
<comment>(damping_D0 R_b nu_c)</comment>
<label>dynamic Noakes-Kalvius ZF</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>dynamicNKTF</name>
<comment>(phase frequency damping_D0 R_b nu_c)</comment>
<label>dynamic Noakes-Kalvius TF</label>
<pixmap></pixmap>
<params>5</params>
</func>
<func>
<name>polynom</name>
<comment>(tshift p0 p1 ... pn)</comment>
<label>polynom</label>
<pixmap>polynom.png</pixmap>
<params>4</params>
</func>
<func>
<name>userFcn</name>
<comment></comment>
<label>user function</label>
<pixmap></pixmap>
<params>0</params>
</func>
</theory_functions>
</musredit_startup>

View File

@ -36,9 +36,10 @@ using namespace std;
#include <QFile>
#include <QTextStream>
#include <QVector>
#include <QDir>
#include <QProcessEnvironment>
#include "musrfit-info.h"
#include "PAdmin.h"
//--------------------------------------------------------------------------
@ -681,6 +682,12 @@ PAdmin::PAdmin() : QObject()
// 4th: check $ROOTSYS/bin/musredit_startup.xml
path = procEnv.value("ROOTSYS", "");
pathFln = path + "/bin/" + fln;
if (!QFile::exists(pathFln)) {
// 5th: not found anyware hence create it
path = procEnv.value("HOME", "");
pathFln = path + "/.musrfit/musredit/" + fln;
createMusreditStartupFile();
}
}
}
}
@ -985,6 +992,302 @@ void PAdmin::saveRecentFiles()
}
}
//--------------------------------------------------------------------------
/**
* @brief PAdmin::createMusreditStartupFile
*/
void PAdmin::createMusreditStartupFile()
{
// get $HOME
QProcessEnvironment procEnv = QProcessEnvironment::systemEnvironment();
QString pathName = procEnv.value("HOME", "");
pathName += "/.musrfit/musredit";
// check if the directory $HOME/.musrfit/musredit exists if not create it
QDir dir(pathName);
if (!dir.exists()) {
// directory $HOME/.musrfit/musredit does not exist hence create it
dir.mkpath(pathName);
}
// create default musredit_startup.xml file in $HOME/.musrfit/musredit
pathName += "/musredit_startup.xml";
QFile file(pathName);
if (!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
QTextStream fout(&file);
fout << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
fout << "<musredit_startup xmlns=\"http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html\">" << endl;
fout << " <comment>" << endl;
fout << " This is handling default setting parameters for the musredit." << endl;
fout << " </comment>" << endl;
fout << " <general>" << endl;
fout << " <exec_path>" << MUSRFIT_PREFIX << "/bin</exec_path>" << endl;
fout << " <default_save_path>./</default_save_path>" << endl;
fout << " <msr_default_file_path>" << MUSRFIT_DOC_DIR << "/templates</msr_default_file_path>" << endl;
fout << " <timeout>3600</timeout>" << endl;
fout << " <keep_minuit2_output>n</keep_minuit2_output>" << endl;
fout << " <dump_ascii>n</dump_ascii>" << endl;
fout << " <dump_root>n</dump_root>" << endl;
fout << " <title_from_data_file>y</title_from_data_file>" << endl;
fout << " <chisq_per_run_block>n</chisq_per_run_block>" << endl;
fout << " <estimate_n0>y</estimate_n0>" << endl;
fout << " <musrview_show_fourier>n</musrview_show_fourier>" << endl;
fout << " <musrview_show_avg>n</musrview_show_avg>" << endl;
fout << " <enable_musrt0>y</enable_musrt0>" << endl;
fout << " </general>" << endl;
fout << " <recent_files>" << endl;
fout << " <path_file_name>" << MUSRFIT_DOC_DIR << "/examples/test-histo-PSI-BIN.msr</path_file_name>" << endl;
fout << " </recent_files>" << endl;
fout << " <help_section>" << endl;
fout << " <musr_web_main>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html</musr_web_main>" << endl;
fout << " <musr_web_title>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheTitle</musr_web_title>" << endl;
fout << " <musr_web_parameters>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheFitparameterBlock</musr_web_parameters>" << endl;
fout << " <musr_web_theory>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheTheoryBlock</musr_web_theory>" << endl;
fout << " <musr_web_functions>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheFunctionsBlock</musr_web_functions>" << endl;
fout << " <musr_web_run>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheRunBlock</musr_web_run>" << endl;
fout << " <musr_web_command>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheCommandsBlock</musr_web_command>" << endl;
fout << " <musr_web_fourier>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheFourierBlock</musr_web_fourier>" << endl;
fout << " <musr_web_plot>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#ThePlotBlock</musr_web_plot>" << endl;
fout << " <musr_web_statistic>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#TheStatisticBlock</musr_web_statistic>" << endl;
fout << " <musr_web_msr2data>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/Msr2Data.html</musr_web_msr2data>" << endl;
fout << " <musr_web_musrFT>file://" << MUSRFIT_DOC_DIR << "/html/user/MUSR/MusrFit.html#A_2.3_musrFT</musr_web_musrFT>" << endl;
fout << " </help_section>" << endl;
fout << " <font_settings>" << endl;
#ifdef Q_OS_MAC
fout << " <font_name>Courier New</font_name>" << endl;
fout << " <font_size>16</font_size>" << endl;
#else
fout << " <font_name>Monospace</font_name>" << endl;
fout << " <font_size>12</font_size>" << endl;
#endif
fout << " </font_settings>" << endl;
fout << " <msr_file_defaults>" << endl;
fout << " <beamline>mue4</beamline>" << endl;
fout << " <institute>psi</institute>" << endl;
fout << " <file_format>root-npp</file_format>" << endl;
fout << " <lifetime_correction>y</lifetime_correction>" << endl;
fout << " </msr_file_defaults>" << endl;
fout << " <msr2data_defaults>" << endl;
fout << " <chain_fit>y</chain_fit>" << endl;
fout << " <write_data_header>y</write_data_header>" << endl;
fout << " <ignore_data_header_info>n</ignore_data_header_info>" << endl;
fout << " <keep_minuit2_output>n</keep_minuit2_output>" << endl;
fout << " <write_column_data>n</write_column_data>" << endl;
fout << " <recreate_data_file>n</recreate_data_file>" << endl;
fout << " <open_file_after_fitting>y</open_file_after_fitting>" << endl;
fout << " <create_msr_file_only>n</create_msr_file_only>" << endl;
fout << " <fit_only>n</fit_only>" << endl;
fout << " <global>n</global>" << endl;
fout << " <global_plus>n</global_plus>" << endl;
fout << " </msr2data_defaults>" << endl;
fout << " <func_pixmap_path>" << MUSRFIT_DOC_DIR << "/latex_images</func_pixmap_path>" << endl;
fout << " <theory_functions>" << endl;
fout << " <func>" << endl;
fout << " <name>asymmetry</name>" << endl;
fout << " <comment></comment>" << endl;
fout << " <label>Asymmetry</label>" << endl;
fout << " <pixmap>asymmetry.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>simplExpo</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>simple Exp</label>" << endl;
fout << " <pixmap>simpleExp.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>generExpo</name>" << endl;
fout << " <comment>(rate exponent)</comment>" << endl;
fout << " <label>general Exp</label>" << endl;
fout << " <pixmap>generalExp.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>simpleGss</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>simple Gauss</label>" << endl;
fout << " <pixmap>simpleGauss.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statGssKT</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>static Gauss KT</label>" << endl;
fout << " <pixmap>statGssKT.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statGssKTLF</name>" << endl;
fout << " <comment>(frequency damping)</comment>" << endl;
fout << " <label>static Gauss KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynGssKTLF</name>" << endl;
fout << " <comment>(frequency damping hopping-rate)</comment>" << endl;
fout << " <label>dynamic Gauss KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statExpKT</name>" << endl;
fout << " <comment>(rate)</comment>" << endl;
fout << " <label>static Lorentz KT</label>" << endl;
fout << " <pixmap>statExpKT.png</pixmap>" << endl;
fout << " <params>1</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>statExpKTLF</name>" << endl;
fout << " <comment>(frequency damping)</comment>" << endl;
fout << " <label>static Lorentz KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynExpKTLF</name>" << endl;
fout << " <comment>(frequency damping hopping-rate)</comment>" << endl;
fout << " <label>dynamic Lorentz KT LF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>combiLGKT</name>" << endl;
fout << " <comment>(lorentzRate gaussRate)</comment>" << endl;
fout << " <label>combined Lorentz-Gauss KT</label>" << endl;
fout << " <pixmap>combiLGKT.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>strKT</name>" << endl;
fout << " <comment>(rate beta)</comment>" << endl;
fout << " <label>stretched Kubo-Toyabe</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>spinGlass</name>" << endl;
fout << " <comment>(rate hopping-rate order)</comment>" << endl;
fout << " <label>zero field spin glass function</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>rdAnisoHf</name>" << endl;
fout << " <comment>(frequency rate)</comment>" << endl;
fout << " <label>random anisotropic hyperfine function</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>abragam</name>" << endl;
fout << " <comment>(rate hopping-rate)</comment>" << endl;
fout << " <label>Abragam</label>" << endl;
fout << " <pixmap>abragam.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>TFieldCos</name>" << endl;
fout << " <comment>(phase frequency)</comment>" << endl;
fout << " <label>TF cos</label>" << endl;
fout << " <pixmap>tfCos.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internFld</name>" << endl;
fout << " <comment>(fraction phase frequency Trate Lrate)</comment>" << endl;
fout << " <label>internal Lorentz field</label>" << endl;
fout << " <pixmap>internalField.png</pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internFldGK</name>" << endl;
fout << " <comment>(fraction frequency Trate Lrate beta)</comment>" << endl;
fout << " <label>internal field, Gaussian broadened</label>" << endl;
fout << " <pixmap>internalFieldGK.png</pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internFldLL</name>" << endl;
fout << " <comment>(fraction frequency Trate Lrate)</comment>" << endl;
fout << " <label>internal field, Lorentzian broadened</label>" << endl;
fout << " <pixmap>internalFieldLL.png</pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>bessel</name>" << endl;
fout << " <comment>(phase frequency)</comment>" << endl;
fout << " <label>spherical Bessel 0th order</label>" << endl;
fout << " <pixmap>bessel.png</pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>internBsl</name>" << endl;
fout << " <comment>(fraction phase frequency Trate Lrate)</comment>" << endl;
fout << " <label>static internal Bessel</label>" << endl;
fout << " <pixmap>internalBessel.png</pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>skewedGss</name>" << endl;
fout << " <comment>(phase frequency rate_m rate_p)</comment>" << endl;
fout << " <label>skewed Gaussian</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>staticNKZF</name>" << endl;
fout << " <comment>(damping_D0 R_b)</comment>" << endl;
fout << " <label>static Noakes-Kalvius ZF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>2</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>staticNKTF</name>" << endl;
fout << " <comment>(phase frequency damping_D0 R_b)</comment>" << endl;
fout << " <label>static Noakes-Kalvius TF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynamicNKZF</name>" << endl;
fout << " <comment>(damping_D0 R_b nu_c)</comment>" << endl;
fout << " <label>dynamic Noakes-Kalvius ZF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>3</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>dynamicNKTF</name>" << endl;
fout << " <comment>(phase frequency damping_D0 R_b nu_c)</comment>" << endl;
fout << " <label>dynamic Noakes-Kalvius TF</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>5</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>polynom</name>" << endl;
fout << " <comment>(tshift p0 p1 ... pn)</comment>" << endl;
fout << " <label>polynom</label>" << endl;
fout << " <pixmap>polynom.png</pixmap>" << endl;
fout << " <params>4</params>" << endl;
fout << " </func>" << endl;
fout << " <func>" << endl;
fout << " <name>userFcn</name>" << endl;
fout << " <comment></comment>" << endl;
fout << " <label>user function</label>" << endl;
fout << " <pixmap></pixmap>" << endl;
fout << " <params>0</params>" << endl;
fout << " </func>" << endl;
fout << " </theory_functions>" << endl;
fout << "</musredit_startup>" << endl;
file.close();
}
//--------------------------------------------------------------------------
// END
//--------------------------------------------------------------------------

View File

@ -209,6 +209,7 @@ class PAdmin : public QObject
QVector<PTheory> fTheory; ///< stores all known theories. Needed when generating theory blocks from within musredit.
void saveRecentFiles(); ///< save recent file list
void createMusreditStartupFile(); ///< create default musredit_startup.xml
};
#endif // _PADMIN_H_

View File

@ -1,10 +1,6 @@
TEMPLATE = app
TARGET = musredit
!exists( musredit_startup.xml ) {
error( "Configuration file musredit_startup.xml not found! Please configure musrfit first, before trying to install musredit!" )
}
# install path for musredit
count( PREFIX, 1 ) {
MUSREDIT_INSTALL_PATH = $${PREFIX}/bin
@ -67,8 +63,6 @@ macx {
unix:xml.path = $$(HOME)/.musrfit/musredit
macx:xml.path = $$(HOME)/.musrfit/musredit
win32:xml.path = c:/musrfit/bin
xml.files = musredit_startup.xml
INSTALLS += xml
CONFIG += qt \
warn_on \
@ -84,6 +78,7 @@ QT += svg
INCLUDEPATH += "../include"
HEADERS = musredit.h \
musrfit-info.h \
PHelp.h \
PTextEdit.h \
PSubTextEdit.h \

View File

@ -1,260 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<musredit_startup xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html">
<comment>
This is handling default setting parameters for the musredit.
</comment>
<general>
<exec_path>@prefix@/bin</exec_path>
<default_save_path>./</default_save_path>
<msr_default_file_path>@DOCDIR@/templates</msr_default_file_path>
<timeout>3600</timeout>
<keep_minuit2_output>n</keep_minuit2_output>
<dump_ascii>n</dump_ascii>
<dump_root>n</dump_root>
<title_from_data_file>y</title_from_data_file>
<chisq_per_run_block>n</chisq_per_run_block>
<estimate_n0>y</estimate_n0>
<musrview_show_fourier>n</musrview_show_fourier>
<musrview_show_avg>n</musrview_show_avg>
<enable_musrt0>y</enable_musrt0>
</general>
<recent_files>
<path_file_name>/home/nemu/analysis/musrfit/doc/examples/test-histo-PSI-BIN.msr</path_file_name>
</recent_files>
<help_section>
<musr_web_main>file://@DOCDIR@/html/user/MUSR/MusrFit.html</musr_web_main>
<musr_web_title>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheTitle</musr_web_title>
<musr_web_parameters>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFitparameterBlock</musr_web_parameters>
<musr_web_theory>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheTheoryBlock</musr_web_theory>
<musr_web_functions>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFunctionsBlock</musr_web_functions>
<musr_web_run>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheRunBlock</musr_web_run>
<musr_web_command>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheCommandsBlock</musr_web_command>
<musr_web_fourier>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheFourierBlock</musr_web_fourier>
<musr_web_plot>file://@DOCDIR@/html/user/MUSR/MusrFit.html#ThePlotBlock</musr_web_plot>
<musr_web_statistic>file://@DOCDIR@/html/user/MUSR/MusrFit.html#TheStatisticBlock</musr_web_statistic>
<musr_web_msr2data>file://@DOCDIR@/html/user/MUSR/Msr2Data.html</musr_web_msr2data>
<musr_web_musrFT>file://@DOCDIR@/html/user/MUSR/MusrFit.html#A_2.3_musrFT</musr_web_musrFT>
</help_section>
<font_settings>
<font_name>Monospace</font_name>
<font_size>12</font_size>
</font_settings>
<msr_file_defaults>
<beamline>mue4</beamline>
<institute>psi</institute>
<file_format>root-npp</file_format>
<lifetime_correction>y</lifetime_correction>
</msr_file_defaults>
<msr2data_defaults>
<chain_fit>y</chain_fit>
<write_data_header>y</write_data_header>
<ignore_data_header_info>n</ignore_data_header_info>
<keep_minuit2_output>n</keep_minuit2_output>
<write_column_data>n</write_column_data>
<recreate_data_file>n</recreate_data_file>
<open_file_after_fitting>y</open_file_after_fitting>
<create_msr_file_only>n</create_msr_file_only>
<fit_only>n</fit_only>
<global>n</global>
<global_plus>n</global_plus>
</msr2data_defaults>
<func_pixmap_path>@DOCDIR@/latex_images</func_pixmap_path>
<theory_functions>
<func>
<name>asymmetry</name>
<comment></comment>
<label>Asymmetry</label>
<pixmap>asymmetry.png</pixmap>
<params>1</params>
</func>
<func>
<name>simplExpo</name>
<comment>(rate)</comment>
<label>simple Exp</label>
<pixmap>simpleExp.png</pixmap>
<params>1</params>
</func>
<func>
<name>generExpo</name>
<comment>(rate exponent)</comment>
<label>general Exp</label>
<pixmap>generalExp.png</pixmap>
<params>2</params>
</func>
<func>
<name>simpleGss</name>
<comment>(rate)</comment>
<label>simple Gauss</label>
<pixmap>simpleGauss.png</pixmap>
<params>1</params>
</func>
<func>
<name>statGssKT</name>
<comment>(rate)</comment>
<label>static Gauss KT</label>
<pixmap>statGssKT.png</pixmap>
<params>1</params>
</func>
<func>
<name>statGssKTLF</name>
<comment>(frequency damping)</comment>
<label>static Gauss KT LF</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>dynGssKTLF</name>
<comment>(frequency damping hopping-rate)</comment>
<label>dynamic Gauss KT LF</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>statExpKT</name>
<comment>(rate)</comment>
<label>static Lorentz KT</label>
<pixmap>statExpKT.png</pixmap>
<params>1</params>
</func>
<func>
<name>statExpKTLF</name>
<comment>(frequency damping)</comment>
<label>static Lorentz KT LF</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>dynExpKTLF</name>
<comment>(frequency damping hopping-rate)</comment>
<label>dynamic Lorentz KT LF</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>combiLGKT</name>
<comment>(lorentzRate gaussRate)</comment>
<label>combined Lorentz-Gauss KT</label>
<pixmap>combiLGKT.png</pixmap>
<params>2</params>
</func>
<func>
<name>strKT</name>
<comment>(rate beta)</comment>
<label>stretched Kubo-Toyabe</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>spinGlass</name>
<comment>(rate hopping-rate order)</comment>
<label>zero field spin glass function</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>rdAnisoHf</name>
<comment>(frequency rate)</comment>
<label>random anisotropic hyperfine function</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>abragam</name>
<comment>(rate hopping-rate)</comment>
<label>Abragam</label>
<pixmap>abragam.png</pixmap>
<params>2</params>
</func>
<func>
<name>TFieldCos</name>
<comment>(phase frequency)</comment>
<label>TF cos</label>
<pixmap>tfCos.png</pixmap>
<params>2</params>
</func>
<func>
<name>internFld</name>
<comment>(fraction phase frequency Trate Lrate)</comment>
<label>internal Lorentz field</label>
<pixmap>internalField.png</pixmap>
<params>5</params>
</func>
<func>
<name>internFldGK</name>
<comment>(fraction frequency Trate Lrate beta)</comment>
<label>internal field, Gaussian broadened</label>
<pixmap>internalFieldGK.png</pixmap>
<params>5</params>
</func>
<func>
<name>internFldLL</name>
<comment>(fraction frequency Trate Lrate)</comment>
<label>internal field, Lorentzian broadened</label>
<pixmap>internalFieldLL.png</pixmap>
<params>4</params>
</func>
<func>
<name>bessel</name>
<comment>(phase frequency)</comment>
<label>spherical Bessel 0th order</label>
<pixmap>bessel.png</pixmap>
<params>2</params>
</func>
<func>
<name>internBsl</name>
<comment>(fraction phase frequency Trate Lrate)</comment>
<label>static internal Bessel</label>
<pixmap>internalBessel.png</pixmap>
<params>5</params>
</func>
<func>
<name>skewedGss</name>
<comment>(phase frequency rate_m rate_p)</comment>
<label>skewed Gaussian</label>
<pixmap></pixmap>
<params>4</params>
</func>
<func>
<name>staticNKZF</name>
<comment>(damping_D0 R_b)</comment>
<label>static Noakes-Kalvius ZF</label>
<pixmap></pixmap>
<params>2</params>
</func>
<func>
<name>staticNKTF</name>
<comment>(phase frequency damping_D0 R_b)</comment>
<label>static Noakes-Kalvius TF</label>
<pixmap></pixmap>
<params>4</params>
</func>
<func>
<name>dynamicNKZF</name>
<comment>(damping_D0 R_b nu_c)</comment>
<label>dynamic Noakes-Kalvius ZF</label>
<pixmap></pixmap>
<params>3</params>
</func>
<func>
<name>dynamicNKTF</name>
<comment>(phase frequency damping_D0 R_b nu_c)</comment>
<label>dynamic Noakes-Kalvius TF</label>
<pixmap></pixmap>
<params>5</params>
</func>
<func>
<name>polynom</name>
<comment>(tshift p0 p1 ... pn)</comment>
<label>polynom</label>
<pixmap>polynom.png</pixmap>
<params>4</params>
</func>
<func>
<name>userFcn</name>
<comment></comment>
<label>user function</label>
<pixmap></pixmap>
<params>0</params>
</func>
</theory_functions>
</musredit_startup>

View File

@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<musrfit xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/WebHome.html">
<comment>
Defines default settings for the musrfit package
</comment>
<data_path>/mnt/data/nemu/his</data_path>
<data_path>/mnt/data/nemu/wkm</data_path>
<data_path>/afs/psi.ch/project/nemu/data/his</data_path>
<data_path>/afs/psi.ch/project/nemu/data/wkm</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/gps</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/dolly</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/gpd</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/ltf</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/alc</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/hifi</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/lem</data_path>
<fourier_settings>
<units>Gauss</units>
<fourier_power>0</fourier_power>
<apodization>none</apodization>
<plot>real_and_imag</plot>
<phase>0.0</phase>
<phase_increment>1.0</phase_increment>
</fourier_settings>
<root_settings>
<marker_list>
<!-- Root marker numbers -->
<marker>24</marker> <!-- open circle -->
<marker>25</marker> <!-- open square -->
<marker>26</marker> <!-- open triangle -->
<marker>27</marker> <!-- open diamond -->
<marker>28</marker> <!-- open cross -->
<marker>29</marker> <!-- full star -->
<marker>30</marker> <!-- open star -->
<marker>20</marker> <!-- full circle -->
<marker>21</marker> <!-- full square -->
<marker>22</marker> <!-- full triangle -->
<marker>23</marker> <!-- full triangle down -->
<marker>2</marker> <!-- thin cross -->
<marker>3</marker> <!-- thin star -->
<marker>5</marker> <!-- thin x -->
</marker_list>
<color_list>
<!-- Color as RGB coded string -->
<color>0,0,0</color> <!-- kBlack -->
<color>255,0,0</color> <!-- kRed -->
<color>0,255,0</color> <!-- kGreen -->
<color>0,0,255</color> <!-- kBlue -->
<color>255,0,255</color> <!-- kMagenta -->
<color>0,255,255</color> <!-- kCyan -->
<color>153,0,255</color> <!-- kViolet-3 -->
<color>102,102,51</color> <!-- kYellow-1 -->
<color>51,102,51</color> <!-- kGreen-1 -->
<color>153,0,0</color> <!-- kRed+2 -->
</color_list>
</root_settings>
</musrfit>