PMusrCanvas was the TCanvas based front end of musrview. Since the ROOT7
rewrite it is no longer part of the build, so drop the class, its header and its
LinkDef rather than leave dead code behind.
Also update the comments in PRunListCollection, PRunMuMinus, PRunSingleHisto
and musrt0 which still named the class, and repair the header comment of
PFourierCanvasLinkDef.h, which carried the file name of the LinkDef it had been
copied from.
Clean rebuild, tests 87/87.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6YiUNBTMDX9uA3Ts1w2nW
musrview is now a client/server application following the ROOT7 architecture
(S. Linev et al., J. Phys. Conf. Ser. 1525 (2020) 012092): the C++ side holds
the data, an ROOT::RWebWindow ships it as JSON to a JSROOT page which renders
it. This addresses three long standing problems.
The fit parameter, theory and run info blocks were TPaveText/TLegend objects
which scaled their content down until it became unreadable as soon as a fit had
many parameters. They are HTML panels now: fixed font size, own scrollbar, and
each of them can be shown and hidden individually. The run info keeps listing
every run with the very symbol it is plotted with.
The command keys ('d', 'f', 'a', ...) were executed even while a text or latex
label was being typed into the canvas. The page checks whether a text input has
the focus, so typing a 'd' inserts a 'd'.
The plot views were encoded in a set of entangled variables plus a static one
which leaked state between canvases. PMusrViewMode describes them as four
orthogonal properties - domain, Fourier component, difference including whether
it is formed before or after the transform, and average - so that combinations
such as 'Fourier-difference-average' are well defined. PMusrViewModel::GetCurves()
is the single place which maps a view mode onto histograms; plotting and ascii
export both go through it and can no longer disagree, which removed some 700
lines of duplicated view logic from the export.
New classes, namespace musrview:
PMusrViewMode the decoupled view state, free of ROOT and GUI, unit tested
PMusrViewModel the GUI-free data layer, physics taken over unchanged
PMusrWebCanvas the web front end and the graphics export
Further notes:
- The interactive path builds no TCanvas at all, the spectra travel as a TList
of drawables. A TCanvas creates and maps its window already in the
constructor, which would put an empty ROOT canvas next to the musrview window.
- The graphics export keeps the classic pad layout and its 800x600 size and
runs with ROOT in batch mode, so batch operation needs no browser.
- The window opens at 1200x900, since toolbar and panels take their share.
- Non-muSR axis labels are taken from the data file again, and ROOT/TLatex
markup is rendered in the HTML panels as well.
- musrview needs a ROOT built with -Droot7=ON -Dwebgui=ON, plus -Dqt6web=ON for
the embedded window (--embedded, the default). --browser uses the standard
browser of the system, --browser=server only prints the URL.
- PMusrCanvas is no longer part of the build, the files are kept for reference.
Tests: 87/87 pass, among them a new unit test of the view modes and a new
musrview test covering the non-muSR fit type.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H6YiUNBTMDX9uA3Ts1w2nW
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>
obtained from the data files. Currently the following meta information can be accessed
if available:
field in (G): B or b
energy in (keV): En or en
temperature in (K): since some data files contain a vector of temperature, they have
to be accessed with an index, like T0 or t0, etc.