19 Commits
v1.0 ... v1.2

Author SHA1 Message Date
c4d52df3bc since my automake structure is now ready for rpmbuild, the version number is increased. 2017-10-26 15:47:35 +02:00
bb18b01514 configure slightly extended to deal with rpmbuild. 2017-10-25 13:11:13 +02:00
b1422053ab fix of a stupied copy/paste error. 2017-10-24 09:08:40 +02:00
9dd3340f78 check if DOCDIR has not already injected from the command line. 2017-10-24 09:00:39 +02:00
63db43519c add a dynamic LF example. 2017-10-06 08:08:34 +02:00
c2f5d01beb fixed an ugly mistake in the opimization of the non-analytic LF integrals. 2017-10-04 16:48:31 +02:00
f83cf055be move __swap__.msr file to /Users/suter_a/.musrfit. This makes sure that it can be written even when musredit is started from a readonly destination. 2017-10-02 16:54:47 +02:00
27a744c8f5 removed some default directories since it potentially leads to problems. 2017-09-06 15:13:22 +02:00
720d62dc51 improved Qt5 checks (Qt5WebKit (old) versus Qt5WebEngine (new)) 2017-09-06 09:10:29 +02:00
79b59b6dfb updated the version number 2017-09-05 07:51:27 +02:00
bb5f502398 deal with run-time-path for macOS. 2017-08-30 16:12:29 +02:00
462119dd35 adopted dark scheme for 'elementary-xfce-darker' 2017-08-29 07:58:55 +02:00
33da0caf2c Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2017-08-28 10:47:59 +02:00
455129be6b updated the musrfit_dox.cfg file. 2017-08-28 10:47:39 +02:00
1ae0b284b4 proper minimal ROOT version number check. 2017-08-16 20:59:29 +02:00
80a7398350 found another date issue which is fixed now. 2017-06-06 12:15:17 +02:00
60b804c3a1 Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2017-06-06 10:51:07 +02:00
c6cee9f6d8 fixed wrong month in the data conversion. 2017-06-06 10:49:43 +02:00
07a1dc1d59 fix logy scaling problem. 2017-05-19 20:17:07 +02:00
10 changed files with 155 additions and 55 deletions

View File

@ -12,6 +12,17 @@ or
https://bitbucket.org/muonspin/musrfit/commits/all https://bitbucket.org/muonspin/musrfit/commits/all
Release of V1.2.0, 2017/10/26
=============================
Adopted to be ready for rpm builds in a first step. This will be followed by debian style
packages.
Release of V1.1.0, 2017/10/26
=============================
Added full DKS support, i.e. additionally to CUDA also OpenCL for GPU's and CPU's in place.
Release of V1.0.0, 2017/05/18 Release of V1.0.0, 2017/05/18
============================= =============================

View File

