Commit Graph
2709 Commits
Author SHA1 Message Date
suter_a fc23d00aca minor version increase, since this is relevant for the newest macOS 26.5.1 2026-07-15 10:30:08 +02:00
suter_aandClaude Sonnet 4.6 b90d0d9e8b Fix macOS 26 CLING runtime dictionary errors caused by Homebrew/SDK header conflicts
macOS 26 (Darwin 25.5.0) introduced stricter Clang module map rules in
DarwinFoundation1.modulemap: the '_c_standard_library_obsolete' module
now requires the 'found_incompatible_headers__check_search_paths' feature,
which CLING's runtime interpreter does not set. When fftw3.h (from
/opt/homebrew/include) was parsed by CLING via the inlined PStartupHandler
dictionary payload, it triggered this module map error, causing all
PStartupHandler signal/slot connections to fail.

Two fixes:
- PMusr.h: guard '#include "fftw3.h"' with '#ifndef __CLING__'. No fftw
  types appear in PMusr.h class definitions, so CLING does not need it
  for reflection. This is the primary runtime fix.
- CMakeLists.txt (src/classes and all src/external libs): replace
  '-I${FFTW3_INCLUDE}', '-I${Boost_INCLUDE_DIRS}', '-I${GSL_INCLUDE_DIRS}',
  and '-I${ROOT_INCLUDE_DIRS}' with '-isystem' in all root_generate_dictionary
  OPTIONS blocks, and change 'include_directories(${FFTW3_INCLUDE})' to
  'include_directories(SYSTEM ...)'. Internal project paths (MUSRFIT_INC,
  BMW_TOOLS_INC, NONLOCAL_INC, CMAKE_CURRENT_SOURCE_DIR, etc.) keep '-I'.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-15 10:29:43 +02:00
suter_a 358fc8ec6d PMsrHighlighter tweak for Dark Color Schemes. Likely more work needs to be done (dynamic switching, etc.). 2026-07-15 10:25:19 +02:00
ext-mcfadd_randsuter_a f03e103844 syntax/keyword highlighting in musredit
This commit introduces a syntax/keyword highlighting mechanism for musredit
(Qt6 version only). This is done by way of a custom "highligher" class
derived from QSyntaxHighlighter, which allows for fonts, weights, and
colours, to be applied to specific text components via regular expression
rules.

The colour scheme provided is experimental/arbitrary; it uses the "Tableau 20"
palette, which provides reasonable contrast.
2026-06-24 07:37:09 +02:00
suter_a eeb7b9a861 PPrefsDialog.ui adopted for Qt5. 2026-06-07 11:35:57 +02:00
suter_a 8c541b592e allow to set the number of threads for fitting directly via the preferences of musredit. Qt5 ui not yet adopted. 2026-06-07 11:35:35 +02:00
suter_a 5c638e32c5 add mupp/Qt6 python option. 2026-05-29 15:12:59 +02:00
suter_aandClaude Opus 4.7 934848a0af mupp: fix crash in PmuppGui::getValues plotting a variable.
getValues()/getErrors() return a std::vector by value, but the QVector was
built from begin() of one call and end() of a second call -> iterators into
two distinct temporaries -> UB and a segfault in getValues(). Bind the result
to a single local before taking begin()/end(). Same in getPosErr/getNegErr.

This surfaced reliably when plotting a <python>-generated variable added via
the GUI (the script path was unaffected as it reads getValues() only once).

Also fix check() to validate the actually selected collections
(GetCollection(idx[i]) instead of GetCollection(i)).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 15:12:46 +02:00
suter_aandClaude Opus 4.7 c958417fa3 mupp: simplify the python example to a single <python> block.
Use the new coll[]/collErr[] interface so sigmaSC-vs-temp-py.txt computes both
SigmaSC_10 and SigmaSC_150 in one block instead of one block per collection.
Collection 0 is addressed by index (coll[0]) and collection 1 by name
(coll['...Tscan.db']) to show both addressing modes. Output is unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 15:12:34 +02:00
suter_aandClaude Opus 4.7 47ff6d5de7 mupp: expose all collections inside a <python> block (coll[]/collErr[]).
A <python> variable block previously saw only the parameters of the single
collection the variable is linked to via 'col', injected as bare names plus
par[]/parErr[]. To compute variables for several collections one therefore
needed a separate block per collection.

