bb324260056905fce2205361063281106890c09c
ToDouble() had the same shortcoming as ToInt(): wrapping strtod() with a nullptr endptr made a failed conversion indistinguishable from a legitimate 0.0. Add an optional `bool *ok` out-parameter that reports success. strtod() (with endptr + errno) is kept instead of std::from_chars so the accepted input set stays identical to TString::Atof() (leading whitespace skipped, leading '+' honoured, trailing characters ignored); ok is set false on a non-numeric string or an ERANGE overflow. The parameter defaults to nullptr, so existing call sites keep compiling unchanged. Convert the IsFloat-guarded ToDouble call sites in PMsrHandler to the single-parse ToDouble(token, &ok) form (replacing the IsFloat() guard + separate ToDouble() that parsed every token twice). All downstream >=0 / <=0 / range checks are preserved, and push_back sites only append on success so no spurious 0.0 is stored on error. Number-vs-keyword discriminators (pos.error/boundary "none", rrf_phase/fourier-phase parX) are restructured so the keyword branch is taken when ok is false. As a side effect this fixes a latent gap in the GLOBAL rrf_freq handler, where a non-numeric frequency previously slipped through with a stale value instead of raising an error. The IsFloat-guarded ToInt fit-range offsets (fgb/lgb) are intentionally left untouched, as there the guard type differs from the conversion. All 85 integration tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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:
- Linux
- Mac OS X
- Windows 10 1809 or newer - current state is for the commited ones
- Web based implementation - http://musruser.psi.ch/cgi-bin/musrfit.cgi
Documentation
For a more exhaustive user documentation see:
https://lmu.pages.psi.ch/musrfit-docu/index.html
Contacts
For the beta-NMR related parts, please contact Zaher Salman zaher.salman@psi.ch
Releases
4
v1.9.9 - Stable 06/25
Latest
Languages
C++
88.3%
Wolfram Language
6.5%
C
2.5%
CMake
1.7%
Perl
0.5%
Other
0.4%