@ -1,7 +1,7 @@
AC_REVISION([m4_esyscmd_s([git describe --always])]) AC_REVISION([m4_esyscmd_s([git describe --always])])
AC_PREREQ(2.63) AC_PREREQ(2.63)
AC_INIT([musrfit],[1.0.0],[andreas.suter@psi.ch]) AC_INIT([musrfit],[1.2.0],[andreas.suter@psi.ch])
AC_CONFIG_AUX_DIR(admin) AC_CONFIG_AUX_DIR(admin)
AC_CANONICAL_HOST AC_CANONICAL_HOST
#AC_MSG_RESULT([${host} ${host_cpu} ${host_vendor} ${host_os}]) #AC_MSG_RESULT([${host} ${host_cpu} ${host_vendor} ${host_os}])
@ -35,7 +35,7 @@ dnl -----------------------------------------------
#release versioning #release versioning
MUSR_MAJOR_VERSION=1 MUSR_MAJOR_VERSION=1
MUSR_MINOR_VERSION=0 MUSR_MINOR_VERSION=2
MUSR_MICRO_VERSION=0 MUSR_MICRO_VERSION=0
#release versioning #release versioning
@ -421,7 +421,7 @@ dnl -----------------------------------------------
dnl Check for ROOT dnl Check for ROOT
dnl ----------------------------------------------- dnl -----------------------------------------------
ROOT_PATH([5.22/00], [], AC_MSG_ERROR([Either ROOT is not installed correctly or the version is too old... please check!])) ROOT_PATH([6.06/00], [], AC_MSG_ERROR([Either ROOT is not installed correctly or the version is too old... please check!]))
ROOT_LIBS="-L${ROOTLIBDIR} ${ROOTGLIBS} ${ROOTAUXLIBS} -lMinuit2 -lMathMore -lXMLParser" ROOT_LIBS="-L${ROOTLIBDIR} ${ROOTGLIBS} ${ROOTAUXLIBS} -lMinuit2 -lMathMore -lXMLParser"
ROOT_CFLAGS="-I${ROOTINCDIR} ${ROOTCFLAGS} ${ROOTAUXCFLAGS}" ROOT_CFLAGS="-I${ROOTINCDIR} ${ROOTCFLAGS} ${ROOTAUXCFLAGS}"
@ -1000,6 +1000,14 @@ if test "x$enable_editor" != "xno"; then
[PKG_CHECK_MODULES(QT3MT, qt-mt >= 3.3.0 qt-mt < 4.0, [QT3MT_FOUND=yes], [QT3MT_FOUND=no])] [PKG_CHECK_MODULES(QT3MT, qt-mt >= 3.3.0 qt-mt < 4.0, [QT3MT_FOUND=yes], [QT3MT_FOUND=no])]
)] )]
) )
fi
if test "x${QT5_FOUND}" != "xyes"; then
PKG_CHECK_MODULES(QT5, Qt5WebEngine >= $QT5MINVER Qt5Xml >= $QT5MINVER, [QT5_FOUND=yes],
[AC_MSG_NOTICE([Qt5 (including Qt5WebEngine and Qt5Xml) not found!])
PKG_CHECK_MODULES(QT3, qt >= 3.3.0 qt < 4.0, [QT3_FOUND=yes],
[PKG_CHECK_MODULES(QT3MT, qt-mt >= 3.3.0 qt-mt < 4.0, [QT3MT_FOUND=yes], [QT3MT_FOUND=no])]
)]
)
fi] fi]
) )
@ -1024,6 +1032,12 @@ if test "x$enable_editor" != "xno"; then
QTEDITOR=musrgui QTEDITOR=musrgui
fi fi
dnl if Qt5 but Qt5WebEngine instead of Qt5WebKit
if test "x$QTPATH" = "x"; then
QTPATH=$(pkg-config --variable=prefix Qt5WebEngine)
QTEDITOR=musredit_qt5
fi
AC_MSG_CHECKING([for qmake]) AC_MSG_CHECKING([for qmake])
if test "x${QTPATH}" != "xnone"; then if test "x${QTPATH}" != "xnone"; then
if test "x$QTEDITOR" = "xmusredit_qt5"; then if test "x$QTEDITOR" = "xmusredit_qt5"; then
@ -1147,6 +1161,7 @@ case "$host" in
*-*-darwin*) *-*-darwin*)
ARCH=DARWIN ARCH=DARWIN
LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS} -D_Darwin_" LOCAL_PSIBIN_LIB_CXXFLAGS="${LOCAL_LIB_CXXFLAGS} -D_Darwin_"
LOCAL_BIN_LDFLAGS="${LOCAL_BIN_LDFLAGS} -Wl,-rpath ${ROOTLIBDIR}"
;; ;;
*) *)
ARCH=OTHERUNIX ARCH=OTHERUNIX
@ -1197,11 +1212,24 @@ else
INSTALLDIR="${prefix}" INSTALLDIR="${prefix}"
fi fi
if test -d "${INSTALLDIR}/doc" dnl only define DOCDIR if not already present. This allows
dnl to feed DOCDIR on the configure level which is useful when
dnl for instance building a rpm. DOCDIR2 is needed for rpmbuild only
if test "x${DOCDIR}" = "x"
then then
DOCDIR="${INSTALLDIR}/doc/musrfit" if test -d "${INSTALLDIR}/doc"
then
DOCDIR="${INSTALLDIR}/doc/musrfit"
else
DOCDIR="${INSTALLDIR}/share/doc/musrfit"
fi
else else
DOCDIR="${INSTALLDIR}/share/doc/musrfit" if test -d "${INSTALLDIR}/doc"
then
DOCDIR2="${INSTALLDIR}/doc/musrfit"
else
DOCDIR2="${INSTALLDIR}/share/doc/musrfit"
fi
fi fi
AC_SUBST(DOCDIR) AC_SUBST(DOCDIR)
@ -1426,12 +1454,21 @@ echo ""
dnl -------------- dnl --------------
dnl create header file that musredit knows at runtime where to find the documentation dnl create header file that musredit knows at runtime where to find the documentation
dnl the DOCDIR2 tag is used for rpmbuild only
dnl -------------- dnl --------------
if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit_qt5"; then 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_PREFIX \"${INSTALLDIR}\" > src/musredit_qt5/musrfit-info.h
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit_qt5/musrfit-info.h if test "x$DOCDIR2" = "x"; then
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit_qt5/musrfit-info.h
else
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR2}\" >> src/musredit_qt5/musrfit-info.h
fi
fi fi
if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit"; then 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_PREFIX \"${INSTALLDIR}\" > src/musredit/musrfit-info.h
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit/musrfit-info.h if test "x$DOCDIR2" = "x"; then
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit/musrfit-info.h
else
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR2}\" >> src/musredit/musrfit-info.h
fi
fi fi