Now every loaded collection is additionally injected as coll[]/collErr[]
dictionaries, addressable both by integer index (matching 'col <idx>' /
'select <idx>') and by collection name; index and name keys reference the same
per-parameter dict. A single block placed after all 'var = python' declarations
can thus compute - and combine - variables for any collection, e.g.
coll[0]['Sigma'] or coll['NAME.db']['Sigma'].

The bound-collection bare names / par[] / parErr[] are unchanged, so existing
scripts and GUI variables keep working. The collection list is threaded through
PmuppScript::var_cmd and the GUI add()/check() paths into PVarHandler.

Verified: a one-block script using both an index key and a name key reproduces
the numeric output of the equivalent two-block script bit-for-bit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 15:12:25 +02:00
suter_a 9ff5d179f1 add a python mupp script file. 2026-05-29 15:12:15 +02:00
suter_a c1727a5f19 mupp: pair each python variable with its own <python> block.
getPythonBlock() always returned the first <python> ... </python>
entry of the script, so when several 'var X = python' declarations
each had their own block, every declaration after the first one
re-ran the first block and the read-back of the requested variable
failed. Thread the script index through var_cmd into getPythonBlock,
which now scans from that position onwards. Each declaration is
paired with the next block in script order.
2026-05-29 15:12:05 +02:00
suter_aandClaude Sonnet 4.6 625f7e6b64 mupp: add x-axis error bar support to all plot outputs.
Previously only y-errors were rendered. The IPC data file format now
includes x-errors per point (x, xPosErr, xNegErr, y, yPosErr, yNegErr,
...). Both the live canvas (PMuppCanvas) and the ROOT macro exports
(GUI and script path) propagate x-errors to TGraphAsymmErrors;
x-errors default to 0.0 when the parameter carries none.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 15:11:53 +02:00
suter_aandClaude Opus 4.7 45b86af572 mupp: optional Python3 interface for variables via ROOT TPython.
Variables can now be computed by an embedded Python3 interpreter in addition
to the Boost.Spirit X3 expression engine. A <python> ... </python> block
receives all collection parameters as per-run lists (bare names, plus
par[]/parErr[] dictionaries as a fallback for names that are not valid Python
identifiers such as 'lambda') and must assign <name> and <name>Err; errors are
user supplied. Works both in the GUI variable dialog and in scripts.

The feature is optional and only enabled when ROOT is built with TPython
(CMake target ROOT::ROOTTPython); otherwise it compiles out. See MUPP_PY.README
for ROOT configure requirements and usage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 15:09:40 +02:00
suter_a 0ce0f4fcce mupp: RUN is now treated as a variable. 2026-05-20 13:13:38 +02:00
suter_a fe902ff62c proper handling in dump_header of TDirectory in combination with the summary option. 2026-05-01 13:11:51 +02:00
krieger_jandsuter_a 0b779aa53f fixed relative paths to new data location. 2026-05-01 13:11:33 +02:00
krieger_jandsuter_a daefad5ab3 data and template files for the tutorials. State: as used in the 2026 Muon Spectroscopy School. 2026-05-01 13:11:23 +02:00
suter_a bde0049f98 fix wrong install path for macOS Qt-based applications. 2026-04-21 10:45:36 +02:00
suter_a e2fc0fc364 cmake: make sure that lib's are lib and not lib64 for musrfit. 2026-04-21 10:44:21 +02:00
suter_a ab590a00c4 remove left-overs. 2026-04-21 10:24:26 +02:00
suter_a e60a835f67 more improvements on the cmake build system. 2026-04-21 10:22:15 +02:00
suter_a 9178b5ef0e work on cleaner cmake. 2026-04-21 10:17:33 +02:00
suter_a cc77e2ab53 MusrRoot: XML-schema evaluation files are moved to https://doi.org/10.5281/zenodo.19593555. to have a DOI and not be depend on a shaky URL 2026-04-21 10:09:59 +02:00
krieger_jandsuter_a cfec8cefb7 adds installation of musredit as a unix app 2026-04-21 10:09:25 +02:00
suter_a d1d2c99bab added PyScripts/nexus_muon_validator.py to nexus. 2026-04-21 10:09:14 +02:00
suter_a 3255e9ef6d remove obsolate test/nexus 2026-04-21 10:09:01 +02:00
suter_a 959634273e adopt to proper version. 2026-03-03 12:43:48 +01:00
suter_a 30c17e5431 suppress warning missing deadtime correction if not relevant. 2026-03-03 08:58:21 +01:00
suter_aandClaude Sonnet 4.6 8619865dde fix linker errors: add HDF5 C++ lib and FFTW3 include paths
- Add ${HDF5_LIBRARIES} to PMusr link dependencies so HDF5 C++ symbols
  (H5::DataType, H5::PredType, etc.) used in PRunDataHandler.cpp resolve.
