Files
musrfit/src
suter_aandClaude Opus 5 0577d5d211
Build and Deploy Documentation / build-and-deploy (push) Successful in 34s
fix dead time correction for Red/Green (period) NeXus IDF V2 data
Since the Red/Green mode handling was added for NeXus HDF5 IDF V2, the
histogram numbers of the routed histograms carry the period offset, i.e.
histoNo = period*10000 + histo. PRunBase::DeadTimeCorrection() was still
addressing the dead time parameter vector with 'histoNo-1', hence for any
period > 0 it read far beyond the end of the vector. The garbage picked up
there scaled the counts, so every invocation of musrfit gave a different
(sometimes nan) result for the affected run blocks.

The dead time parameters are stored contiguously, period-by-period, and
therefore need to be addressed as period*noOfHistosPerPeriod + histo - 1.
Introduce PERIOD_HISTO_OFFSET for the period encoding, keep the number of
histos per period in PRawRunData, and add PRawRunData::GetDeadTimeParam(histoNo)
which does the mapping and guards against out-of-range access.

Cross-checked against the HDF4 IDF V1 twin of the same run, where the two
periods are flattened into histos 1-192: both readers now yield bit-identical
chisq, with and without dead time correction.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 11:10:53 +02:00
..
2026-01-25 07:45:44 +01:00
2026-01-25 07:45:44 +01:00
2026-01-25 07:45:44 +01:00
2026-01-25 07:45:44 +01:00
2026-01-25 07:45:44 +01:00
2026-01-25 07:45:44 +01:00