Binary file not shown.

View File

@ -0,0 +1,60 @@
BaB6 T20K LF5G
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 alpha 0.7 0 none 0 none
2 asy 0.2091 -0.0013 0.0013 0 0.33
3 field 2.127 0 none 0 none
4 width 0.5387 -0.0054 0.0055 0 100
5 hopp 0.119 -0.013 0.014 0 100
6 asyConst 0 0 none
###############################################################
THEORY
asymmetry 2
dynGssKTLF fun1 4 5 (frequency damping hopping-rate)
+
asymmetry 6
###############################################################
FUNCTIONS
fun1 = par3 * gamma_mu
###############################################################
RUN data/deltat_tdc_dolly_1020 PIE1 PSI PSI-BIN (name beamline institute data-file-format)
fittype 2 (asymmetry fit)
alpha 1
map 0 0 0 0 0 0 0 0 0 0
forward 2
backward 1
background 15 146 13 148 # estimated bkg: 20.4846 / 4.8731
data 170 9956 168 9110
t0 160.0 161.0
fit 0.25 10
packing 5
###############################################################
COMMANDS
MINIMIZE
MINOS
SAVE
###############################################################
FOURIER
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
fourier_power 12
apodization STRONG # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase 8
#range_for_phase_correction 50.0 70.0
range 0 800
###############################################################
PLOT 2 (asymmetry plot)
runs 1
range 0 9.5 -0.15 0.3
view_packing 150
###############################################################
STATISTIC --- 2013-07-01 20:40:44
chisq = 1911.7, NDF = 1905, chisq/NDF = 1.003494

View File

