some cosmetics in mlog2db

This commit is contained in:
Bastian M. Wojek 2008-05-02 17:41:07 +00:00
parent 6492f5ee1b
commit cb126061ea

View File

@ -19,23 +19,28 @@ Example 1:
mlog2db 1423 1424 _ZF-LF-TF-supermeasurement
generates the db-file "out.db" (or whatever filename you specified with the -o option) from 1423_ZF-LF-TF-supermeasurement.mlog and 1424_ZF-LF-TF-supermeasurement.mlog .
It also includes the db header.
In the case you are dealing with LEM-data AND have locally mounted the /mnt/data/nemu directory some available parameters like the
temperature or transport settings will be taken from the summary files and added to the db-file.
If you want to generate a file without the header information just run the script with the option "noheader".
If you additionally want to fit some data using musrfit specify the option "fit-TEMPLATERUN#".
In this case a mlog-outputfile has to be present for the specified template run. The subsequent inputfiles will be created.
In this case either a mlog-outputfile or a msr-inputfile have to be present for the specified template run.
The subsequent inputfiles will be created.
Example 2:
mlog2db 200 220 _tf_h13 -oABC.db fit-199
This will fit the runs 200 to 220 using musrfit. The file 199_tf_h13.mlog is used as template for the first musrfit input file.
The results of the fits will be written to ABC.db.
This will fit the runs 200 to 220 using musrfit. The file 199_tf_h13.mlog (or if that is not available: 199_tf_h13.msr) is used as
template for the first musrfit input file. The results of the fits will be written to ABC.db.
CAUTION:
The "indexing number" of the .mlog has to be at the beginning of the filename.
Furthermore the histogram files that were fitted have to have the name "XXX_RUN#_YYY" or "ZZZ_his_RUN#", where XXX,YYY,ZZZ are strings
without whitespaces ("/" is OK).
If you want to use the fitting feature, musrfit has to be installed either on the PATH or in the local directory.
Furthermore the data files that were fitted have to have the name "XXX_RUN#[_YYY]" or "ZZZ_his_RUN#", where
XXX,YYY,ZZZ are strings without whitespaces ("/" is OK).
If you want to use the fitting feature, musrfit has to be installed either on the PATH or in the working directory.
EOFHELP
@ -57,12 +62,25 @@ fi
fi
if [ "$TEMP" != "" ]; then
# Check for musrfit on the PATH and if found continue with searching the fit-template
PATHTOMUSRFIT=$(echo `which musrfit`)
if [ "$PATHTOMUSRFIT" == "" ]; then
echo
echo No musrfit executable was found on the PATH or in the current directory!
echo Please install musrfit first!
echo
exit 1
else
if [ -e $TEMP$3.mlog ]; then
TEMPLATE=$TEMP$3.mlog
else if [ -e $TEMP$3.msr ]; then
TEMPLATE=$TEMP$3.msr
fi
fi
fi
fi
while [ $COUNT -le $2 ]
@ -75,7 +93,7 @@ FIRSTINPUT=$1$3.msr
if [ "$TEMP" != "" ]; then
if [ "$TEMPLATE" == "" ]; then
echo The specified musrfit files $TEMP$3.mlog and $TEMP$3.msr do not exist!
echo The specified musrfit template files $TEMP$3.mlog and $TEMP$3.msr do not exist!
exit 1
fi
@ -222,11 +240,11 @@ awk -v parFOUR=$4 -v parFIVE=$5 -v parSIX=$6 '{
print "Abstract" >> outfile
print ">>>Put your abstract here<<<\n" >> outfile
print "LABELS" >> outfile
print "T" >> outfile
print "Tr" >> outfile
print "E" >> outfile
print "RAL-RAR" >> outfile
print "RAT-RAB" >> outfile
print "T [K]" >> outfile
print "Tr [kV]" >> outfile
print "E [keV]" >> outfile
print "RAL-RAR [kV]" >> outfile
print "RAT-RAB [kV]" >> outfile
for(k=1;k<i+4;k++){
print parArray[k] >> outfile