- Add ${FFTW3_INCLUDE} to musrRootValidation and write_musrRoot_runHeader
  include paths; both pull in PMusr.h which transitively includes fftw3.h.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 08:58:11 +01:00
suter_a a87ab6ade0 add missing NeXus file. 2026-03-02 13:47:27 +01:00
suter_a 8cb7da2e2a adopted to new hdf4/5 approach of NeXus. 2026-03-02 13:46:47 +01:00
suter_a c0ad630740 add musrfitConfig.cmake, etc. for musrfit. 2026-03-02 11:07:56 +01:00
suter_a 47a63def3c adopted after deadtime correction offset fix. 2026-03-02 11:06:43 +01:00
suter_a cce7366799 fixed an index by one offset issue. 2026-03-02 11:06:33 +01:00
suter_a 9ec28171c8 make sure that the requested pointer is not a nullptr. 2026-03-02 11:06:24 +01:00
suter_a b1bce70d63 fix Boost_INCLUDE_DIR -> Boost_INCLUDE_DIRS 2026-03-02 11:06:04 +01:00
suter_a 85fe4a1d59 updated the local user-docu. 2026-03-02 11:03:44 +01:00
suter_a 403aa07993 adopted ChangeLog. Fixed a minor issue in PTextEdit. Adopted ctests for the new NeXus handling. 2026-03-02 11:00:44 +01:00
suter_a 17fcaa7c69 adopted the PNeXus lib such that the class naming scheme is self-consistent. 2026-03-02 10:55:43 +01:00
suter_a ee3fc2e42a warning that deadtime correction estimate is not yet implemented. I am not even sure this would be a good feature. 2026-03-02 10:49:45 +01:00
suter_a 3727190efa full implementation of the deadtime correction from file for PRunAsymmetryRRF. 2026-03-02 10:49:34 +01:00
suter_a 16f88b17e4 full implementation of the deadtime correction from file. 2026-03-02 10:47:52 +01:00
suter_a e432a26b4c added a warning if deadtime correction cannot be carried out (missing parameters, etc.) 2026-03-02 10:47:40 +01:00
suter_a 36168dc3a1 add DeadTimeCorrection to PRunAsymmetry - no ADDRUN handling yet. 2026-03-02 10:47:28 +01:00
suter_a 85eba63ed9 PRunSingleHistoRRF: add DeadTimeCorrection, and improve ADDRUN readability 2026-03-02 10:47:15 +01:00
suter_a 7d102a2604 move DeadTimeCorrection to PRunBase. Make ADDRUN part in PrepareData more readable. 2026-03-02 10:46:39 +01:00
suter_a 811b47cf41 add an ADDRUN example. 2026-03-02 10:42:36 +01:00
suter_a e1de3f9900 added musrview png ref test via ctest 2026-03-02 10:42:25 +01:00
suter_aandClaude Opus 4.6 5c28e7b2ed add ctest integration tests for musrfit maxLH/chisq validation
Add a Python-based test script that runs musrfit -c on each example
msr-file, extracts the maxLH or chisq value, and checks it against
a reference value with a relative tolerance of 1e-4. Covers all 13
example msr-files (single histogram and asymmetry fits).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 10:42:14 +01:00