@ -23,7 +23,7 @@ PROJECT_NAME = musrfit
# This could be handy for archiving the generated documentation or # This could be handy for archiving the generated documentation or
# if some version control system is used. # if some version control system is used.
PROJECT_NUMBER = 0.14.0 PROJECT_NUMBER = 1.1.0
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put. # base path where the generated documentation will be put.
@ -462,8 +462,9 @@ WARN_LOGFILE =
INPUT = musrfit.dox \ INPUT = musrfit.dox \
../src/include/PFitterFcn.h \ ../src/include/PFitterFcn.h \
../src/include/PFitter.h \ ../src/include/PFitter.h \
../src/include/PFourier.h \
../src/include/PFourierCanvas.h \ ../src/include/PFourierCanvas.h \
../src/include/PFourierCanvasLinkDef.h \
../src/include/PFourier.h \
../src/include/PFunctionGrammar.h \ ../src/include/PFunctionGrammar.h \
../src/include/PFunction.h \ ../src/include/PFunction.h \
../src/include/PFunctionHandler.h \ ../src/include/PFunctionHandler.h \
@ -476,12 +477,14 @@ INPUT = musrfit.dox \
../src/include/PMusrT0LinkDef.h \ ../src/include/PMusrT0LinkDef.h \
../src/include/PPrepFourier.h \ ../src/include/PPrepFourier.h \
../src/include/PRunAsymmetry.h \ ../src/include/PRunAsymmetry.h \
../src/include/PRunAsymmetryRRF.h \
../src/include/PRunBase.h \ ../src/include/PRunBase.h \
../src/include/PRunDataHandler.h \ ../src/include/PRunDataHandler.h \
../src/include/PRunListCollection.h \ ../src/include/PRunListCollection.h \
../src/include/PRunMuMinus.h \ ../src/include/PRunMuMinus.h \
../src/include/PRunNonMusr.h \ ../src/include/PRunNonMusr.h \
../src/include/PRunSingleHisto.h \ ../src/include/PRunSingleHisto.h \
../src/include/PRunSingleHistoRRF.h \
../src/include/PStartupHandler.h \ ../src/include/PStartupHandler.h \
../src/include/PStartupHandlerLinkDef.h \ ../src/include/PStartupHandlerLinkDef.h \
../src/include/PTheory.h \ ../src/include/PTheory.h \
@ -490,8 +493,8 @@ INPUT = musrfit.dox \
../src/include/PUserFcn.h \ ../src/include/PUserFcn.h \
../src/classes/PFitter.cpp \ ../src/classes/PFitter.cpp \
../src/classes/PFitterFcn.cpp \ ../src/classes/PFitterFcn.cpp \
../src/classes/PFourier.cpp \
../src/classes/PFourierCanvas.cpp \ ../src/classes/PFourierCanvas.cpp \
../src/classes/PFourier.cpp \
../src/classes/PFunction.cpp \ ../src/classes/PFunction.cpp \
../src/classes/PFunctionHandler.cpp \ ../src/classes/PFunctionHandler.cpp \
../src/classes/PMsr2Data.cpp \ ../src/classes/PMsr2Data.cpp \
@ -501,12 +504,14 @@ INPUT = musrfit.dox \
../src/classes/PMusrT0.cpp \ ../src/classes/PMusrT0.cpp \
../src/classes/PPrepFourier.cpp \ ../src/classes/PPrepFourier.cpp \
../src/classes/PRunAsymmetry.cpp \ ../src/classes/PRunAsymmetry.cpp \
../src/classes/PRunAsymmetryRRF.cpp \
../src/classes/PRunBase.cpp \ ../src/classes/PRunBase.cpp \
../src/classes/PRunDataHandler.cpp \ ../src/classes/PRunDataHandler.cpp \
../src/classes/PRunListCollection.cpp \ ../src/classes/PRunListCollection.cpp \
../src/classes/PRunMuMinus.cpp \ ../src/classes/PRunMuMinus.cpp \
../src/classes/PRunNonMusr.cpp \ ../src/classes/PRunNonMusr.cpp \
../src/classes/PRunSingleHisto.cpp \ ../src/classes/PRunSingleHisto.cpp \
../src/classes/PRunSingleHistoRRF.cpp \
../src/classes/PStartupHandler.cpp \ ../src/classes/PStartupHandler.cpp \
../src/classes/PTheory.cpp \ ../src/classes/PTheory.cpp \
../src/classes/PUserFcnBase.cpp \ ../src/classes/PUserFcnBase.cpp \

View File

