musrt0 --getT0FromPromptPeak (-g) is supposed to get t0 from the prompt peak and write the result in the msr file. If a RUN block contains no t0 line and no fit line, then t0 is silently discarded: only the file timestamp changes. Same issue affects addt0, background, and data.
To reproduce
Take an MSR whose fit range is defined only in the GLOBAL block (RUN blocks have no fit line)
Run: musrt0 -g
Result: .msr/.mlog timestamps change, but no t0 line is added.
Control: add a fit line to each RUN block, rerun -g -> t0 line is written correctly.
Opencode diagnosis:
In WriteMsrLogFile the missing-tag flush (t0TagMissing/addt0TagMissing/backgroundTagMissing/dataTagMissing) is emitted only inside the fit branch (PMsrHandler.cpp ~1069-1120). There is no flush at end of a RUN block nor when the next RUN line is seen (runNo++ at ~568). Hence for RUN blocks without a fit line the programmatically set values are never written.
Proposed fix:
Flush missing t0/addt0/background/data tags at the end of each RUN block (and at EOF), independent of the presence of a fit line.
musrt0 <msr> --getT0FromPromptPeak (-g) is supposed to get t0 from the prompt peak and write the result in the msr file. If a RUN block contains no t0 line and no fit line, then t0 is silently discarded: only the file timestamp changes. Same issue affects addt0, background, and data.
To reproduce
1. Take an MSR whose fit range is defined only in the GLOBAL block (RUN blocks have no fit line)
2. Run: musrt0 <msr> -g
3. Result: .msr/.mlog timestamps change, but no t0 line is added.
4. Control: add a fit line to each RUN block, rerun -g -> t0 line is written correctly.
Opencode diagnosis:
In WriteMsrLogFile the missing-tag flush (t0TagMissing/addt0TagMissing/backgroundTagMissing/dataTagMissing) is emitted only inside the fit branch (PMsrHandler.cpp ~1069-1120). There is no flush at end of a RUN block nor when the next RUN line is seen (runNo++ at ~568). Hence for RUN blocks without a fit line the programmatically set values are never written.
Proposed fix:
Flush missing t0/addt0/background/data tags at the end of each RUN block (and at EOF), independent of the presence of a fit line.
salman
added the bug label 2026-10-11 11:13:40 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
musrt0 --getT0FromPromptPeak (-g) is supposed to get t0 from the prompt peak and write the result in the msr file. If a RUN block contains no t0 line and no fit line, then t0 is silently discarded: only the file timestamp changes. Same issue affects addt0, background, and data.
To reproduce
Opencode diagnosis:
In WriteMsrLogFile the missing-tag flush (t0TagMissing/addt0TagMissing/backgroundTagMissing/dataTagMissing) is emitted only inside the fit branch (PMsrHandler.cpp ~1069-1120). There is no flush at end of a RUN block nor when the next RUN line is seen (runNo++ at ~568). Hence for RUN blocks without a fit line the programmatically set values are never written.
Proposed fix:
Flush missing t0/addt0/background/data tags at the end of each RUN block (and at EOF), independent of the presence of a fit line.
sha
7b8574b3eefixes the issue