suter_aandClaude Opus 5 462c4623be 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-27 09:02:43 +02:00
2026-04-21 10:17:33 +02:00
2026-07-27 08:53:04 +02:00
2019-05-15 10:14:39 +02:00
2026-07-27 08:43:31 +02:00
2025-11-26 17:18:42 +01:00
2025-11-26 17:21:04 +01:00

musrfit - muSR and beta-NMR data analysis package

Contents

This is a data analysis package to analyze time differential muSR and beta-NMR data. Currently it allows the following:

  • set up most commonly used fitting functions for muSR and beta-NMR
  • fit data, including global fits
  • show the fit results and the residuals
  • show the Fourier transform of the data
  • easily extract the fit parameters and import in other programs (gnuplot, qtiplot/origin, ...)
  • generate input fitting files for follow-up runs
  • generate global input fitting files based on a single run template
  • implement more sophisticated user functions (e.g. GL vortex lattice, Meissner screening including low-energy muon stopping profiles)

Currently supported platforms:

Documentation

For a more exhaustive user documentation see:

https://lmu.pages.psi.ch/musrfit-docu/index.html

Contacts

andreas.suter@psi.ch

For the beta-NMR related parts, please contact Zaher Salman zaher.salman@psi.ch

2026-06-28 15:16:31 +02:00
Languages
C++ 88.2%
Wolfram Language 6.5%
C 2.4%
CMake 1.9%
Perl 0.5%
Other 0.4%