@ -4595,14 +4595,8 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fData[i].data, dataXmin, dataXmax); dataYmax = GetMaximum(fData[i].data, dataXmin, dataXmax);
} }
Double_t dd = 0.05*fabs(dataYmax-dataYmin); Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) { dataYmin -= dd;
dataYmin -= dd; dataYmax += dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
} }
} else { // set the x-/y-range to the previous fHistoFrame range } else { // set the x-/y-range to the previous fHistoFrame range
dataXmin = xmin; dataXmin = xmin;
@ -4620,16 +4614,13 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fData[i].data, dataXmin, dataXmax); dataYmax = GetMaximum(fData[i].data, dataXmin, dataXmax);
} }
Double_t dd = 0.05*fabs(dataYmax-dataYmin); Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) { dataYmin -= dd;
dataYmin -= dd; dataYmax += dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
} }
} }
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
dataYmin = 1.0e-4 * dataYmax;
}
// create histo frame in order to plot histograms possibly with different x-frames // create histo frame in order to plot histograms possibly with different x-frames
fHistoFrame = fDataTheoryPad->DrawFrame(dataXmin, dataYmin, dataXmax, dataYmax); fHistoFrame = fDataTheoryPad->DrawFrame(dataXmin, dataYmin, dataXmax, dataYmax);
@ -4751,14 +4742,8 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fNonMusrData[i].data, dataXmin, dataXmax); dataYmax = GetMaximum(fNonMusrData[i].data, dataXmin, dataXmax);
} }
Double_t dd = 0.05*fabs(dataYmax-dataYmin); Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) { dataYmin -= dd;
dataYmin -= dd; dataYmax += dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
} }
} else { // set the x-/y-range to the previous fHistoFrame range } else { // set the x-/y-range to the previous fHistoFrame range
dataXmin = xmin; dataXmin = xmin;
@ -4776,16 +4761,14 @@ void PMusrCanvas::PlotData(Bool_t unzoom)
dataYmax = GetMaximum(fNonMusrData[i].data, dataXmin, dataXmax); dataYmax = GetMaximum(fNonMusrData[i].data, dataXmin, dataXmax);
} }
Double_t dd = 0.05*fabs(dataYmax-dataYmin); Double_t dd = 0.05*fabs(dataYmax-dataYmin);
if (!fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) { dataYmin -= dd;
dataYmin -= dd; dataYmax += dd;
dataYmax += dd;
} else {
if (dataYmin < 0)
dataYmin = 0.1;
dataYmax += dd;
}
} }
} }
if (fMsrHandler->GetMsrPlotList()->at(fPlotNumber).fLogY) {
if (dataYmin <= 0.0)
dataYmin = 1.0e-4 * dataYmax;
}
// create fMultiGraphData, and add all data and theory // create fMultiGraphData, and add all data and theory
fMultiGraphData = new TMultiGraph(); fMultiGraphData = new TMultiGraph();

View File

@ -6154,7 +6154,7 @@ bool PRunDataHandler::DateToISO8601(string inDate, string &iso8601Date)
return false; return false;
TString str(""); TString str("");
str.Form("%04d-%02d-%02d", 1900+tm.tm_year, tm.tm_mon, tm.tm_mday); str.Form("%04d-%02d-%02d", 1900+tm.tm_year, tm.tm_mon+1, tm.tm_mday);
iso8601Date = str.Data(); iso8601Date = str.Data();
@ -6187,7 +6187,7 @@ void PRunDataHandler::SplitTimeDate(TString timeData, TString &time, TString &da
} }
time = TString::Format("%02d:%02d:%02d", tm.tm_hour, tm.tm_min, tm.tm_sec); time = TString::Format("%02d:%02d:%02d", tm.tm_hour, tm.tm_min, tm.tm_sec);
date = TString::Format("%04d-%02d-%02d", tm.tm_year+1900, tm.tm_mon, tm.tm_mday); date = TString::Format("%04d-%02d-%02d", tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday);
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------

View File

@ -629,8 +629,6 @@ Bool_t PStartupHandler::WriteDefaultStartupFile()
fout << " <comment>" << endl; fout << " <comment>" << endl;
fout << " Defines default settings for the musrfit package" << endl; fout << " Defines default settings for the musrfit package" << endl;
fout << " </comment>" << 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/his</data_path>" << endl;
fout << " <data_path>/afs/psi.ch/project/nemu/data/wkm</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/gps</data_path>" << endl;

View File

