fixed wrong chisq output in musrview if expected chisq ispresent

This commit is contained in:
suter_a 2012-09-24 11:02:06 +00:00
parent 4ad5b37441
commit 6c0fdb6ab8
3 changed files with 20 additions and 7 deletions

View File

@ -18,6 +18,8 @@ NEW 2012-05-12 added dump_header. This is a little program which dumps the
NEW 2012-04-24 added a first version for negative muon fitting. At the same NEW 2012-04-24 added a first version for negative muon fitting. At the same
time substaintial bug fixing has been carried out (mainly the time substaintial bug fixing has been carried out (mainly the
logx/logy handling). logx/logy handling).
FIXED 2012-09-23 fixed wrong chisq output in musrview if expected chisq is
present.
FIXED 2012-05-30 fixed RRF bug in single histo plotting. FIXED 2012-05-30 fixed RRF bug in single histo plotting.
FIXED 2012-05-18 fixed wrong forward/backward tag for ROOT-PPC (MUSR-215) FIXED 2012-05-18 fixed wrong forward/backward tag for ROOT-PPC (MUSR-215)
CHANGED 2012-08-28 prevent LF from allocating too much memory CHANGED 2012-08-28 prevent LF from allocating too much memory

View File

@ -3928,6 +3928,15 @@ Bool_t PMsrHandler::HandleStatisticEntry(PMsrLines &lines)
} }
// extract chisq // extract chisq
if (lines[i].fLine.Contains("chisq =")) { if (lines[i].fLine.Contains("chisq =")) {
if (lines[i].fLine.Contains("expected")) { // expected chisq
strncpy(str, lines[i].fLine.Data(), sizeof(str));
status = sscanf(str+lines[i].fLine.Index("chisq = ")+8, "%lf", &dval);
if (status == 1) {
fStatistic.fMinExpected = dval;
} else {
fStatistic.fMinExpected = -1.0;
}
} else { // chisq
fStatistic.fValid = true; fStatistic.fValid = true;
strncpy(str, lines[i].fLine.Data(), sizeof(str)); strncpy(str, lines[i].fLine.Data(), sizeof(str));
status = sscanf(str+lines[i].fLine.Index("chisq = ")+8, "%lf", &dval); status = sscanf(str+lines[i].fLine.Index("chisq = ")+8, "%lf", &dval);
@ -3937,6 +3946,7 @@ Bool_t PMsrHandler::HandleStatisticEntry(PMsrLines &lines)
fStatistic.fMin = -1.0; fStatistic.fMin = -1.0;
} }
} }
}
// extract maxLH // extract maxLH
if (lines[i].fLine.Contains("maxLH =")) { if (lines[i].fLine.Contains("maxLH =")) {
fStatistic.fValid = true; fStatistic.fValid = true;

View File

@ -13,6 +13,7 @@
<data_path>/afs/psi.ch/project/bulkmusr/data/gpd</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/ltf</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/alc</data_path> <data_path>/afs/psi.ch/project/bulkmusr/data/alc</data_path>
<data_path>/afs/psi.ch/project/bulkmusr/data/hifi</data_path>
<write_per_run_block_chisq>n</write_per_run_block_chisq> <write_per_run_block_chisq>n</write_per_run_block_chisq>
<fourier_settings> <fourier_settings>
<units>Gauss</units> <units>Gauss</units>