@ -2687,14 +2687,14 @@ void PTheory::CalculateGaussLFIntegral(const Double_t *val) const
fLFIntegral.push_back(0.0); // start value of the integral fLFIntegral.push_back(0.0); // start value of the integral
ft = 0.0; ft = 0.0;
Double_t step = 0.0, lastStep = 1.0, diff = 0.0; Double_t step = 0.0, lastft = 1.0, diff = 0.0;
do { do {
t += dt; t += dt;
step = 0.5*dt*preFactor*(exp(-0.5*pow(Delta * (t-dt), 2.0))*sin(w0*(t-dt))+ step = 0.5*dt*preFactor*(exp(-0.5*pow(Delta * (t-dt), 2.0))*sin(w0*(t-dt))+
exp(-0.5*pow(Delta * t, 2.0))*sin(w0*t)); exp(-0.5*pow(Delta * t, 2.0))*sin(w0*t));
diff = fabs(fabs(step)-fabs(lastStep));
lastStep = step;
ft += step; ft += step;
diff = fabs(fabs(lastft)-fabs(ft));
lastft = ft;
fLFIntegral.push_back(ft); fLFIntegral.push_back(ft);
} while ((t <= 20.0) && (diff > 1.0e-10)); } while ((t <= 20.0) && (diff > 1.0e-10));
} }
@ -2762,13 +2762,13 @@ void PTheory::CalculateLorentzLFIntegral(const Double_t *val) const
ft += 0.5*dt*preFactor*(1.0+sin(w0*t)/(w0*t)*exp(-a*t)); ft += 0.5*dt*preFactor*(1.0+sin(w0*t)/(w0*t)*exp(-a*t));
fLFIntegral.push_back(ft); fLFIntegral.push_back(ft);
// calculate all the other integral bin values // calculate all the other integral bin values
Double_t step = 0.0, lastStep = 1.0, diff = 0.0; Double_t step = 0.0, lastft = 1.0, diff = 0.0;
do { do {
t += dt; t += dt;
step = 0.5*dt*preFactor*(sin(w0*(t-dt))/(w0*(t-dt))*exp(-a*(t-dt))+sin(w0*t)/(w0*t)*exp(-a*t)); step = 0.5*dt*preFactor*(sin(w0*(t-dt))/(w0*(t-dt))*exp(-a*(t-dt))+sin(w0*t)/(w0*t)*exp(-a*t));
diff = fabs(fabs(step)-fabs(lastStep));
lastStep = step;
ft += step; ft += step;
diff = fabs(fabs(lastft)-fabs(ft));
lastft = ft;
fLFIntegral.push_back(ft); fLFIntegral.push_back(ft);
} while ((t <= 20.0) && (diff > 1.0e-10)); } while ((t <= 20.0) && (diff > 1.0e-10));
} }
@ -2792,7 +2792,7 @@ Double_t PTheory::GetLFIntegralValue(const Double_t t) const
if (idx + 2 > fLFIntegral.size()) if (idx + 2 > fLFIntegral.size())
return fLFIntegral.back(); return fLFIntegral.back();
// linearly interpolate between the two relvant function bins // linearly interpolate between the two relevant function bins
Double_t df = (fLFIntegral[idx+1]-fLFIntegral[idx])*(t/fSamplingTime-static_cast<Double_t>(idx)); Double_t df = (fLFIntegral[idx+1]-fLFIntegral[idx])*(t/fSamplingTime-static_cast<Double_t>(idx));
return fLFIntegral[idx]+df; return fLFIntegral[idx]+df;

View File

@ -2589,7 +2589,8 @@ void PTextEdit::musrSwapMsrMlog()
// get current file name // get current file name
QString currentFileName = *fFilenames.find( currentEditor() ); QString currentFileName = *fFilenames.find( currentEditor() );
QString swapFileName; QString swapFileName;
QString tempFileName = QString("__swap__.msr"); QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QString tempFileName = QString("%1/.musrfit/__swap__.msr").arg(env.value("HOME"));
// check if it is a msr-, mlog-, or another file // check if it is a msr-, mlog-, or another file
int idx; int idx;
@ -3027,10 +3028,15 @@ void PTextEdit::getTheme()
QString str = QIcon::themeName(); QString str = QIcon::themeName();
qDebug() << "debug> str=" << str << endl;
if (str.contains("dark", Qt::CaseInsensitive)) { if (str.contains("dark", Qt::CaseInsensitive)) {
fDarkTheme = true; fDarkTheme = true;
if (str.contains("ubuntu", Qt::CaseInsensitive)) { if (str.contains("ubuntu", Qt::CaseInsensitive)) {
fDarkToolBarIcon = false; fDarkToolBarIcon = false;
} else if (str.contains("xfce", Qt::CaseInsensitive)) {
fDarkTheme = false;
fDarkToolBarIcon = false;
} else { } else {
fDarkToolBarIcon = true; fDarkToolBarIcon = true;
} }