Compare commits

..

811 Commits

Author SHA1 Message Date
suter_a 5c638e32c5 add mupp/Qt6 python option. 2026-05-29 15:12:59 +02:00
suter_a 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_a 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_a 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_a 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_a 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_j 0b779aa53f fixed relative paths to new data location. 2026-05-01 13:11:33 +02:00
krieger_j 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_j 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_a 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_a 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
suter_a b255dad6a2 filter out '\r' and '\n' from command string (macOS issue). 2026-02-13 14:05:14 +01:00
suter_a db69044747 fix git-revision.h generation: output to build tree and add missing dependencies
Generate git-revision.h into CMAKE_BINARY_DIR/src/ (which is in the
include path) instead of the source tree. Remove the header from
add_executable() source lists, and add missing add_dependencies on
git_revision for all Qt5/Qt6 targets.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 14:05:02 +01:00
suter_a cb171d9800 generate git-revision.h at build time instead of configure time
Replace execute_process with add_custom_target so the git revision
check runs on every build, not just on cmake configure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 14:01:17 +01:00
suter_a 8f5b48f013 proper TDirectory handling for the histos. 2026-02-13 14:00:59 +01:00
suter_a 7e4b136561 fixed missing TDirectory handling of RunSummary in dump_header.cpp 2026-02-13 14:00:48 +01:00
suter_a 0eb90caf9a 2nd spot for cmake version check for policy setting. 2026-02-13 14:00:30 +01:00
suter_a adcd0ea39f cmake version check for policy setting. 2026-02-13 14:00:11 +01:00
suter_a 9a48487220 updated the copyright info. 2026-02-13 13:59:49 +01:00
suter_a b00fb31dc3 set cmake Boost find policy. 2026-02-13 13:56:34 +01:00
suter_a 8152c97f14 version update of the doxygen config file. 2026-02-13 13:56:09 +01:00
suter_a 69f60c6877 further playing with the Prefs dialog. 2026-01-21 12:26:20 +01:00
suter_a 8b7e44ef39 further playing with the Prefs dialog. 2026-01-21 12:26:11 +01:00
suter_a 8843b46460 further playing with the Prefs dialog. 2026-01-21 12:26:02 +01:00
suter_a 9f9e3d4f7f increased size of prefs dialog, since it seems too small for the newest qt6 version, especially on macOS. 2026-01-21 12:25:53 +01:00
suter_a 957d95d352 more detailed NeXus support message. 2026-01-20 08:26:31 +01:00
suter_a 1e60d92814 spirit classic/qi -> x3. Increase musrfit and library version to 1.9.10/1.7.0. 2026-01-16 10:01:33 +01:00
suter_a d5ec51c9bd for tests/spirit: replace 'nil' by 'leer' since 'nil' leads to conflict with macOS. 2026-01-16 10:01:21 +01:00
suter_a 70da2f83ea replace 'nil' by 'leer' since 'nil' leads to conflict with macOS. 2026-01-16 10:01:07 +01:00
suter_a 25205875de add missing header files for install for cmake. 2026-01-16 10:00:56 +01:00
suter_a 19362bd088 add missing header file PFunctionsAst.h 2026-01-16 10:00:47 +01:00
suter_a 4cd4b7878f modernize musrfit function handling using spirit x3 instead of spirit classic now. 2026-01-16 10:00:36 +01:00
suter_a 046ab98144 migrated spirit qi grammar to x3 of mupp variable handling. 2026-01-16 10:00:24 +01:00
suter_a a040f8b576 added doxygen docu to spirit X3 under tests. 2026-01-16 10:00:10 +01:00
suter_a 33f9fd5845 test spirit parser moved from classic to X3. 2026-01-16 09:59:57 +01:00
suter_a 32d9970659 adopted from AFS to NFS. 2026-01-16 09:59:45 +01:00
suter_a b3ee2000ed perform Fourier phase checks only if a Fourier block is present and not set to power spectra. 2025-12-22 16:10:56 +01:00
suter_a 6155438676 add missing #include<cmath> to make some compilers happy (qt5 part). 2025-11-27 16:15:18 +01:00
suter_a c27e4e1a33 adopt PFitter to ROOT v6-38-00 and make sure it is backwards compatible. 2025-11-27 15:58:54 +01:00
suter_a f26adc47fd add missing #include<cmath> to make some compilers happy. 2025-11-27 15:58:40 +01:00
suter_a f7d40f23f1 improve the doxygen docu of the BMWtools. 2025-11-26 18:27:54 +01:00
suter_a a283347321 improve the doxygen documentation of the plotter-part of mupp. 2025-11-26 18:24:07 +01:00
suter_a d1d1e98a13 improve the doxygen documentation of the var-part of mupp. 2025-11-26 18:23:54 +01:00
suter_a d12b5b23bf improve the doxygen docu of PVarDialog.* (musredit_qt6). 2025-11-26 18:23:39 +01:00
suter_a eddb6e4d2d improve the doxygen docu of PmuppScript.* (musredit_qt6). 2025-11-26 18:23:30 +01:00
suter_a 4c7cf616a8 improve the doxygen docu of PmuppGui.* (musredit_qt6). 2025-11-26 18:23:18 +01:00
suter_a 70fad101fb improve the doxygen docu of PmuppAdmin.* (musredit_qt6). 2025-11-26 18:23:08 +01:00
suter_a af14905fc2 improve the doxygen docu of mupp.* Pmupp.* (musredit_qt6). 2025-11-26 18:22:51 +01:00
suter_a c06aa17a07 improve the doxygen docu of PTextEdit.* (musredit_qt6). 2025-11-26 18:22:39 +01:00
suter_a 42e47c8e24 improve the doxygen docu of PSubTextEdit.* (musredit_qt6). 2025-11-26 18:22:26 +01:00
suter_a 0bec371ed7 improve the doxygen docu of PReplaceDialog.* (musredit_qt6). 2025-11-26 18:22:14 +01:00
suter_a 5a272dd350 improve the doxygen docu of PReplaceConfirmationDialog.* (musredit_qt6). 2025-11-26 18:22:01 +01:00
suter_a 91e98f9bbf improve the doxygen docu of PPrefsDialog.* (musredit_qt6). 2025-11-26 18:21:48 +01:00
suter_a 9ef9f3eead improve the doxygen docu of PMusrEditAbout.* (musredit_qt6). 2025-11-26 18:21:36 +01:00
suter_a 29d6342517 deal with Boost 1.89 not having system as component anymore. 2025-11-26 18:21:15 +01:00
suter_a d80af336dc improve the doxygen docu of PMsr2DataDialog.* (musredit_qt6). 2025-11-26 18:21:05 +01:00
suter_a 8464b9962a improve the doxygen docu of PGetTitleBlockDialog.* (musredit_qt6). 2025-11-26 18:20:54 +01:00
suter_a e1bf7c1a44 improve the doxygen docu of PGetTheoryBlockDialog.* (musredit_qt6). 2025-11-26 18:20:40 +01:00
suter_a b9844efc8e add PSI/VMS to dump_header. 2025-11-26 18:20:17 +01:00
suter_a a30ab1b0b9 add PSI/VMS to the musrfit_startup.xml. 2025-11-26 18:20:00 +01:00
suter_a 0f7024d9ee make the technical docu more complete by adding musrStep and musrWiz. 2025-11-26 18:17:30 +01:00
suter_a 5fb7d69241 improve the doxygen docu of PGetSingleHistoRunBlockDialog.* (musredit_qt6). 2025-11-26 18:15:45 +01:00
suter_a af23a52745 improve the doxygen docu of PGetPlotBlockDialog.* (musredit_qt6). 2025-11-26 18:15:35 +01:00
suter_a 4ed0ec2087 improve the doxygen docu of PGetParameterBlockDialog.* (musredit_qt6). 2025-11-26 18:15:24 +01:00
suter_a ad9765cccd improve the doxygen docu of PGetNonMusrRunBlockDialog.* (musredit_qt6). 2025-11-26 18:15:09 +01:00
suter_a a0d37a4ae5 improve the doxygen docu of PGetMusrFTOptionsDialog.* (musredit_qt6). 2025-11-26 18:14:56 +01:00
suter_a b8d766b3eb improve the doxygen docu of PGetFunctionBlockDialog.* (musredit_qt6). 2025-11-26 18:13:13 +01:00
suter_a 55217f4a85 improve the doxygen docu of PGetFourierBlockDialog.* (musredit_qt6). 2025-11-26 18:13:02 +01:00
suter_a 82165ecff4 improve the doxygen docu of PGetAsymmetryRunBlockDialog.* (musredit_qt6). 2025-11-26 18:12:51 +01:00
suter_a 0ab3e906f5 improve the doxygen docu of PFitOutputHandler.* (musredit_qt6). 2025-11-26 18:12:38 +01:00
suter_a 934b5cab4b improve the doxygen docu of PFindDialog.* (musredit_qt6). 2025-11-26 18:12:22 +01:00
suter_a b88bb588b6 improve the doxygen docu of PDumpOutputHandler.* (musredit_qt6). 2025-11-26 18:12:11 +01:00
suter_a dfec6c4edd improve the doxygen docu of PChangeDefaultPathDialog.* (musredit_qt6). 2025-11-26 18:12:01 +01:00
suter_a 882ea4649c improve the doxygen docu of PAdmin.* (musredit_qt6). 2025-11-26 18:11:45 +01:00
suter_a 94b3f1ac5a improve the doxygen docu of main.cpp and musredit.h (musredit_qt6). 2025-11-26 18:11:32 +01:00
suter_a 8d41f47540 improve the doxygen docu of musrWiz. 2025-11-26 18:11:20 +01:00
suter_a 594d080490 improve the doxygen docu of musrStep. 2025-11-26 18:11:05 +01:00
suter_a c53e0725f1 improve the doxygen docu of PUserFcn.* and PUserFcnBase.* 2025-11-26 18:10:50 +01:00
suter_a 8e2949e7a9 improve the doxygen docu of PTheory.* 2025-11-26 18:10:29 +01:00
suter_a 9452d7ec6b improve the doxygen docu of PStartupHandler.* 2025-11-26 18:09:09 +01:00
suter_a 736c96c66e improve the doxygen docu of PRunSingleHistoRRF.* 2025-11-26 18:01:26 +01:00
suter_a ecb6a4e063 fixed a AI glich in the docu. 2025-11-26 18:01:12 +01:00
suter_a 06056db491 improve the doxygen docu of PRunSingleHisto.* 2025-11-26 18:00:58 +01:00
suter_a 27b3b317ba improve the doxygen docu of PRunNonMusr.* 2025-11-26 18:00:44 +01:00
suter_a 707736b8d4 improve the doxygen docu of PRunMuMinus.* 2025-11-26 18:00:31 +01:00
suter_a 9b98294311 improve the doxygen docu of PRunListCollection.* 2025-11-26 17:59:38 +01:00
suter_a 7cb21e3307 improve the doxygen docu of PRunDataHandler.h 2025-11-26 17:54:54 +01:00
suter_a 111f17e3dc improve the doxygen docu of PRunBase.* 2025-11-26 17:53:18 +01:00
suter_a 0f2736ba30 improve the doxygen docu of PRunAsymmetryRRF.* 2025-11-26 17:50:41 +01:00
suter_a 0816440463 improve the doxygen docu of PRunAsymmetry.*. 2025-11-26 17:50:27 +01:00
suter_a 7a3a5b1ee5 improve doxygen documentation of PRunAsymmetryBNMR.* 2025-11-26 17:50:12 +01:00
suter_a 019a16e1aa improve doxygen documentation of PRgeHandler.* 2025-11-26 17:49:45 +01:00
suter_a 8de507441c improve doxygen documentation of PPrepFourier.* 2025-11-26 17:49:28 +01:00
suter_a e900bd547a improve doxygen documentation of PMusrT0.* 2025-11-26 17:49:11 +01:00
suter_a 368957b46f improve doxygen documentation of PMusrCanvas.* 2025-11-26 17:48:10 +01:00
suter_a 7762f69c24 improve doxygen documentation of PMsrHandler.* 2025-11-26 17:43:48 +01:00
suter_a 41b39ab2ab improve doxygen documentation of PMsr2Data.* 2025-11-26 17:40:42 +01:00
suter_a 91e76d56df improve doxygen documentation of PMsgBox.* 2025-11-26 17:40:25 +01:00
suter_a d685eeb54f improve doxygen documentation of PFunction.* and PFunctionGrammar.h 2025-11-26 17:40:10 +01:00
suter_a 93c9e3ab80 improve the doxygen docu. 2025-11-26 17:39:55 +01:00
suter_a 03a7d79b40 improve the doxygen docu. 2025-11-26 17:39:41 +01:00
suter_a cf9ea89326 improve the doxygen docu with the help of Claude AI. 2025-11-26 17:38:14 +01:00
suter_a 80fb0cf7f2 added some more sanity checks for dump_header. 2025-11-26 17:32:26 +01:00
suter_a 9545811e20 added some more sanity checks for any2many. 2025-11-26 17:31:58 +01:00
suter_a 64d82765bc added some more sanity checks for addRun. 2025-11-26 17:31:39 +01:00
suter_a bf94ab5fd7 added some more sanity checks for musrview. 2025-11-26 17:31:22 +01:00
suter_a bc68107b4e added some more sanity checks for musrt0. 2025-11-26 17:31:04 +01:00
suter_a 30a4f457cc added paranoia pointer checks. 2025-11-26 17:30:43 +01:00
suter_a e01cfdd5da make sure that the comment content is not confused with end of comment. 2025-11-26 17:30:25 +01:00
suter_a 4d70c7baa9 use Claude ai to generate doxygen documentation. 2025-11-26 17:27:10 +01:00
suter_a aa348c2393 Update README.md - updated the docu web-page link. 2025-11-26 17:21:32 +01:00
suter_a db001e2cc1 Update README.md
updated the docu web-page link
2025-11-26 17:21:04 +01:00
suter_a a2c9eeb08a Update ChangeLog 2025-11-26 17:18:57 +01:00
suter_a 784857ffb9 Update INSTALL 2025-11-26 17:18:42 +01:00
suter_a 71fb4c9435 add TDirectory option to any2many. 2025-10-03 16:21:14 +02:00
suter_a 0eb36fc48a better handling of values=n/a when dumping the header info. 2025-10-03 16:21:03 +02:00
suter_a 379471811a fixed char* comparison bug. 2025-10-03 16:20:54 +02:00
suter_a 632527c3eb adopted PRunDataHandler::ReadRootFile such that it can handle TDirectory in addition to the deprecated TFolder. 2025-10-03 16:20:44 +02:00
suter_a d80a02238f dump_header can now handle TMusrRoot with TFolder as well as TDirectory. 2025-10-03 16:20:34 +02:00
suter_a 03e386f753 update of the in-source MusrRoot docu. 2025-10-03 16:20:24 +02:00
suter_a 935d0420d3 make musrRootValidation TDirectory compatible. 2025-10-03 16:20:15 +02:00
suter_a 2b67c76b3c updated the docu and removed unused DrawHeader. 2025-10-03 16:20:06 +02:00
suter_a 001c9899cd increase the MusrRoot version to 2.0. 2025-10-03 16:19:46 +02:00
suter_a 097ce35472 added necessary FOURIER block. 2025-10-03 16:19:36 +02:00
suter_a b66ac0da54 added the reader part for MusrRoot if written with TDirectory rather than TFolder. 2025-10-03 16:19:26 +02:00
suter_a e85ea90100 start implementing TDirectory infrastructure. 2025-10-03 16:19:16 +02:00
suter_a 6148b9cca3 split argv parsing between root (un)related parts. 2025-09-15 14:31:35 +02:00
suter_a 4ca3005b75 add the errno information onto the IPC, in case of a failure. 2025-09-07 18:17:00 +02:00
suter_a 1f40dd48f8 remove qmake left-overs from the main code. 2025-09-02 12:36:45 +02:00
suter_a 6cc736d6a5 prevent crash if no tab is present. 2025-08-19 19:25:28 +02:00
suter_a 6449fd120f make sure that index states in proper range for PRunAsymmetryRRF. 2025-08-19 19:25:16 +02:00
suter_a bb3d53761a added more histo length versus fgb, lgb checks. 2025-07-11 13:17:35 +02:00
suter_a 4af91b4942 improved reload of msr-files in musredit after a msr2data command. 2025-07-07 10:09:07 +02:00
suter_a 297a0d95cc error feed fStep rather than fPosError for expected chisq. Tweaked the param rounding for expected chisq. 2025-07-04 16:31:50 +02:00
suter_a 4176bceee1 better exp estimate for precision. 2025-07-04 08:37:41 +02:00
suter_a 1104cf5cb8 removed left-over debug info. 2025-07-03 10:31:54 +02:00
suter_a f9ddb4e668 handle err==0 for rounding. 2025-07-03 10:19:09 +02:00
suter_a 7451800295 also apply the parameter rounding onto the per run block estimate. 2025-07-03 10:00:49 +02:00
suter_a 332681362f improved rounding handling to get a more consistent expected chisq after fitting compared to pure chisq estimate of musrfit. Essentially get rid of rounding issues. 2025-07-03 09:59:56 +02:00
suter_a 3dd027e0a0 now all error messages from musrview can be sent to PMsgBox. 2025-06-29 14:37:36 +02:00
suter_a b692b78cac added a feature which brings up a error message box, if there was any issue with the msr-file when starting musrview from musredit. 2025-06-29 14:37:09 +02:00
suter_a 4da145d674 (i) make most internal checking functions in the msr handler private. (ii) improved checking of real Fourier for consistency. 2025-06-23 16:06:32 +02:00
suter_a 5657fa1f2b adopted cmake to newest DKS version. 2025-06-10 14:44:48 +02:00
suter_a 28054377f7 changed theory functionc abbriviation 'if' to 'ifld'. 2025-06-10 14:37:43 +02:00
suter_a c66af64e96 updated of the offline docu. 2025-06-10 14:36:50 +02:00
suter_a ecaf45b4d0 increase libPMusr version to 1.5.0. 2025-06-10 14:34:04 +02:00
suter_a 2bf7ea1084 new version 1.9.9. Adopted ChangeLog and CMakeLists.txt. 2025-06-10 14:33:50 +02:00
suter_a e891f0489a 1st full Gauss/Lorentz LF. Still room for optimization, and further testing. 2025-06-10 14:33:37 +02:00
suter_a 982181e95a add new functions to musredit select. 2025-06-10 14:33:14 +02:00
suter_a ea776016b4 add simple F-mu-F to the standard theory functions. 2025-06-10 14:33:00 +02:00
suter_a 7a923d2f01 start adding more standard theory functions. Not all ready yet. 2025-06-10 14:32:45 +02:00
suter_a 072c0b63bc create src dir if not present. Needed for git-revision.h 2025-06-03 12:59:40 +02:00
suter_a c745ee769d more docu. 2025-06-03 12:07:00 +02:00
suter_a 1192b6b452 stripped CMakeLists.txt to the bare minimum. 2025-06-03 12:06:50 +02:00
suter_a 7e3eda6699 add necessary docu for the Gaussian Lorentzian approach. 2025-06-03 12:06:41 +02:00
suter_a 60aeab2239 changed the integral approximation approach for Gaussian/Lorentzian. 2025-06-03 12:06:30 +02:00
suter_a 8135035899 added ZF, LF geometry, dynamic approximation width/hopp << 1. 2025-06-03 12:06:18 +02:00
suter_a f0337afee6 improved GL integration. 2025-06-03 12:06:08 +02:00
suter_a e48a4c0081 simplify git-revision.h generation. 2025-06-03 12:05:55 +02:00
suter_a 8f7f90c293 added missing MACOSX_BUNDLE_GUI_IDENTIFIER for mupp. 2025-06-03 12:05:44 +02:00
suter_a 7b3e6202bd allow to define Tmax from the cmd line. 2025-06-03 12:05:35 +02:00
suter_a 93b414f96d add missing header. 2025-06-03 12:05:22 +02:00
suter_a 71622533d3 first LGKT_LF. Might need to slightly improve Simpson. 2025-06-03 12:05:13 +02:00
suter_a 2454e01885 proper class for GKT LF. 2025-06-03 11:27:23 +02:00
suter_a 927cc58b96 add LF Gaussian/Lorentzian testing code. 2025-06-03 11:27:12 +02:00
suter_a 7fd82353ac start populating nfs4 path rather than afs in the musrfit_startup.xml. 2025-06-03 11:26:24 +02:00
suter_a eb064232a9 needed to add an additional header (stdbool.h, libCuba) to make clang happy. 2025-05-03 15:19:16 +02:00
suter_a 58362084d5 comment outdated typedef in libCuba. 2025-05-03 15:19:04 +02:00
suter_a c86b313975 slight improvement on mud.h needed that it doesn't crash on macos15.4 m3pro. 2025-05-03 15:18:54 +02:00
suter_a 44d3d1e95d updated mud.h (thanks to Donald Arseneau). Makes modern compiler happy again. 2025-05-03 15:18:43 +02:00
suter_a dcbde4f7bf add skeleton for MusrRoot which will handle TDirectoryFile rather than TFolder. 2025-05-03 15:18:30 +02:00
suter_a 1ce5cf408b start implementing TDirectoryFile instead of TFolder, since TFolder is depricated. First I added the necessary parts on the validator. The read/write are still missing. 2025-05-03 15:17:30 +02:00
suter_a 4d4fb66f27 switched from raw to QScopedPointer pointer in mupp.cpp. 2025-04-02 13:43:06 +02:00
suter_a 7be188c628 back ported some qt6 recent file handling. 2025-03-31 11:13:27 +02:00
Andreas Suter a895903a58 improved recent file handling for macos. 2025-03-31 11:13:13 +02:00
suter_a 7556a2e243 slight improvement in handling of the recent msr-files. 2025-03-31 11:12:57 +02:00
suter_a 79255750ce updated the icon switching by adding the missing View2Dat. 2025-03-31 11:12:44 +02:00
suter_a 444e75ea06 fixed typo and added necessary update for the theme flags. 2025-03-31 11:12:32 +02:00
suter_a 6c82e88789 improved dark theme handling on mupp for qt5. 2025-03-31 11:12:09 +02:00
suter_a 71de742840 improved dark theme handling on mupp for qt6. 2025-03-31 11:11:57 +02:00
suter_a 1eff68886a activate the status bar. 2025-03-31 11:11:37 +02:00
suter_a 6b43f51631 add a user interface option to export data from a msr-file view (single- or multiple files) - qt6. 2025-03-25 07:57:37 +01:00
suter_a bccd069367 add a user interface option to export data from a msr-file view (single- or multiple files). 2025-03-25 07:57:25 +01:00
suter_a aa2f2756a4 add necessary increment for unique cropped name for PSI-BIN. 2025-03-19 16:46:44 +01:00
suter_a 129e4c10dd make sure that for PSI-BIN export the 4 char detector names are unique. 2025-03-19 12:21:36 +01:00
suter_a bf75b5ef14 add title to PRawRunDataSet. 2025-03-19 12:21:24 +01:00
suter_a c0b1071a27 read 'Sample Orientation' from ROOT file, since it might be needed by any2many. 2025-03-19 12:21:12 +01:00
suter_a 5b9a66758b make sure that the 'selected' object is present. 2025-02-25 16:15:53 +01:00
suter_a d65b04e855 this is a workaround which should prevent that the key event is executed if a text/latex is written into the canvas. 2025-02-25 16:15:40 +01:00
suter_a 688c319e6f fix of a copy/paste error. 2025-02-17 08:18:12 +01:00
suter_a f3d7b9c7ff header of exported data adopted for easier read in with pandas. 2025-02-17 08:17:58 +01:00
suter_a 44821cb8cd updated the copyright info. 2025-01-30 12:00:49 +01:00
suter_a 86b5080dee proper handling of comments and descriptions in the RUN block. 2025-01-29 08:17:51 +01:00
suter_a 6a32ba5766 add switch to enable/disable HDF4 support for NeXus. 2025-01-29 08:17:30 +01:00
suter_a c6fda693a3 add a new tag PMUSR_UNSUPPORTED_FEATURE 2025-01-28 12:54:23 +01:00
suter_a 258f248e99 make sure that 'ASCII', 'DAT', and 'DB' is rejected from musrFT. 2025-01-28 12:52:41 +01:00
suter_a 8dc871e082 path-run-name in RUN block of the msr-file can now handle spaces. 2025-01-20 16:10:25 +01:00
ext-mcfadd_r bfade6f4b8 Explicit passing of MnStrategy during minimizer initialization
This patch fixes compilation errors that arise with recent ROOT versions (e.g., 6.34.02),
which require a ROOT::Minuit2::MnStrategy object to be passed when initializing the
ROOT::Minuit2::MnX (X = Migrad, Simplex, Minimize) minimizers (i.e., instead of the integer
representing the "strategy").
2025-01-10 11:19:25 +01:00
suter_a df0c5ec545 slightly re-ordered the default files for mupp in the open dialog. 2024-12-16 07:42:14 +01:00
suter_a 196135fab5 changed default ROOT color kGreen to kGreen+2. 2024-12-14 15:23:58 +01:00
suter_a bb28e7258a adopted for custom button handling qt5. 2024-12-11 14:09:45 +01:00
suter_a 3e216cb6ea adopted for custom button handling. 2024-12-11 14:09:34 +01:00
suter_a 32768bfdf4 added missing enum tag. 2024-12-11 14:09:23 +01:00
suter_a 5d5ebde4c2 make the theme handling in musredit more flexible. At the same time adopted some part to more modern c++. 2024-12-11 14:09:11 +01:00
suter_a 60e2d25ce8 update of the ChangeLog 2024-12-03 18:21:01 +01:00
suter_a 4c38ff131f center edit widget for find. This gives a better user experience. 2024-12-02 20:14:23 +01:00
suter_a 3004823f36 added jump to block feature. 2024-12-02 20:11:54 +01:00
suter_a 532b6f42ff make sure that for non-muSR data errors are not = 0. Will set it to 1, and issue a warning. This prevents chisq to crash. 2024-10-14 14:38:05 +02:00
suter_a 6812f68a8f implemented unary operator for metaData in functions. 2024-10-11 16:39:24 +02:00
suter_a 2f6f3a6874 fixed a bug for out-of-repo build to generate git-info. 2024-10-11 08:25:27 +02:00
suter_a 9e8f22f629 adopted OpenMP handling for libZFRelaxation. 2024-09-25 09:47:28 +02:00
suter_a a96f1b35d7 fixed a bug in the mupp gui refresh of a collection. 2024-09-21 13:10:19 +02:00
suter_a 432c0bd6ec make sure that the run template number has at least 4 digits before proceeding. 2024-09-21 13:10:08 +02:00
ext-mcfadd_r 6263e9aba3 fix batch mode averaged output
closes issue #63
2024-09-12 11:02:09 +02:00
suter_a e0230196c2 improved dat-file reading for mupp. 2024-08-12 10:34:35 +02:00
suter_a 01582b5a44 updated the docu. 2024-06-24 09:45:31 +02:00
suter_a a6a3d26cd2 added the option to write the content of the MINUIT2.OUTPUT ascii file as yaml. This extends the previous commit from Ryan M.L. McFadden. 2024-06-18 12:56:21 +02:00
ext-mcfadd_r 05c8625dc1 ignore all files generated from an in-repo build 2024-06-18 12:55:51 +02:00
ext-mcfadd_r 78eb8653ce write the fit results to an easy-to-read/parse yaml file
This patch adds routines for writing a comprehensive set of fit results (i.e., parameter values, parabolic errors, asymmetric errors, covariances, correlation coefficients, etc.) for an individual `.msr` file to an easy-to-read/parse `.yaml` file.

The main motivation for the code addition is to provide users with easy access to the fit's covariance matrix without the need for "extra" manual effort (e.g., parsing the contents of `MINUIT2.OUTPUT` or `MINUIT2.root`). The other fit quantities are also included for completeness.

Reading/accessing the output is trivial using, for example, the PyYAML Python library (https://github.com/yaml/pyyaml):

```python
import yaml

with open("2125_tf_histo.yaml", "r") as fh:
	results = yaml.load(fh, Loader=yaml.SafeLoader)

cov = results["covariance"]["Field_1"]["Sigma_1"]
```

Note: the naming conventions chosen for the blocks in the `.yaml` output closely follow those used by the iminuit Python library (https://github.com/scikit-hep/iminuit).
2024-06-18 12:55:32 +02:00
ext-mcfadd_r 1a1e756d77 fix segfault
This patch provides a memory-safe alternative to the changes introduced in commit 418adfde67, which causes a segfault when the "batch mode" flag is required (i.e., for ascii/graphic export).

Note: the program name (i.e., argv[0]) has been added the list arguments passed to ROOT's TApplication. This ensures that the TApplication name matches that of the program (see https://github.com/root-project/root/blob/542b98b2ccca760fd83117b750b89d81b8e9b926/core/base/src/TApplication.cxx#L179-L180).
2024-06-18 12:55:10 +02:00
suter_a f62a3cc88e add CPU info to the configure process. 2024-06-10 11:14:54 +02:00
suter_a a9d84b87e1 remove more accidently added file. 2024-06-08 16:41:51 +02:00
suter_a 50781aa413 remove accidentely added file. 2024-06-08 16:41:38 +02:00
suter_a fa37bae855 update of the docu. 2024-06-08 16:29:05 +02:00
suter_a aa32d07929 updated version info, due to the macOS OpenMP support. 2024-06-08 16:28:48 +02:00
suter_a 45d87bc645 modernize the way how to check/deal with OpenMP. This helps also on the macOS side. 2024-06-07 15:31:34 +02:00
suter_a 6a7178b3a9 propagate only necessary root flags to TApplication. 2024-06-06 10:04:03 +02:00
suter_a d6cc0f3c0e moved mupp examples form the mupp source destination to doc/examples. 2024-04-26 16:05:00 +02:00
suter_a 04181ad1e0 update of the documentation. 2024-04-23 11:00:54 +02:00
suter_a c9ecca0c19 got rid off some double brackets. 2024-04-20 18:18:32 +02:00
suter_a 1a5561b265 fixed a fruther bracket bug. 2024-04-20 17:52:22 +02:00
suter_a 65066596e8 improved bracket handling in function string generation. 2024-04-20 09:59:23 +02:00
suter_a c7b0d2b40f update of the ChangeLog. 2024-04-20 09:59:14 +02:00
suter_a 90d5e74289 increased musrfit patch number. 2024-04-20 09:59:04 +02:00
suter_a d66b2f383c make sure that brackets are not lost in the function reconstruct, e.g. 1/(2*parX) is not going over into 1/2*parX. 2024-04-20 09:58:51 +02:00
suter_a 847a2cfb8e improved variable description. 2024-04-20 09:58:40 +02:00
suter_a 2dfa28d5c0 fixed an error in DumpHeader when dumping a TDoubleVector. 2024-03-17 09:29:17 +01:00
suter_a 9440ddbb40 fixed a typo: Atoi() instead of Atof(). 2024-03-17 09:29:08 +01:00
suter_a e149f73d15 for macos: add /usr/local/lib to DYLD_LIBRARY_PATH for qt5. This is needed to find the nexus lib. 2024-03-17 09:28:45 +01:00
suter_a 445d48cfbf revert back to boost ellint_1, since on many compilers the c++17 std::comp_ellint_1 is not yet implemented. 2024-03-17 09:24:10 +01:00
suter_a 1b882c20b3 use the QProcess startDetached method and not the static one. 2024-02-14 12:14:53 +01:00
suter_a 71a7267028 use the QProcess startDetached method and not the static one. 2024-02-14 12:14:33 +01:00
suter_a 0760a836b4 start musrview as detached process: simplifies things. 2024-02-14 12:14:19 +01:00
suter_a 057ae07be6 add /usr/local/lib to default DYLD_LIBRARY_PATH for macOS. 2024-02-08 14:04:31 +01:00
suter_a 17339e191d updated copyright info. 2024-02-07 15:29:08 +01:00
suter_a fb7a3517e9 added some missing qutation marks musrfit_startup.xml. 2023-12-05 09:34:42 +01:00
suter_a 2eb888874d added some more default search path to default musrfit_startup.xml. 2023-12-05 09:34:35 +01:00
suter_a 326587c912 added proper rpath handling. 2023-11-17 09:02:58 +01:00
suter_a df926a4d66 add an option to musrfit which allows to replace to musrfit_startup.xml by the default one. 2023-11-17 09:02:40 +01:00
suter_a f72a213bd8 adopted default path/file-name scheme to the current state. 2023-11-10 15:22:16 +01:00
suter_a 4c222a4c1b adopted the technical doxygen files to the current state. 2023-11-10 15:22:03 +01:00
suter_a 7384ce4b89 improved the nonlocal field dump, by allowing a custom range. 2023-11-09 13:15:21 +01:00
suter_a 0ee1d4e264 mupp: got rid of some left over raw pointers by replacing them through smartpointers. 2023-11-09 13:15:08 +01:00
suter_a 18b06267d2 make sure that singleRunMsrFile is a legal pointer before proceeding. 2023-11-09 13:14:56 +01:00
suter_a cfccb30eb8 switched TGapIntegrals from raw -> smart pointers. 2023-11-09 13:14:47 +01:00
suter_a 9524e7201c remove unused code. 2023-11-09 13:14:34 +01:00
suter_a 250b786766 more work in switching raw -> smart pointer. 2023-11-09 13:13:25 +01:00
suter_a 7765f24ce0 switched TLondon1D from raw -> smart pointers. 2023-11-09 13:12:52 +01:00
suter_a e8511dbe8b fixed stupid copy/paste error when switching to smart pointers in PMusrWiz. 2023-11-09 13:12:39 +01:00
suter_a 3dd8e404dc adopted MusrRootDefinition doc to smart pointer use. Updated MusrRootDefinition.pdf 2023-11-09 13:12:13 +01:00
suter_a ae75478043 adopted MusrRootDefinition doc to smart pointer use. 2023-11-09 13:12:02 +01:00
suter_a 6340f9d196 more work on Raw -> Smart Pointers for external libs. 2023-11-09 13:11:51 +01:00
suter_a 4726764306 Raw -> Smart Pointers in TMusrRunHeader. 2023-11-09 13:11:40 +01:00
suter_a 4ba2502788 Raw -> Smart Pointers in PNeXus. 2023-11-09 13:11:21 +01:00
suter_a 2eec7bd182 Nonlocal: Raw -> Smart Pointers. Improved config of standalone dump_nonlocal_field. 2023-11-09 13:11:07 +01:00
suter_a fb8ca28ea3 print for debug: the ostream need explicit string not char[]. 2023-10-25 13:49:05 +02:00
suter_a d96d1f68d5 increased main version to 1.9.2, libPMusr to 1.4.0, and mupp to 1.1.0. 2023-10-25 10:59:25 +02:00
suter_a cff7169774 added check for mupp script in case the data collection is not readable. 2023-10-25 10:59:11 +02:00
suter_a 5000783198 (i) fix of missing status init. (ii) changed vector copy evaluation. 2023-10-25 10:59:00 +02:00
suter_a 01567bb6f0 Raw -> Smart Pointers for mupp_plotter, qt5/qt6. 2023-10-25 10:58:50 +02:00
suter_a 843770505a Raw -> Smart Pointers for PVarDialog, mupp, qt5/qt6. 2023-10-25 10:58:41 +02:00
suter_a 99492e820c Raw -> Smart Pointers for mupp, qt5/qt6. 2023-10-25 10:58:32 +02:00
suter_a 5002ed84de Raw -> Smart Pointers for musrWiz, qt5. 2023-10-25 10:58:20 +02:00
suter_a b9d05d5fcb Raw -> Smart Pointers for musrStep, qt5. 2023-10-25 10:58:09 +02:00
suter_a a66cd45b44 Raw -> Smart Pointers in PSubTextEdit, musredit, qt5. 2023-10-25 10:57:59 +02:00
suter_a 626334e902 Raw -> Smart Pointers in PPrefsDialog, musredit, qt5. 2023-10-25 10:57:47 +02:00
suter_a 4d516d659d Raw -> Smart Pointers for musredit qt5. 2023-10-25 10:57:36 +02:00
suter_a afbe8a8ee6 start replacing raw to smart pointers for mupp. 2023-10-25 10:57:27 +02:00
suter_a 302f5cd5ca add missing include. 2023-10-25 10:57:16 +02:00
suter_a 64a5260874 work on smart pointer transition of musrWiz. 2023-10-25 10:57:05 +02:00
suter_a 088a35cb23 more work on smart pointer transition of musrStep. 2023-10-25 10:56:52 +02:00
suter_a 4fc58ac41f more work on smart pointer transition of PTextEdit. 2023-10-25 10:56:44 +02:00
suter_a 9f4fa44034 more work on smart pointer transition of PTextEdit. 2023-10-25 10:56:32 +02:00
suter_a b88c18e7d9 more work on smart pointer transition of PTextEdit. 2023-10-25 10:56:22 +02:00
suter_a 1117ad9732 raw -> smart pointer for musredit where it makes sence. 2023-10-25 10:56:10 +02:00
suter_a c2d2307755 switched PRunSingleHistoRRF where possible to smart pointers. 2023-10-25 10:55:59 +02:00
suter_a 6ab344479d switched PRunDataHandler where possible to smart pointers. 2023-10-25 10:55:46 +02:00
suter_a f03be7add9 switched PRunBase where possible to smart pointers. 2023-10-25 10:55:35 +02:00
suter_a 2e9542c796 switched PRgeHandler where possible to smart pointers. 2023-10-25 10:55:24 +02:00
suter_a a66a5e3c70 switched PMusrT0 where possible to smart pointers. 2023-10-25 10:55:10 +02:00
suter_a 282ed68b61 switched PMusrCanvas where possible to smart pointers. 2023-10-25 10:54:59 +02:00
suter_a b01505b07f replaced some raw pointer by smart pointer in PFitter. 2023-10-25 10:54:45 +02:00
suter_a bb8055f3e2 switch to smart pointers in PMsr2Data where possible. 2023-10-25 10:54:28 +02:00
suter_a 5f66baa1e2 switched PFitter to smart pointers. 2023-10-25 10:50:48 +02:00
suter_a 9ef5c5cac6 switched PMsrHandler where possible to smart pointers. 2023-10-25 10:03:18 +02:00
suter_a 17bc497b30 remove one check for Fourier only. 2023-10-25 10:01:41 +02:00
suter_a 1c8c1a8d0f get rid of raw pointers for PFourierCanvas where it makes sense. 2023-10-25 10:01:28 +02:00
suter_a 18f077c6e7 removed obsolate clean up. 2023-10-25 09:56:24 +02:00
suter_a f9d0d7f18f more work to get rid of raw pointers. 2023-10-25 09:12:10 +02:00
suter_a 75bb526ca3 replaced raw pointers by smart pointers for musrt0.cpp. 2023-10-25 09:06:36 +02:00
suter_a c54bc5c0dc replaced raw pointers by smart pointers for musrFT.cpp. 2023-10-25 09:04:36 +02:00
suter_a a5340ae34c replaced raw pointers by smart pointers for msr2data.cpp. 2023-10-25 09:01:29 +02:00
suter_a 4d52fa778b replaced raw pointers by smart pointers for dump_header.cpp. 2023-10-25 09:01:15 +02:00
suter_a bad6812b2b replaced raw pointers by smart pointers for any2many.cpp. 2023-10-25 09:01:02 +02:00
suter_a 31761e1eca replaced raw pointers by smart pointers for addRun.cpp. 2023-10-25 09:00:48 +02:00
suter_a 8f2891c0a7 replaced raw pointers by smart pointers for musrview.cpp. 2023-10-25 09:00:09 +02:00
suter_a 08a5812736 replaced raw pointers by smart pointers for musrfit.cpp. 2023-10-25 08:58:58 +02:00
salman 3eb1d04a71 Fixed compatibility with C++17 2023-09-28 13:33:16 +02:00
suter_a a2ba9b588d updated the docu. Newly added: brief description of the supported file formats. 2023-09-02 13:20:49 +02:00
suter_a c1ad16d403 more potential musr-data-file paths added. 2023-08-31 10:39:48 +02:00
suter_a 29d09fc272 more robust handling of positron detector entries. 2023-08-31 10:39:35 +02:00
suter_a bcbe945d84 make sure that exported MusrRoot files have proper stats in the histo objects. 2023-08-31 10:39:20 +02:00
suter_a 5a0077f51b handle dump of RunSummary with and without '\n' and/or '\r' properly. 2023-08-31 10:39:07 +02:00
suter_a 4b3e77dcd6 try to improve the reload issue of musrT0 called via musredit - Issue #61 on bitbucket. 2023-08-31 10:38:48 +02:00
suter_a d43a0df893 improved search run, allowing to look for a specific file format in case the run is saved in multiple different file formats. 2023-08-31 10:38:29 +02:00
suter_a d948460b0b added the flame instrument. 2023-08-31 10:38:07 +02:00
suter_a f996232033 add flag -c for dump_header via musredit. 2023-05-19 12:08:34 +02:00
suter_a e4f7e22835 dump_header can dump #counts for each detector now also for mud and nexus. 2023-05-18 08:17:46 +02:00
suter_a dbe129e7f1 dump_header can dump #counts for each detector. Currently only for MusrRoot. 2023-05-18 08:17:28 +02:00
suter_a 1850a2c762 allow more flexible dealing with LEM run numbers > 9999. 2023-05-16 09:22:42 +02:00
suter_a 95715dd62d add 5-digit run name template for lem, needed for addRun and dump_header. 2023-05-16 09:22:24 +02:00
suter_a 936c862ca7 add hint for potential flatpak. 2023-05-16 09:22:12 +02:00
suter_a 058759c0bc fixed c++ streaming output flag error. 2023-03-07 12:29:14 +01:00
suter_a 45a8b0a836 updated docu. 2023-02-17 15:13:01 +01:00
suter_a 55169040dd changed to more meaningful labelling. 2023-02-17 15:04:19 +01:00
suter_a 0c1c083db6 tweak needed for rootcling dictionary generation. 2023-02-17 10:15:45 +01:00
suter_a 1bdf04c36d updated ChangeLog. 2023-02-17 10:15:35 +01:00
suter_a dd80782cfe add musrfit version info on the config output. 2023-02-17 10:15:27 +01:00
suter_a b2cbd4b460 add a full example to the test folder. 2023-02-17 10:15:08 +01:00
suter_a c696ac1305 cleanup and cosmetics. 2023-02-17 10:15:00 +01:00
suter_a 7fa26f5f54 removed build directory which should not have gone to the git. 2023-02-17 10:14:48 +01:00
Maria Martins 9fefa5b136 example files for depthProfile 2023-02-17 10:14:37 +01:00
suter_a c34e711f37 updated the copyright info. 2023-02-17 10:13:48 +01:00
suter_a 50f5bf659b provide some more info in the README for PDepthProfile. 2023-02-17 10:13:10 +01:00
suter_a cfa8d55c8a update of the copyright info. 2023-02-17 10:13:01 +01:00
suter_a 3a75ced375 improvement on: allow to draw theory only at the data points for PRunNonMusr. 2023-02-17 10:12:43 +01:00
suter_a cb53b1b67b allow to draw theory only at the data points for PRunNonMusr. 2023-02-17 10:12:26 +01:00
suter_a 0903db8842 some first bug-fixing and cleanup of the code. 2023-02-17 10:11:43 +01:00
suter_a 9a6e958016 first implementation of a more efficient DepthProfile user function. Not yet tested! 2023-02-17 10:11:32 +01:00
suter_a c79b74e241 fixed formatting issue. 2023-02-17 10:11:16 +01:00
suter_a 4ba0647765 remove obsolate file. 2023-02-17 10:11:05 +01:00
suter_a fae76acb21 remove .idea from PDepthProfile. 2023-02-17 10:10:46 +01:00
suter_a 0a265b0007 start to work on a more efficient version of MM PDepthProfile user function. 2023-02-17 10:10:34 +01:00
suter_a 8e9bc00bea moved depth_profile_startup.xml to test directory, which still needs to be populated. 2023-02-17 10:10:19 +01:00
suter_a 22bde27a2c add new inline function GetNoOfRgeDataSets(). 2023-02-17 10:10:03 +01:00
suter_a 9ce9e9f0a3 define tag energy_vec with attributes start, stop, step to define rge energy vector in a compact way in startup.xml files. 2023-02-17 10:09:33 +01:00
martins_m 2db36b2e3d implementation of depth step fits 2023-02-17 10:06:06 +01:00
suter_a a57e61d37a added depth profiler skeleton for MM. 2023-02-17 10:03:17 +01:00
suter_a a7f56baadc fixed wrong description (copy/paste error). 2023-02-17 10:03:03 +01:00
suter_a 6e30e7e71f add reading routine for the dat-files as generate from msr2data. Use case: special 'non muSR fit' type. 2023-02-17 10:02:02 +01:00
suter_a de5763d5cc start adding CSV like data reading routine with the FileFormat label DAT. 2023-02-17 10:01:35 +01:00
suter_a f7bc2aab87 fixed wrong function declaration in the docu, not the code. 2023-01-30 09:50:00 +01:00
suter_a 4d2262d557 fixed typo. 2023-01-30 09:49:44 +01:00
suter_a f42306e42b fix of an old copy/paste error! 2023-01-10 16:18:44 +01:00
suter_a b328657191 add OS tag for packages. 2023-01-10 16:18:29 +01:00
suter_a a356534e6a updated the copyright info. 2023-01-05 11:04:42 +01:00
suter_a 6e55bf0f5e improved dat file read routine for mupp for the case columns are added after RUN. 2023-01-05 10:47:12 +01:00
suter_a aa450aa6f6 updated the ChangeLog. 2023-01-05 10:46:22 +01:00
suter_a a6c78de3ea make them OpenMP aware for macOS. 2022-12-13 12:17:19 +01:00
suter_a 5cce1af16c update of the docu. 2022-12-12 16:35:36 +01:00
suter_a 3e534d11f7 add feature that mupp_plotter can show/hide lines between the data points. 2022-12-04 10:50:55 +01:00
suter_a 62c3600fb7 added some more technical docu to PMsr2Data. 2022-12-04 10:50:35 +01:00
suter_a 20ca48ac88 added cumulative frequency output. 2022-12-04 10:50:22 +01:00
suter_a 58ab025095 add a rgeHandler tester which allows quickly to test rge-file related handling. 2022-11-25 10:22:19 +01:00
suter_a 8a8046d28a add energy_vect tag which allows a more compact startup xml-file if the rge-files are equally spaced in energy. 2022-11-25 10:22:05 +01:00
suter_a 0dd34fbdf0 updated CMakeLists.txt to get more version info. 2022-11-25 10:21:27 +01:00
suter_a b481d2c560 adopted to the newer Qt versions. 2022-11-25 10:17:09 +01:00
suter_a 69ed3037de adopted to the newer boost versions. 2022-11-25 10:16:56 +01:00
suter_a e32aa61643 replaced sprintf -> snprintf throughout. 2022-11-25 10:16:20 +01:00
suter_a eb63f5862b adopted from qt5 to qt6. 2022-09-06 20:54:52 +02:00
suter_a e6ad904fee improved export parameter list behavior. Allow multiple deliminators: ',', ';', ' ' 2022-09-02 14:42:51 +02:00
suter_a 531d238fa3 fixed typo. 2022-09-02 14:42:37 +02:00
suter_a b6532ffe39 improved msr<->mlog swap dialog. 2022-09-02 13:55:34 +02:00
suter_a 8f682aceca make sure that the minimum height of musrStep is not larger than the available screen resolution height. 2022-09-02 13:26:49 +02:00
suter_a d0923d75b9 fixed bug in msr2data global+ according to issue #33 reported on bitbucket. 2022-08-09 08:21:53 +02:00
suter_a 807b3e9323 lift cmake requirement to 3.17. 2022-07-06 14:54:44 +02:00
suter_a 8f4e2e6785 removed obsolete filed. 2022-07-06 14:53:25 +02:00
suter_a c36552708e more work towards a modern cmake. As a first example reworked FFTW3 binding. 2022-07-06 14:52:24 +02:00
suter_a 9cf5b5b49c improvement dealing with rpath on macOS. 2022-07-06 14:50:13 +02:00
suter_a 3bde35910c fixed typo. 2022-06-01 13:46:34 +02:00
suter_a 1dd195b837 use PFindRun facility now. Cleaned up various little things. 2022-06-01 13:12:32 +02:00
suter_a d977a8cd1a move on to modernize towards modern c++. 2022-05-31 13:05:37 +02:00
suter_a 357e5d6069 update of the docu. 2022-05-29 15:56:24 +02:00
suter_a c0e43a46e4 update ChangeLog 2022-05-29 15:45:29 +02:00
suter_a 843ad88498 adopted to new PSI-BIN lib. Added facility for finding runs via musrfit_startup.xml templates. 2022-05-29 15:44:24 +02:00
suter_a 40007650f6 refactor PSI-BIN lib. Fix a couple of bugs and start to adopt to more modern c++. 2022-05-29 15:37:02 +02:00
suter_a b72ec88783 add search facility for runs via musrfit_startup.xml template entries. 2022-05-29 15:36:51 +02:00
suter_a 953cb32ded fixed a typo, and tell the user if the file format info is not provided MusrRoot is assumed. 2022-05-29 15:36:41 +02:00
Andreas Suter fea7b535b6 use proper return value (int) rather than bool. 2022-04-29 08:59:37 +02:00
suter_a e679546d60 replace the run-list handling through the already existing handler class PStringNumberList. 2022-04-27 16:49:15 +02:00
suter_a d50659831d fixed several copy/paste errors which prevented sometimes averaging and instead crashed. 2022-04-25 15:33:57 +02:00
suter_a 990cdf582d NeXus: replaced deprecated NXgetnextattr by NXgetnextattra. 2022-04-12 15:13:28 +02:00
suter_a 0e68888948 improved formated string handling to make compilers happy. 2022-04-12 15:13:19 +02:00
suter_a 980ed79fc4 do not ignore the return value of system(cmd) anymore. 2022-04-12 15:13:08 +02:00
suter_a 1007044215 added necessary include directory info for boost, for PRgeHandler. 2022-04-12 15:12:57 +02:00
suter_a 19c1875442 fixed a typo. 2022-03-14 10:20:33 +01:00
ext-mcfadd_r 5066373659 use the Particle Data Group's recommended value for the muon lifetime 2022-01-11 11:51:43 +01:00
ext-mcfadd_r 0c4b33b056 fix the discontinuity encountered at large t when sigma+/- is large
- Though the discontinuity encountered in the previous version is small (because of the large Gaussain damping terms), it introduced considerable numeric instability when fitting. Consequently, simply zeroing the already heavily damped is sensible and yeilds smooth behaviour of the function.
- Also ensure that the return value for the odd frequency component is always finite.
2022-01-11 08:45:01 +01:00
ext-mcfadd_r aacad8e7ad improvements to PTheory::SkewedGauss
- Divide the function evaluation into even/odd frequency components. Some additional "helper" terms have been added to aid in this.
- Use a better value to check for floating-point overflow in the evaluation of ROOT::conf_hyperg and return std::numeric_limits<Double_t>::max() when necessary. This extends the function's range of validity to arbitrary time (whereas the previous implementation would fail loudly for large sigma+/-).
- Format the src with clang-format.
2022-01-11 08:44:50 +01:00
suter_a 538113aad3 replace deprecated QFontDatabase by the new static functions. 2021-12-13 13:23:31 +01:00
suter_a 5b94d4d302 modernized the cmake <-> Qt handling. 2021-12-01 15:42:43 +01:00
suter_a 1aa7ae7f0d try re-create musredit_startup.xml in case it is corrupted. 2021-12-01 15:42:34 +01:00
suter_a 1fb60c0aae get rid of deprecated dialogs and make them more uniform. 2021-12-01 15:42:18 +01:00
suter_a e56c4bb450 remove obsolate qt6 musredit dialog. 2021-12-01 15:42:01 +01:00
suter_a b377f0501e adopted to dks6. 2021-11-05 14:40:44 +01:00
suter_a ebf60a8925 revision of ChangeLog. 2021-11-05 14:39:03 +01:00
suter_a c988f00ad8 adopted the the new dyld on macOS Monterey. 2021-11-05 14:37:24 +01:00
suter_a 87bee52edb add a default y-range to the range option in the PLOT block. 2021-10-30 10:13:23 +02:00
suter_a f0e89865e2 fixed a copy/paste error. 2021-10-30 10:13:09 +02:00
suter_a d83b40e5f9 fixed a copy/paste error. 2021-10-30 10:12:54 +02:00
suter_a dd02b07c56 update of doku for the dks6 branch. 2021-10-06 15:24:00 +02:00
suter_a 54f6fb62b3 improved the error messages slightly. 2021-10-06 15:17:16 +02:00
suter_a 1341cfb8fe add option to musrfit that the user can choose from the command line the number of threads to be used for OpenMP. Updated the docu accordingly. 2021-10-06 15:16:00 +02:00
suter_a 251cf6b6f8 allow to inspect how many cores are available for OpenMP. 2021-10-06 15:07:41 +02:00
suter_a 7e32600b8a allow to set the default size of musredit via the musredit_startup.xml. 2021-10-02 09:36:17 +02:00
suter_a c5da80eb8a removed debug info from phase detection. 2021-09-22 09:56:54 +02:00
suter_a f7ef21c827 increase version number from 1.7.4 -> 1.7.5 2021-09-22 08:56:09 +02:00
suter_a dd50f80e90 fix phases to +-360 degree. 2021-09-22 08:55:54 +02:00
suter_a 46bea9752f add missing include directory path in cmake. Thank's to Akihiro Koda for reporting the bug and proposing the fix. 2021-09-21 07:59:41 +02:00
suter_a 8c0a0413e5 increased the PippardFitter version number. 2021-08-19 08:08:18 +02:00
suter_a d2c7a3b293 added some necessary include paths. 2021-08-19 08:08:06 +02:00
suter_a 9a1f43d33e adopt for proper git-info handling. 2021-08-19 08:07:51 +02:00
suter_a f76ebc8f18 added some docu. 2021-08-19 08:07:40 +02:00
suter_a 2534168d50 add the option to dump the nonlocal field values for the ASlibs via the programm dump_nonlocal_field. 2021-08-19 08:07:28 +02:00
suter_a ef2c1ba241 make PSI bulk MusrRoot files accessible if the file name is generated from the run-number, year, etc. 2021-07-28 13:31:38 +02:00
prokscha bfe1389f9b Removed MuTransistion from tests directory. 2021-07-28 13:31:27 +02:00
suter_a 61adf8017e fixed another git-revision.h which was forgotten. 2021-07-12 16:46:44 +02:00
suter_a ad08aa61dd some fixes on the qt5 side for a none-git project source. 2021-07-12 16:46:37 +02:00
suter_a 668b4bf481 more work on the none git source version. 2021-07-12 16:46:28 +02:00
suter_a 39485d6f72 some more work on the none git source version. 2021-07-12 16:46:20 +02:00
suter_a d3d55f8719 make sure that git repo info is only added if the musrfit project source is indeed a git repo, and not e.g. a download. 2021-07-12 16:46:10 +02:00
suter_a edeff3563c add mupp plotter export function. 2021-07-12 16:45:57 +02:00
suter_a 6f917db41f update docu version information. 2021-06-17 10:33:11 +02:00
suter_a 4b52a843f6 updated the ChangeLog. 2021-06-17 08:25:17 +02:00
suter_a e74ddab3ad increased version number. 2021-06-17 08:25:08 +02:00
suter_a 1f5e1770a7 lift #forward == #backward restriction. 2021-06-17 08:24:59 +02:00
suter_a 6bef7903bb lift #forward == #backward restriction. 2021-06-17 08:24:49 +02:00
suter_a 083e715fc4 remove obsolete test. 2021-06-17 08:24:39 +02:00
suter_a 1bdccae1d6 improve the readability of the time with packing in the code. 2021-06-08 07:30:37 +02:00
suter_a baf26aac7f adopted to the not quite standard ISIS NeXus files. 2021-06-05 12:18:40 +02:00
suter_a effab214f9 perform a more robust casting. 2021-06-05 12:18:30 +02:00
suter_a 7142c6b0b7 removed unnecessary check. 2021-06-05 12:18:18 +02:00
suter_a 69540aa06f increased the version number. 2021-06-05 12:18:08 +02:00
suter_a bda48e5625 updated mud to the newest version and made it Apple Silicon M1 ready. 2021-06-05 12:17:52 +02:00
suter_a aa2766bbaf add info on how musrfit is compiled Debug or Release. 2021-05-21 08:02:37 +02:00
suter_a 0329cf559f add README files for the DummyUsrFcn with an example. 2021-04-19 16:14:10 +02:00
suter_a 04da5d7d43 update of ChangeLog. Increase version number. 2021-04-19 16:13:59 +02:00
suter_a f2c06094e3 add a full dummy user function class with a global part. This can be used as a starting point to develop new polarization functions. Currently no rge-handling present. 2021-04-19 16:13:48 +02:00
suter_a 0bead218d0 changed MuSR_td_PSI_bin in order to read old data. Not yet tested. 2021-04-19 16:11:59 +02:00
suter_a eb74b1ec53 update of the docu. 2021-04-19 16:09:57 +02:00
suter_a cca75c7970 propagate ROOT_GRTEQ_24 properly to the compile options. 2021-04-15 16:37:13 +02:00
suter_a b3cd31199e Fix out-of-bound bug pointed out by Ryan McFadden. 2021-04-13 07:58:28 +02:00
suter_a 3fc410e7a7 add missing Qt6 flag for the case the user wants to choose himself. 2021-04-13 07:58:16 +02:00
suter_a 865efb506a make sure that group has indeed any elements. 2021-04-13 07:58:03 +02:00
suter_a 57885ad4c2 update of the docu. 2021-04-09 16:04:57 +02:00
suter_a 9885968d24 applies already for 6.24-rc which is 6.23.99, hence the odd adaptation. 2021-04-09 16:03:27 +02:00
suter_a 15f191c8d6 changes needed since upcoming ROOT6.24 (minuit2) will break the backward compatibility. 2021-04-09 16:03:16 +02:00
suter_a 2a531bd58d add ROOT version information for better diagnostics. 2021-04-09 16:03:04 +02:00
suter_a c2719c4996 switched libPhotoMeissner to the new centralized PRgeHandler. 2021-04-06 14:53:17 +02:00
suter_a bd75f25ee6 slightly more modern c++ init style. 2021-04-06 14:41:13 +02:00
suter_a 9657c8076f slightly improved the rge handler. 2021-04-06 14:40:53 +02:00
suter_a 8c604cc02b fix an error number of theory points for the view data. 2021-04-06 14:40:38 +02:00
suter_a 02496711b4 make PRgeHandler to a shared libs. Adopted Nonlocal and PMagProximity accordingly. 2021-04-06 14:40:17 +02:00
suter_a a821890ef5 changed the user function for nonlocal fitting to the new rge-handler. This breaks the backwards compatibility! 2021-04-06 14:39:56 +02:00
suter_a df53338d6b update of the ChangeLog. 2021-04-06 14:39:25 +02:00
suter_a 08c841f0d9 add some boost component checks. Increase the musrfit version number. 2021-04-06 14:39:09 +02:00
suter_a 756c6a52c1 add a central rge-handler which can be used by all user function classes. 2021-04-06 14:38:51 +02:00
suter_a a7b540cfdb update of the copyright info. 2021-03-29 08:30:43 +02:00
suter_a ae57d5b57c refresh of the setup docu. 2021-03-09 09:51:49 +01:00
suter_a 5f19c3b795 modernized the msr input file. 2021-03-09 09:50:13 +01:00
suter_a 02926a6cc5 by changing the behaviour of the global parts of the class PUserFcnBase from pure virtual default NeedGlobalPart=false, the code can be simplified in many places. 2021-03-09 09:49:57 +01:00
suter_a d8e4a33ceb xml schema more flexible about the order of 'histos' and 'RunHeader' 2021-02-26 09:20:02 +01:00
suter_a e5bf74e4ee fix of a typo. 2021-02-26 09:19:50 +01:00
suter_a aa6f2493d0 fixed wrong casting originating from a copy/paste error. 2021-02-26 09:19:39 +01:00
suter_a fb18c4a7cc Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2021-02-17 14:05:54 +01:00
suter_a d94d06d2c2 better version for icons under macosx. 2021-02-16 20:55:17 +01:00
suter_a 307e8c62dd Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2021-02-14 22:08:12 +01:00
suter_a e80346c472 add macOS BigSur icon to musredit. 2021-02-14 22:06:09 +01:00
suter_a cdc35e1684 add new method GetTypeOfPath to TMusrRunHeader. It allows deduce the type of a given path-name. 2021-02-09 10:52:51 +01:00
suter_a f2334f39f8 Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2021-01-29 15:24:43 +01:00
suter_a a04ec67096 fix typo. Increase minimal root version from rpm. 2021-01-29 15:16:31 +01:00
suter_a 5509d05915 update of the docu. 2021-01-29 15:15:38 +01:00
suter_a a97308020d some bug fixing in the cmake chain concerning the new Qt6 stuff. 2021-01-29 15:13:16 +01:00
suter_a b2a371a9f0 remove comment. 2021-01-29 15:12:57 +01:00
suter_a 01957630e8 add first Qt6 version of musredit, mupp, etc. 2021-01-29 15:12:30 +01:00
suter_a acb1b1542a make sure that CUDA is present before pushing CUDA specific compiler flags. 2021-01-12 14:37:00 +01:00
suter_a 5134a0cc00 Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2021-01-12 12:38:31 +01:00
suter_a f9f64109c1 added the missing DKS flags after removing FindDKS.cmake 2021-01-12 12:33:51 +01:00
suter_a ab05e9c577 Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2020-12-28 19:40:31 +01:00
suter_a cd53c5a574 add proper p-wave (line,point) superfluid density calculation -- adopted to DKS. 2020-12-28 19:27:21 +01:00
suter_a aa08b40696 restrict some compiler flags to the correct platforms. 2020-12-28 18:26:45 +01:00
suter_a b8d899f67f add proper compiler flags for DKS/CUDA. 2020-12-28 18:25:31 +01:00
suter_a 7d4ed40fb0 remove obsolate FindDKS.cmake. 2020-12-28 18:24:30 +01:00
suter_a 1f18b4531a fix minor '=' vs '==' bug. 2020-12-26 11:54:18 +01:00
suter_a a9a61f5518 adjust to Qt 5.14.x; remove compiler warnings. 2020-12-26 10:36:07 +01:00
suter_a 56917d3fec The musredit help system is using now the system default web-browser. This simplifies things, especially the qtwebengine package is not needed anymore. 2020-12-26 10:35:20 +01:00
suter_a e5404d1370 remove redundant check from musredit/fileSaveAs 2020-12-26 10:34:34 +01:00
suter_a 2d877326ae add missing compiler switches for DKS_OPENCL and DKS_CUDA needed for macOS. 2020-12-18 21:35:45 +01:00
suter_a 0bdcaf3497 DKS improvements on macOS Big Sur. 2020-12-16 20:14:28 +01:00
suter_a 6a40e1c687 remove redundant check from musredit/fileSaveAs 2020-09-10 15:26:15 +02:00
suter_a aaa551be2b musredit: if save cannot write file, popup an error message dialog. 2020-09-10 15:07:37 +02:00
suter_a ee755747e1 added a missing check in Fourier difference handling. 2020-09-01 15:11:35 +02:00
suter_a 3b5060c061 musrview gets the new feature: calculate theory points only at data points.
Conflicts:
	doc/html/searchindex.js
	doc/html/setup-dks.html
	src/classes/PMusrCanvas.cpp
	src/include/PMusrCanvas.h
	src/musrview.cpp
2020-08-29 11:49:49 +02:00
suter_a ae105bacb4 moved fTriggerColor toggle state to the proper position. 2020-07-28 09:09:05 +02:00
suter_a ccb87e8b7a A single asymmetry plot allows to toggle the color of the theory function line by the key 't'. 2020-07-27 19:23:28 +02:00
suter_a 8dc52a269b add DKS system variable check. 2020-07-12 11:35:50 +02:00
suter_a 5c7f28aad2 musredit: check if system variables ROOTSYS and MUSRFITPATH are set, and if not popup a warning. 2020-07-12 11:29:54 +02:00
suter_a cbf3fcbb4a add another startup check which makes sure that musrfit is found by musredit. 2020-07-11 20:04:44 +02:00
suter_a d3186e07e4 replaced obsolete QXmlDefaultHandler by QXmlStreamReader in musrWiz. 2020-06-20 11:00:26 +02:00
suter_a c559529dc3 make more function available to mupp (sinh, .., asin, .., and sqrt) 2020-06-20 11:00:12 +02:00
suter_a c70e92659d replaced obsolete QXmlDefaultHandler by QXmlStreamReader in PChangeDefaultPathsDialog. 2020-06-20 10:59:25 +02:00
suter_a 5e9e075133 replaced obsolete QXmlDefaultHandler by QXmlStreamReader in mupp 2020-06-20 10:59:09 +02:00
suter_a a2d7c58a97 replaced obsolete QXmlDefaultHandler by QXmlStreamReader in musredit. 2020-06-20 10:58:56 +02:00
suter_a 4d04f45699 resolve merge conflict: update of the docu 2020-06-18 10:26:07 +02:00
suter_a 2c0f16a317 adopted for meta info in functions needed for DKS. 2020-06-18 08:51:14 +02:00
suter_a 32bac0e197 Functions can now not only operate on parameters and maps but also on meta information
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.
2020-06-18 08:16:43 +02:00
suter_a 8acb5474a9 add field, temperature values from meta-data of the data-files to the runs. This will be needed if functions want to access this information (not yet implemented). 2020-06-18 08:16:28 +02:00
suter_a 32b4c89dae add minimum size to musredit help. 2020-06-08 18:59:19 +02:00
suter_a f9407ef975 fixed double newline with alpha and beta, accidentally introduced. 2020-05-26 19:55:15 +02:00
suter_a b5fb5b8b4a updated the docu and adopted the ChangLog 2020-05-26 07:17:21 +02:00
suter_a d2caf435fb allow alpha, beta in the RUN block being expressed via a function. 2020-05-26 07:17:02 +02:00
suter_a b319d5cab1 make some cmake/boost/compiler combinations happy. 2020-05-19 16:06:57 +02:00
suter_a 4554296dde fixed some doxygen bugs in the technical docu. 2020-05-19 16:06:38 +02:00
suter_a 0fa40bbc73 updated the technical documentation. 2020-05-19 16:06:27 +02:00
suter_a 0314c1225b mupp add var: check if a variable for a given collection already exists, and if yes, replace it, otherwise add the new variable. 2020-05-17 16:40:11 +02:00
suter_a 39e427a0cd update of the docu. 2020-05-16 09:27:42 +02:00
suter_a 29291bd0b9 release new version 1.6.0 2020-05-16 09:27:12 +02:00
suter_a 259423132b fixed merge conflict in update of the docu. 2020-05-16 09:25:23 +02:00
suter_a c7e4664e89 add more comments to the mupp script. 2020-05-16 09:15:24 +02:00
suter_a 4599718326 fixed a typo. 2020-05-16 09:15:12 +02:00
suter_a 0dfb181b4d removed merge conflict 2020-05-16 09:13:59 +02:00
suter_a 5d10faf63e add FindHDF4.cmake to musrfit since in more modern linux systems it is not available anymore. 2020-05-16 09:10:34 +02:00
suter_a 3d901d3eaa add missing varEdit icons. 2020-05-16 09:10:25 +02:00
suter_a 61b7a699a3 made the PmuppGui class ready for interactive variable handling. 2020-05-16 09:10:12 +02:00
suter_a 4fdc69f0fe fixed a signal emit error. Automatically select the first collection at startup. This way at least one collection is already selected. 2020-05-16 09:09:56 +02:00
suter_a efaef9e36a mupp: worked on the doxygen docu. 2020-05-16 09:09:41 +02:00
suter_a c755dec623 work an interactive variable definition in mupp. Up to checking it is already working. Add variable still missing. 2020-05-16 09:09:23 +02:00
suter_a 51b9126e2b make the version information more coherent. 2020-05-16 09:09:08 +02:00
suter_a 0e4ecac152 remove accidental left-over debug info. 2020-05-16 09:08:52 +02:00
suter_a 69a67628e3 lift the mupp version to 1.0 2020-05-16 09:08:39 +02:00
suter_a 5d70f9f078 add a dark_theme flag to the mupp_startup.xml. This is can help if mupp at runtime cannot decide on the used theme. 2020-05-16 09:08:14 +02:00
suter_a 1bcfa1de80 add empty constructor. 2020-04-30 17:49:45 +02:00
suter_a 34d2e0c9cc add missing files. 2020-04-30 17:49:33 +02:00
suter_a cbbe1d21a7 first full mupp version allowing variables on scripting level, interactively still missing. 2020-04-30 17:49:18 +02:00
suter_a 7276ff4486 add another mupp example. 2020-04-30 17:46:43 +02:00
suter_a 2f48a30d19 more work on var handling. Inject collection variables. 2020-04-30 17:46:33 +02:00
suter_a 61952744be add skeleton for variable handling. 2020-04-30 17:46:20 +02:00
suter_a b6dba8965b update of the copyright info. 2020-04-30 17:46:10 +02:00
suter_a 6b69aa6192 update of the copyright info. 2020-04-30 17:45:59 +02:00
suter_a ebd111b91f improved syntax messages. 2020-04-30 17:45:44 +02:00
suter_a d5a4ecd940 changed to explicit std namespace. 2020-04-28 14:17:36 +02:00
suter_a 25004cbd43 changed to explicit std namespace. 2020-04-28 14:17:27 +02:00
suter_a 0d85ee3e8b allow to remove x/y entries from the command line. 2020-04-28 14:17:14 +02:00
suter_a dbefdc69a4 work on the scripting part of mupp. Preparing for the step of parameter transformation. 2020-04-23 17:13:52 +02:00
suter_a fe537efa6e improved error messages for NeXus file reading. Especially for the case of HDF4/HDF5 <-> NeXus version issues. 2020-04-20 14:26:29 +02:00
suter_a 67848f5724 fixes issue #24 reported on bitbucket. 2020-04-10 11:44:48 +02:00
suter_a e9a903fc11 remove unused variable. 2020-04-10 11:44:28 +02:00
suter_a ad1b11bcb5 allow to plot normalize data in mupp 2020-04-07 17:13:50 +02:00
suter_a 63ca1156c2 little extension which allows to normalize plots. Only dialogs added so far, no functionality yet. 2020-04-07 17:13:30 +02:00
suter_a edad7a4c53 proper cleanup. 2020-02-10 09:16:05 +01:00
suter_a 034cf8933a updated to the new musrfit and doxygen version. 2020-02-10 09:15:42 +01:00
suter_a e5ecabc62e update of the docu including the SECTOR cmd. 2020-02-04 19:56:36 +01:00
suter_a 14c3cd73ed added necessary DKS switches in prepare sector. 2020-02-04 09:37:44 +01:00
suter_a 7d27c18da5 adopted proper name scheme. 2020-02-04 09:36:42 +01:00
suter_a cf45c6f1d5 increment version. 2020-02-04 08:21:12 +01:00
suter_a 3797c73aeb first full implementation of the sector command.
Conflicts resolved:
	src/classes/PFitter.cpp
	src/classes/PFitterFcn.cpp
	src/classes/PRunListCollection.cpp
2020-02-04 08:20:30 +01:00
suter_a 1ea877621f adopted to the SECTOR command in combination with DKS. 2020-02-03 10:25:01 +01:00
suter_a 01ba9f3add fixed merge conflict 2020-02-03 09:15:00 +01:00
suter_a b261554e8f updated docu
Conflicts:
	doc/html/searchindex.js
2020-02-03 09:03:25 +01:00
suter_a 7b5332034c fixed merge conflict. 2020-01-31 07:59:11 +01:00
suter_a 08a317f557 replaced decrepitated OS system check under Qt. The new version works for Qt >= 5.4 which should cover everything still alive. 2019-11-22 18:24:03 +01:00
suter_a b1b71658f6 fixed some minor typos in the docu. 2019-11-11 13:09:19 +01:00
suter_a 9d9fb6b663 slightly improved call-up of mupp from musredit. If cancelling the db-dialog mupp will quit, but only at startup. 2019-11-09 09:56:13 +01:00
suter_a ed3497a647 Added explicitly CMP0075 policy in order to get rid of an unnessary warning. 2019-11-08 20:12:31 +01:00
suter_a d5d6140e42 fixed a bug in the global+ option of msr2data if a global section is present. 2019-11-08 12:29:00 +01:00
suter_a 9ae2cc90a5 also allow to add an offset. 2019-10-24 15:14:44 +02:00
suter_a 65a5e8f247 allow to change the power N for 2^N elements. 2019-10-24 15:14:35 +02:00
suter_a aecc0324b5 Merge commit '9add9f25' into dks6 2019-10-24 08:01:35 +02:00
suter_a 37658e177b currently the function numbers need to be consecutive for the DKS version. This is now enforced. 2019-09-23 20:51:41 +02:00
suter_a f4d6f63607 add tests for the case that maps and/or functions are absent. 2019-09-23 16:23:30 +02:00
suter_a 086050f4e3 fix for the case that a global section is present. 2019-09-23 16:22:16 +02:00
suter_a afef9600b4 fixed time range issue in single histo fit which was caused by a musrfit <-> DKS confusion. Asymmetry fit still has an issue which needs further investigations. 2019-09-21 19:29:51 +02:00
suter_a 9a955de4d6 Merge branch 'root6' into dks6 2019-09-12 11:21:27 +02:00
suter_a 8b416b45e0 merged root6 2019-09-11 12:12:13 +02:00
suter_a 5953786611 properly check the number of t0 parameters in the msr-file. 2019-05-11 13:19:19 +02:00
suter_a 12a3c6c411 some minor ubuntu tweak concerning themes. 2019-05-02 15:09:38 +02:00
suter_a b890dda7ac make sure that the icon theme is properly loaded when the prefs are reloaded. 2019-05-02 14:15:30 +02:00
suter_a 1d9be24be1 More flexible dark scheme handling
It works now as follows:
1) try to get theme information from the system, and if present us it.
2) if no theme information of the system is present, take the one from
   the musredit_startup.xml.

Now it is possible to switch the icon theme for the menu and toolbar
separately.
2019-05-02 14:15:19 +02:00
suter_a 297522d6b1 updated default musredit_startup.xml file info. 2019-05-02 14:15:09 +02:00
suter_a 492bb4b20e more work for dark theme under macOS. 2019-05-02 14:14:57 +02:00
suter_a d9b5e8d737 improved icon scaling. 2019-05-02 14:14:44 +02:00
suter_a ff03f46952 make toolbar icons switchable plain/dark. 2019-05-02 14:14:32 +02:00
suter_a eb0cf12766 Allow switching icon theme in musredit
Added the needed facility in the preferences which allows to switch
the icon scheme between plain and dark. This is needed for some OS
where qt doesn't provide the necessary information.
2019-05-02 14:14:11 +02:00
suter_a 8f5c296e72 added MusrRoot docu. Added 'Proposal Number' and 'Main Proposer' to the RunInfo. 2019-04-26 13:01:32 +02:00
suter_a ed365c016e some minor improvement concerning the start of musrview for cases where the msr-file is corrupted, the data file cannot be read, etc. 2019-04-25 21:03:38 +02:00
suter_a 306e555311 some minor cleanup and update of the copyright info. 2019-04-25 21:03:01 +02:00
suter_a f5344e29f0 added some more specifc error codes. 2019-04-25 21:02:45 +02:00
suter_a 63aa171982 added some additional error tags. 2019-04-25 21:02:31 +02:00
suter_a 9b2a01db2d modernized code to C++11 and newer -- cleanup. 2019-04-24 17:53:18 +02:00
suter_a c64c74dbf8 modernized code to C++11 and newer.
This allows to analyze the code by external code analyzers. Since a lot is adopted,
the version is changed to 1.4.3

Conflicts:
	src/classes/PFitter.cpp
	src/classes/PFourier.cpp
	src/classes/PMsrHandler.cpp
	src/classes/PMusrCanvas.cpp
	src/classes/PRunAsymmetry.cpp
	src/classes/PRunAsymmetryRRF.cpp
	src/classes/PRunListCollection.cpp
	src/classes/PRunSingleHisto.cpp
	src/classes/PRunSingleHistoRRF.cpp
	src/classes/PStartupHandler.cpp
	src/include/PFourier.h
	src/include/PRunListCollection.h
	src/musrFT.cpp
2019-04-24 17:44:58 +02:00
suter_a 1c5069bc48 fix of wrong offset in time domain data before Fourier. 2019-04-11 16:46:13 +02:00
suter_a ac1d52a054 removed outdated 'register' from code. 2019-04-04 16:06:59 +02:00
suter_a 5ab041a4f2 improve msr2data handling
It is now checked if a msr-file is already open so that the corresponding
tab is reloaded after msr2data is carried out with a file open request.
2019-04-01 10:42:27 +02:00
suter_a 5bb47dc9fb Fix crash when trying to close empty tab 2019-04-01 09:09:45 +02:00
suter_a 0ff385de11 added missing include directory. 2019-03-08 16:29:39 +01:00
suter_a 9059821e3c Docu updated
Removed the automake tool chain description (hopefully) everywhere.
2019-03-08 13:54:04 +01:00
suter_a 8dd8d29adc Remove automake support
Since the cmake tool chain is now stable, the automake tool chain is removed from musrfit.
This makes documentation and code less cluttered.

Conflicts:
	configure.ac
	src/Makefile.am
	src/classes/Makefile.am
	src/external/MuSR_software/Makefile.am
2019-03-08 13:53:36 +01:00
suter_a 352ce48899 find theme in case default channel fail. This is ugly and eventually needs a better solution. 2019-02-14 09:41:14 +01:00
suter_a f6ee484baf Dynamic Search Path for ROOT Dictionary
Added by default the dynamic search path '/usr/local/lib' to ROOT.
This is needed to find the necessary dictionaries for musrfit,
musrview, musrt0. Furthermore, added an option '--show-dynamic-path'
to these programs which allow the user to dump the currently used
dynamic search paths. This is potentially handy for diagnostics.
2019-02-05 10:08:15 +01:00
suter_a bc09ff5d8d adopted musredit.pro such that the deprecated automake get things compiled. 2019-01-22 15:01:57 +01:00
suter_a 94950cb755 ifgk and ifll CUDA/OpenCL-GPU accessible. 2019-01-22 14:05:09 +01:00
suter_a fc68aed573 make msr-file comment consistent with the docu (for ifll and ifgk). 2019-01-22 14:04:02 +01:00
suter_a 8014920903 Docu update
Added information about the not yet documented functions for internal fields with Gaussian/Lorentzian broadening.
2019-01-21 14:48:43 +01:00
suter_a 55c298630a update version information. 2019-01-21 14:48:23 +01:00
suter_a 7ace2e7d35 Make so far undocumented functions ifgk and ifll public and at the same time properly normalize them. 2019-01-21 14:48:07 +01:00
suter_a 64fc455831 Add Default Search Paths via musredit preferences if previously no search paths were present
So far it was not possible to add Default Search Paths to musrfit via musredit if somebody delete all the predefined search paths. This bug is now fixed.
2018-12-17 17:38:40 +01:00
suter_a 2c65609f84 AddT0 offset bug
Up to now there has been an addT0 offset bug which resulted to the following situation.
Since the offset was wrong by '1', for the first addt0 the t0 of the file was used
instead of the one given in the msr-file. If these t0's are substantially different, the
adding of the runs was quite off, resulting in strong distortions at very early times.
Pant Amba Datt pointed towards this bug which is fixed now.
2018-12-11 14:12:48 +01:00
suter_a a5748f0359 Fourier relative phase: bug fix
The reference phase for real Fourier was accidentely counted twice.
2018-11-29 11:00:24 +01:00
suter_a 91c33fdbd1 musredit help system if neither QWebEngine nor QWebKit is found.
If neither QWebEngine nor QWebKit is found, do not generate an build
error anymore. Instead just show a default window stating that
the help system is not available due to missing Qt web libs.
2018-11-29 08:50:12 +01:00
suter_a d874bcfeab BNMR lib installation problems
Adopted the build system for the BNMR libs such that the generated files are found and can be installed. The BNMR lib mantainers (ZS, JK) are responsible for the functionality though.
2018-11-27 12:41:39 +01:00
suter_a d2ed54dedf updated docu 2018-11-13 09:20:55 +01:00
suter_a cabb957b8a changed example to reference phase in the Fourier block. 2018-11-13 09:20:37 +01:00
suter_a 1e8b79ec1d set reference phase index in the case of a phase vector 2018-11-13 09:20:14 +01:00
suter_a 0d917564c5 allow to define the phase parameter lists in the Fourier block with a reference phase parameter. This means all the other phase parameters are then relative to this reference phase parameter. This is often used when analysing LEM data. 2018-11-13 09:19:48 +01:00
suter_a 35fd671166 fixed wrong include path in the cmake infrastructure. 2018-11-05 10:11:40 +01:00
suter_a 515bf278d5 make sure that enough relevant digits of the parameters are exported to the db/dat-file. 2018-10-26 14:30:33 +02:00
suter_a f28a0153b4 added missing header. 2018-10-24 11:31:19 +02:00
suter_a 419f0718f3 increased the export precision. This is a quick and dirty fix only. 2018-10-23 16:02:10 +02:00
suter_a 06ae0a12ea fixed start != t0 phase issue 2018-10-18 13:54:05 +02:00
suter_a b9e0812699 update of docu 2018-10-16 08:43:44 +02:00
suter_a 4004e5e9fd added new Fourier phase feature to this example. 2018-10-15 17:08:43 +02:00
suter_a 357d46aac4 allow multiple Fourier phase parameters for phase shifted real Fourier. Autophasing still missing. 2018-10-15 16:12:49 +02:00
suter_a e9e39bb8a6 get rid of cmake warnings in connection with automoc and autouic 2018-10-11 12:48:13 +02:00
nemu 660053c52a make sure that BOOST is found even if installed in any non-standard path.
Conflicts:
	src/CMakeLists.txt
	src/classes/CMakeLists.txt
2018-08-27 15:59:50 +02:00
suter_a 987713c416 update of the docu. Added the beta-NMR docu written by Jonas Krieger. 2018-08-23 13:03:32 +02:00
suter_a db70d474dc added some more necessary paths. 2018-08-17 21:00:00 +02:00
suter_a dc437c9f25 fix of an accidentally carried out wrong cleanup. 2018-08-17 16:16:08 +02:00
JAK 927eb75a90 cmake should now also work on MacOS. 2018-08-17 16:04:11 +02:00
JAK 7dd79560d1 Removed class MLRes from libBNMR. It wasn`t implemented. 2018-08-17 16:04:07 +02:00
JAK a159f573b6 Updated docu in LineProfile.pdf. 2018-08-17 16:01:02 +02:00
JAK 8a7a9b7380 Updated docu in LineProfile.pdf. 2018-08-17 16:01:02 +02:00
JAK d9c4505e8e The line shape width is now the correct FWHM. 2018-08-17 16:01:02 +02:00
suter_a 5aa7bec5d6 Added CMake files for libLineProfile. 2018-08-17 16:01:02 +02:00
JAK 266b18ae33 Added libLineProfile and integrated it into automake. 2018-08-17 16:01:02 +02:00
Jonas A. Krieger 685aca6c9a Speed up of SExpRlx by a factor of ~5 by using static TF1s. Might not be thread save. 2018-08-17 16:00:55 +02:00
Jonas A. Krieger 57931f0487 Cleaned up libBNMR a bit. 2018-08-17 15:57:16 +02:00
suter_a 4cd0ec2e7f README edited online with Bitbucket. Proper link to the new documentation. 2018-07-27 20:45:21 +02:00
suter_a 8e1d3a5b68 README.md edited online with Bitbucket. Proper link to the new documentation. 2018-07-27 20:45:02 +02:00
suter_a 40191f7b44 allow the exponent for the temperature evolution for lambda to be set. If not given, the two fluid exponent 4 will be chosen. 2018-07-11 13:41:36 +02:00
suter_a 412754078c switched from QTextEdit to QPlainTextEdit for efficiency reasons. Furthermore it allows to limit the block size. 2018-07-10 16:24:07 +02:00
suter_a 740d64f6a5 change labels when toggling between scale and absolute value. 2018-07-04 17:05:40 +02:00
suter_a 7f432cc58e adopted the technical docu, according to the new sphinx user docu.
Conflicts:
	doc/musrfit_dox.cfg
2018-07-04 12:48:17 +02:00
suter_a 2b64ddb405 adopted docu install to the new sphinx docu system. 2018-07-04 07:53:45 +02:00
suter_a 1c24cd659d switch the docu system from foswiki to sphinx. 2018-07-03 18:52:00 +02:00
suter_a 7c9b871792 proper MUSR version set. 2018-07-03 11:03:14 +02:00
suter_a 10b23b11bb added recent files to mupp. 2018-07-03 09:37:18 +02:00
suter_a 61b3eafa0b make sure that multiple instances of mupp can run simultaneously. 2018-07-02 18:56:32 +02:00
suter_a 360d4ec7ae a more coherent error message handling. 2018-07-02 15:17:33 +02:00
suter_a c3368baddd adopted to the directory tree. 2018-07-02 15:17:17 +02:00
suter_a ca5cd4138a make sure that all runs have the same number of parameters. 2018-07-02 15:17:00 +02:00
suter_a feae053bbc added MODULE to root_generate_dictionary in order to get the proper name scheme. 2018-06-28 13:26:40 +02:00
suter_a 4f249fdebe cmake: added more hint paths for DKS. 2018-06-14 15:23:20 +02:00
suter_a 206a72075b cmake: on macOS absorb mupp_plot into the mupp.app bundle. 2018-06-12 13:56:08 +02:00
suter_a 3abe2e7e8c cmake: remove HAVE_FORK since it leads to performance issuses with the cuba lib. 2018-06-12 11:26:45 +02:00
suter_a fbd0371fd0 cmake fixed a destination bug on macOS. 2018-06-11 14:52:58 +02:00
suter_a b6b12322be added mupp. Currently only build with cmake. 2018-06-11 11:30:15 +02:00
suter_a cb742d7c30 adopted to macOS. 2018-06-10 15:55:12 +02:00
suter_a 8c6946164c added mupp actions to musredit. 2018-06-10 14:30:21 +02:00
suter_a da4f08f231 cmake: add the forgotten OpenMP flags and libs. 2018-06-10 14:29:59 +02:00
suter_a fbb38028cb cmake: make sure that gcc built-in functions are found. 2018-06-10 14:29:37 +02:00
suter_a afd4bdb792 update docu. 2018-06-08 15:56:24 +02:00
suter_a 86eca8bc86 updated to include cmake. 2018-06-07 11:23:46 +02:00
suter_a 80094c27fa cmake: summary cosmetics 2018-06-07 11:23:12 +02:00
suter_a e16e9f29c2 cmake: added missing include path when generating the dictionary. 2018-06-06 17:43:10 +02:00
suter_a 575c12596b cmake: cuba needs a -fPIC flag explicitly, otherwise it doesn't link with all compilers. 2018-06-06 17:11:52 +02:00
suter_a 5617cf2925 cleaned up signed/unsigned int issues. 2018-06-06 16:24:42 +02:00
suter_a 215faf6e50 cmake: got rid of target_compile_options which are better controlled by the build type. 2018-06-06 13:19:05 +02:00
suter_a db1e4dc570 cmake: got rid of target_compile_options which are better controlled by the build type. 2018-06-06 13:13:24 +02:00
suter_a 1cd25fcd40 cmake: make sure that at least one build type is defined (default: Release) 2018-06-06 13:12:54 +02:00
suter_a 9f880ee67e fixed a bug when compiling with -DNDEBUG 2018-06-06 13:12:23 +02:00
suter_a 2b049f03b9 slight performance increase - missing header file. 2018-06-06 13:11:57 +02:00
suter_a 6da091c96b slight performance increase. 2018-06-06 13:11:31 +02:00
suter_a b0d9111039 Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2018-06-06 07:50:16 +02:00
suter_a 9871f23d7a added DKS environment variable to the process. 2018-06-06 07:49:27 +02:00
suter_a 2e9edb363b Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2018-06-06 07:26:53 +02:00
suter_a d24763f4ad cmake: added optimization and at the same time added the beta-NMR lib. 2018-06-05 20:31:07 +02:00
suter_a 593978711e cmake: replaced debug info by a real one. 2018-06-05 09:50:01 +02:00
suter_a c74644cd57 cmake: added -O2 which gives the performance improvement needed. 2018-06-05 07:52:47 +02:00
suter_a 74c1e63570 fix include statement. 2018-06-04 15:13:56 +02:00
suter_a 122db33efc moved hardware info to the place where it is needed. 2018-06-04 14:30:09 +02:00
suter_a 58148581ba cmake: make sure all DKS related libaries and include paths are properly set. 2018-06-04 11:16:45 +02:00
suter_a b2c8b9b72b added missing header files. 2018-06-04 09:29:16 +02:00
suter_a fda88a69ad cmake: added missing CMakeFiles.txt 2018-06-04 07:49:39 +02:00
suter_a b360129ee3 cmake: added library version information to the targets. 2018-06-02 20:45:04 +02:00
suter_a 610aab1773 cmake: more features implemented. 2018-05-31 18:22:17 +02:00
suter_a aa2cc9ddd2 cmake: more necessary files added. Still a lot of testing needed. 2018-05-31 13:26:36 +02:00
suter_a 923b3c493f cmake: more work on dks6 2018-05-30 19:07:25 +02:00
suter_a 78de97f498 start to add cmake support for dks6 branch. 2018-05-30 16:36:31 +02:00
suter_a a7edb9d232 added a musrfit cmd line flag which allows to check if NeXus support is enabled. 2018-05-02 14:16:57 +02:00
suter_a 7e8d4f98a5 prevents issue with root v6-13-2. 2018-04-04 11:55:44 +02:00
suter_a 14c83dedad (i) when exporting Fourier, and _F is added. (ii) the average flag is now also properly propageted in the batch mode. 2018-03-26 12:52:30 +02:00
suter_a 6944ad1a8b minor fix of shortcut overload conflict. 2018-03-23 12:57:55 +01:00
suter_a 4f55fcb0cf prevent confusion of similar parameter names. 2018-01-23 12:36:35 +01:00
suter_a e8a12653a6 improved the close canvas mechanism (from the global to the object level) 2017-12-01 08:55:10 +01:00
suter_a 115e812d25 for PSI-BIN/MDU: fixed wrong last good bin, and added number of events per histo. 2017-11-23 10:11:49 +01:00
suter_a 61e87fc03b added missing temperature unit. 2017-11-23 09:23:12 +01:00
suter_a 908ad4af86 for PSI-BIN/MDU: dump all temperature available including the std devs. 2017-11-23 09:01:42 +01:00
suter_a 1e2fe799c6 fixed crash when msr2data is invoked and no tab is open. 2017-11-17 16:55:13 +01:00
suter_a bc7ddcfc6d Changed behaviour for the case where LGB > Histo Size. New: LGB = (Histo Size - 1) together with a warning instead of issuing an error. 2017-11-09 10:37:27 +01:00
suter_a 70d1a24534 make msr-file reader more robust against leading spaces. 2017-11-08 11:43:49 +01:00
suter_a 324045f396 make sure that a valid covariance matrix is available after Hesse. 2017-11-02 21:17:49 +01:00
suter_a 784a951540 since my automake structure is now ready for rpmbuild, the version number is increased. 2017-10-26 15:59:19 +02:00
suter_a 2c91ab1046 configure slightly extended to deal with rpmbuild. 2017-10-25 13:14:42 +02:00
suter_a a2d142e73d check if DOCDIR has not already injected from the command line. 2017-10-24 09:06:50 +02:00
suter_a 66fd54b8fa add a dyn LF example. 2017-10-06 08:15:17 +02:00
suter_a bb13025185 fixed an ugly mistake in the opimization of the non-analytic LF integrals. 2017-10-04 17:00:58 +02:00
suter_a 56637bf934 move __swap__.msr file to /Users/suter_a/.musrfit. This makes sure that it can be written even when musredit is started from a readonly destination. 2017-10-02 16:46:10 +02:00
suter_a c5b1573da0 removed some default directories since it potentially leads to problems. 2017-09-06 15:15:56 +02:00
suter_a e6b61ea3fc improved Qt5 checks (Qt5WebKit (old) versus Qt5WebEngine (new)) 2017-09-06 09:11:25 +02:00
suter_a b027db1bc9 improved run-path handling in case DKS is not enabled. 2017-08-30 15:50:14 +02:00
suter_a 2cb68a3495 deal with run-time-path for macOS. 2017-08-30 15:45:12 +02:00
suter_a 8f86af959c version 1.0.0 -> 1.1.0 2017-08-24 08:31:32 +02:00
suter_a 05fb2375e0 updated docu including DKS support and up-to-date macOS fink/macport setting up description. 2017-08-24 08:25:39 +02:00
suter_a f1b36a83cf re-enabled some variable settings needed for linux OpenCL. 2017-08-21 15:15:38 +02:00
suter_a de6275b5cf added DKS to the process variable. This makes sure that the DKS lib is always found. 2017-08-21 14:32:41 +02:00
suter_a 08d67afb78 prevent double free. 2017-08-21 14:31:16 +02:00
suter_a 25c7894fe0 fine tuning for OpenCL fallback. 2017-08-21 14:28:12 +02:00
suter_a 49db148c37 added proper destructor. 2017-08-18 07:58:25 +02:00
suter_a b62d315d1f fixed a wrong variable initializer. 2017-08-17 13:55:13 +02:00
suter_a c49edda58e proper minimal ROOT version number check. 2017-08-17 13:36:03 +02:00
suter_a 40337b00ad a first version which handles AMD cards as well. 2017-08-17 13:30:27 +02:00
suter_a 2d4697c750 fixes a bug in the GPU memory allocation. 2017-08-17 13:29:25 +02:00
suter_a d397bf0064 fixed an issue with the month (0/1-problem). 2017-06-09 07:52:24 +02:00
suter_a 26d78cf482 proper handling for DKS/GPU Fourier transform. 2017-05-31 16:21:53 +02:00
suter_a 4a1b985506 added the missing DKS Fourier support flag. 2017-05-31 08:51:19 +02:00
suter_a bce9326f06 fix logy problem. 2017-05-29 18:02:31 +02:00
suter_a 2b7a391bbb back-integrate DKS Fourier after DKS upgrade and modularization. Not yet tested other than compilation. 2017-05-29 17:54:57 +02:00
suter_a c2e362d406 added boost_system lib. 2017-05-29 17:52:49 +02:00
suter_a 1729055385 merged from root6. Compiles but has issues with DKS linking yet. 2017-05-15 21:30:42 +02:00
suter_a 13106a51c7 added root6 features to dks6 2017-02-21 14:47:33 +01:00
suter_a 6cae76f1c1 fixed a little annoying bug in the LF none-analytic integral estimate. 2017-02-21 11:39:22 +01:00
suter_a 3237b1f898 add forgotten header-file and include path
Conflicts:
	src/musredit_qt5/musredit.pro
2017-02-09 15:38:07 +01:00
suter_a 2bf8648d35 Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2017-02-08 12:36:35 +01:00
suter_a c5ac242e71 add git revision to the musredit about dialog. 2017-02-08 12:35:03 +01:00
suter_a e8f692b42c more changes towards musrfit/DKS/root6. 2017-02-08 11:16:27 +01:00
suter_a 18d037fdf2 adopted dks to root6 (branch dks6). Not yet tested. 2017-02-07 16:12:49 +01:00
suter_a 38c4293d58 resolved merge conflicts with master 2016-12-23 14:16:22 +01:00
suter_a 605502386c Merge branch 'master' into dks 2016-11-08 10:02:33 +01:00
suter_a 6aea6473ab merge dks to master 2016-08-25 08:40:40 +02:00
suter_a 8f20d2fd4c musredit: run lists are now properly loaded if containing nS-nE elements. 2016-08-02 13:52:41 +02:00
suter_a ac30fd956b merged branch 'master' into 'dks' 2016-04-28 13:42:24 +02:00
suter_a ec27baf3a4 added c/const to the GPU ready functions. 2016-04-27 08:37:15 +02:00
suter_a bc881f0c75 moved CPU/GPU information collection from PFitter to musrfit. 2016-04-27 08:11:30 +02:00
suter_a da2f0a1049 (i) added mu minus. (ii) single histo is now fed with a proper error vector which covers all allowed background options. 2016-04-25 12:20:24 +02:00
suter_a 319fb45f97 made startTimeBin and endTimeBin class variables. 2016-04-25 12:18:27 +02:00
suter_a 71fbce110b added the function string mmsetf for DKS. 2016-04-25 12:16:56 +02:00
suter_a 4dc36ffbae changed name of a function for a more precise self description. Added function to collect to mu minus parameters. 2016-04-25 12:15:36 +02:00
suter_a be9498f37d added muon minus specific function: muMinusExpTF/mmsetf 2016-04-25 12:05:42 +02:00
suter_a bdd8c16650 added fit type selector for DKS 2016-04-18 17:26:47 +02:00
suter_a aedacbcd34 added DKS asymmetry fit support 2016-04-15 16:47:40 +02:00
suter_a 27eb664686 added missing DKS selector in GetPhaseOptRealFourier 2016-04-14 16:33:19 +02:00
suter_a f95a4c9078 added all the muSR specific analytic formulae 2016-04-14 14:53:55 +02:00
suter_a 7dc9158a09 Merge branch 'master' into dks 2016-04-11 12:23:31 +02:00
suter_a 1e0e19180f fixed error in sleep ms->s. Clean up left over debug information. 2016-04-11 12:21:47 +02:00
suter_a 2a041d4878 removed debug information. Added CPU/GPU information to the MINUIT2.OUTPUT file. 2016-04-07 13:06:02 +02:00
suter_a 6fa7bb5764 first DKS running version. Still a lot of testing needed. Currently only single histogram fitting with a limited number of functions is supported to run on the GPU. 2016-04-06 17:22:58 +02:00
suter_a a29b790e04 some more work towards DKS/GPU integration 2016-04-01 17:44:49 +02:00
suter_a ae77181f42 add memory handling for DKS/GPU. No fitting possible, yet. 2016-03-31 16:41:46 +02:00
suter_a 5fb2ce777e some more work towards DKS/GPU support of musrfit 2016-03-10 15:52:48 +01:00
suter_a 7b292980e5 added the class PFitterFcnDKS which eventually will handle the DKS/GPU binding. Currently it is without real functionality 2016-03-09 16:28:32 +01:00
suter_a d9782c55c8 added a theory translator for DKS 2016-03-08 16:23:18 +01:00
suter_a d9a35a25bb improved CUDA/DKS checks 2016-03-07 16:41:07 +01:00
suter_a b157d01506 merge into master 2016-03-04 13:23:12 +01:00
suter_a 18564964fa calculate mean starting from fStartTime, if fStartTime > 0. 2015-04-17 10:29:20 +02:00
suter_a 6ac3cdd798 corrected size for noOfFourierBins, and made switching between FFTW and DKS more coherent 2015-04-14 16:49:33 +02:00
suter_a a2601348cf first working FFT including DKS. 2015-04-13 17:21:27 +02:00
suter_a a393cb9ec5 fixed wrong Fourier vector size for DKS. 2015-04-08 17:24:24 +02:00
suter_a 75578f1977 first work to add GPU support via DKS for Fourier. 2015-04-07 16:46:20 +02:00
135 changed files with 6143 additions and 11769 deletions
-45
View File
@@ -1,45 +0,0 @@
name: Build and Deploy Documentation
on:
push:
branches:
- root6
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: gitea.psi.ch/images/alpine-jupyterbook
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system dependencies
run: |
apk add doxygen graphviz
- name: Build musrfit-tech-docu
run: |
cd doc
mkdir technical
doxygen musrfit_dox.cfg
doxygen musredit_qt6_dox.cfg
doxygen mupp_qt6_dox.cfg
doxygen musrStep_qt6_dox.cfg
doxygen musrWiz_qt6_dox.cfg
- name: Configure Git
run: |
git config --global user.name "Gitea Actions"
git config --global user.email "actions@gitea.local"
- name: Push to gitea-pages branch
run: |
git checkout --orphan gitea-pages
git reset --hard
cp -r ./doc/technical/html/* .
git add .
git commit -m "Deploy site"
git push --verbose -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
+56 -3
View File
@@ -1,4 +1,4 @@
# - musrfit
# - musrfit --- DKS -----------------------------------------------------------
cmake_minimum_required(VERSION 3.17)
# cmake: use BoostConfig.cmake instead of FindBoost
@@ -6,7 +6,7 @@ if (CMAKE_VERSION GREATER_EQUAL "3.3")
cmake_policy(SET CMP0167 NEW)
endif ()
project(musrfit VERSION 1.10.0 LANGUAGES C CXX)
project(musrfit VERSION 1.11.0 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -16,6 +16,7 @@ set(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Object code libraries")
include(GNUInstallDirs)
#--- musrfit specific options -------------------------------------------------
option(dks "build musrfit with DKS (GPU/MIC) support" ON)
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
option(ASlibs "build optional ASlibs" OFF)
option(BMWlibs "build optional BMWlibs" OFF)
@@ -83,7 +84,7 @@ find_package(PkgConfig REQUIRED)
find_package(Git REQUIRED)
#--- check for ROOT -----------------------------------------------------------
find_package(ROOT 6.18 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
find_package(ROOT 6.16 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
if (ROOT_mathmore_FOUND)
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
include(${ROOT_USE_FILE})
@@ -127,6 +128,42 @@ if (try_OpenMP)
endif (OpenMP_CXX_FOUND)
endif (try_OpenMP)
#--- check for CUDA and/or OpenCL followed by DKS -----------------------------
if (dks)
find_package(CUDA)
if (CUDA_FOUND)
message (STATUS "CUDA include: ${CUDA_INCLUDE_DIRS}")
message (STATUS "CUDA libs: ${CUDA_TOOLKIT_ROOT_DIR}/lib64")
message (STATUS "CUDA version: ${CUDA_VERSION}")
add_definitions(${DKS_CMAKE_CXX_FLAGS})
endif (CUDA_FOUND)
if (NOT CUDA_FOUND)
message(STATUS "CUDA not found, looking for OpenCL")
find_package(OpenCL)
if (OpenCL_FOUND)
message(STATUS "OpenCL version : ${OpenCL_VERSION_STRING}")
message(STATUS "OpenCL include dir: ${OpenCL_INCLUDE_DIR}")
message(STATUS "OpenCL library dir: ${OpenCL_LIBRARY}")
add_definitions(-DDKS_OPENCL)
endif (OpenCL_FOUND)
endif (NOT CUDA_FOUND)
if (NOT CUDA_FOUND AND NOT OpenCL_FOUND)
message(WARNING ">> Neither CUDA nor OpenCL found which are required for DKS, hence disable DKS support <<")
else (NOT CUDA_FOUND AND NOT OpenCL_FOUND)
find_package(DKS "1.2.0"
HINTS "/usr/local/lib/"
)
endif (NOT CUDA_FOUND AND NOT OpenCL_FOUND)
endif (dks)
if (DKS_FOUND)
message(STATUS "DKS version : ${DKS_VERSION}")
message(STATUS "DKS include dir : ${DKS_INCLUDE_DIR}")
message(STATUS "DKS library : ${DKS_LIBRARY}")
endif (DKS_FOUND)
#--- check for Qt -------------------------------------------------------------
if (qt_based_tools)
# check for any Qt, i.e. AUTO
@@ -333,6 +370,7 @@ message(" GSL found in ${GSL_INCLUDE_DIRS}, Version: ${GSL_VERSION}")
message(" BOOST found in ${Boost_INCLUDE_DIRS}, Version: ${Boost_VERSION}")
message(" LibXML2 found in ${LIBXML2_INCLUDE_DIR}, Version: ${LIBXML2_VERSION_STRING}")
message(" ROOT found in ${ROOT_INCLUDE_DIRS}, Version: ${ROOT_VERSION}")
if (OpenMP_FOUND)
if (OpenMP_CXX_VERSION)
message(" OpenMP found Version: ${OpenMP_CXX_VERSION}")
@@ -340,6 +378,21 @@ if (OpenMP_FOUND)
message(" OpenMP found")
endif (OpenMP_CXX_VERSION)
endif (OpenMP_FOUND)
message("")
if (CUDA_FOUND)
message(" CUDA found in ${CUDA_INCLUDE_DIRECTORIES} (Version: ${CUDA_VERSION})")
endif (CUDA_FOUND)
if (OpenCL_FOUND)
message(" OpenCL found in ${OpenCL_INCLUDE_DIR} (Version: ${OpenCL_VERSION_STRING})")
endif (OpenCL_FOUND)
if (DKS_FOUND)
message(" DKS found in ${DKS_INCLUDE_DIR} (Version: ${DKS_VERSION})")
endif (DKS_FOUND)
if (NOT CUDA_FOUND AND NOT OpenCL_FOUND AND NOT DKS_FOUND)
message(" **WARNING** configured without DKS support! DKS, CUDA, OpenCL not found?")
endif (NOT CUDA_FOUND AND NOT OpenCL_FOUND AND NOT DKS_FOUND)
if (nexus)
message("")
+9
View File
@@ -12,6 +12,13 @@ or
https://bitbucket.org/muonspin/musrfit
Release of V1.11.0, 2026/05/28
==============================
add to the mupp/Qt6 version the option to handle variables not only via the
Spirit/X3 interface, but also via Python3. It requires that ROOT is compiled
with Python support. For details see the musrfit-manual section mupp.
Release of V1.10.0, 2026/02/21
==============================
@@ -243,6 +250,7 @@ NEW 2016-04-28 msr2data gets a new option: paramList which allows to
extract a subset of all the parameters of a collection
of msr-files.
NEW 2016-04-22 Added the theory function muMinusExpTF for mu minus fits
NEW 2016-03-08 added a theory translator for DKS
NEW 2016-02-23 It is now possible to export the averaged data/Fourier
CHANGED 2016-12-18 updated the docu.
CHANGED 2016-12-18 a couple of little improvements in musredit.
@@ -250,6 +258,7 @@ CHANGED 2016-08-10 drop NeXus support for Version < 4.4
CHANGED 2016-04-26 start-/endTimeBin are now class members. This reduces
the number of recalculations.
FIXED 2016-08-02 run lists are now properly loaded if containing nS-nE elements.
FIXED 2016-04-14 added missing DKS selector in GetPhaseOptRealFourier.
changes since 0.16.0
===================================
+97
View File
@@ -0,0 +1,97 @@
## Process this file with cmake
#=============================================================================
# NeXus - Neutron & X-ray Common Data Format
#
# CMakeLists for building the NeXus library and applications.
#
# Copyright (C) 2011 Stephen Rankin
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
# for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# For further information, see <http://www.nexusformat.org>
#
#
#=============================================================================
#------------------------------------------------------------------------------
# find the runtime binaries of the HDF4 library
#------------------------------------------------------------------------------
find_library(HDF4_DF_LIBRARY NAMES df hdf
HINTS ENV HDF4_ROOT
PATH_SUFFIXES hdf)
if(HDF4_DF_LIBRARY MATCHES HDF4_DF_LIBRARY-NOTFOUND)
message(FATAL_ERROR "Could not find HDF4 DF library!")
else()
get_filename_component(HDF4_LIBRARY_DIRS ${HDF4_DF_LIBRARY} PATH)
message(STATUS "Found HDF4 DF library: ${HDF4_DF_LIBRARY}")
message(STATUS "HDF4 libary path: ${HDF4_LIBRARY_DIRS}")
endif()
find_library(HDF4_MFHDF_LIBRARY NAMES mfhdf
HINTS ENV HDF4_ROOT
PATH_SUFFIXES hdf)
if(HDF4_MFHDF_LIBRARY MATCHES HDF4_MFHDF_LIBRARY-NOTFOUND)
message(FATAL_ERROR "Could not find HDF5 MFHDF library!")
else()
message(STATUS "Found HDF4 MFHDF library: ${HDF4_MFHDF_LIBRARY}")
endif()
#------------------------------------------------------------------------------
# find the HDF4 header file
#------------------------------------------------------------------------------
find_path(HDF4_INCLUDE_DIRS mfhdf.h
HINTS ENV HDF4_ROOT
PATH_SUFFIXES hdf)
if(HDF4_INCLUDE_DIRS MATCHES HDF4_INCLUDE_DIRS-NOTFOUND)
message(FATAL_ERROR "Could not find HDF4 header files")
else()
message(STATUS "Found HDF4 header files in: ${HDF4_INCLUDE_DIRS}")
endif()
#------------------------------------------------------------------------------
# search for additional packages required to link against HDF4
#------------------------------------------------------------------------------
find_package(JPEG REQUIRED)
#------------------------------------------------------------------------------
# add libraries to the link list for NAPI
#------------------------------------------------------------------------------
get_filename_component(LIB_EXT ${HDF4_DF_LIBRARY} EXT)
if(LIB_EXT MATCHES .a)
message(STATUS "HDF4 DF library is static")
list(APPEND NAPI_LINK_LIBS "-Wl,-whole-archive" ${HDF4_DF_LIBRARY} "-Wl,-no-whole-archive")
else()
list(APPEND NAPI_LINK_LIBS ${HDF4_DF_LIBRARY})
endif()
get_filename_component(LIB_EXT ${HDF4_MFHDF_LIBRARY} EXT)
if(LIB_EXT MATCHES .a)
message(STATUS "HDF4 MFHDF library is static")
list(APPEND NAPI_LINK_LIBS "-Wl,-whole-archive" ${HDF4_MFHDF_LIBRARY} "-Wl,-no-whole-archive")
else()
list(APPEND NAPI_LINK_LIBS ${HDF4_MFHDF_LIBRARY})
endif()
list(APPEND NAPI_LINK_LIBS jpeg)
include_directories ( SYSTEM ${HDF4_INCLUDE_DIRS} )
link_directories(${HDF4_LIBRARY_DIRS})
+34
View File
@@ -0,0 +1,34 @@
# - find MXML
# find the MXML lib and includes
# This module defines
# LIBMXML_INCLUDE_DIR, where to find mxml.h
# LIBMXML_LIBRARY, library to link against
# LIBMXML_FOUND, if false, do not try to use the MXML lib
find_path(LIBMXML_INCLUDE_DIR mxml.h
HINT "/usr/include"
)
# find position of mxml.h from the end
string(FIND "${LIBMXML_INCLUDE_DIR}" "/mxml.h" pos REVERSE)
# truncate the string
string(SUBSTRING "${LIBMXML_INCLUDE_DIR}" 0 ${pos} substr)
set(LIBMXML_INCLUDE_DIR ${substr})
unset(substr)
find_library(LIBMXML_LIBRARY mxml)
# get version string
# currently do not know from where to get it automatically
# handle the QUIETLY and REQUIRED arguments and set LIBMXML_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MXML
REQUIRED_VARS LIBMXML_LIBRARY LIBMXML_INCLUDE_DIR)
if (NOT LIBMXML_FOUND)
unset(LIBMXML_LIBRARY)
endif()
mark_as_advanced(LIBMXML_INCLUDE_DIR LIBMXML_LIBRARY)
+45
View File
@@ -0,0 +1,45 @@
# - Find NeXus library
# Find the native NEXUS includes and library
# This module defines
# NEXUS_INCLUDE_DIR, where to find NeXus.h, etc.
# NEXUS_LIBRARY, library to link against to use NEXUS
# NEXUS_FOUND, if false, do not try to use NEXUS.
find_path(NEXUS_INCLUDE_DIR napi.h
HINTS "/usr/local/include" "/opt/nexus/include" "/usr/local/include/nexus"
)
# find position of napi.h from the end
string(FIND "${NEXUS_INCLUDE_DIR}" "/napi.h" pos REVERSE)
# truncate the string
string(SUBSTRING "${NEXUS_INCLUDE_DIR}" 0 ${pos} substr)
set(NEXUS_INCLUDE_DIR ${substr})
unset(substr)
find_library(NEXUS_LIBRARY NeXus
HINTS "/usr/lib" "/usr/lib64" "/usr/local/lib" "/usr/local/lib64" "/opt/nexus/lib")
# get version string
if (NEXUS_INCLUDE_DIR AND EXISTS ${NEXUS_INCLUDE_DIR}/napi.h)
file(STRINGS "${NEXUS_INCLUDE_DIR}/napi.h" NEXUS_version_str
REGEX "^#define[\t ]+NEXUS_VERSION[\t ].*")
string(REGEX REPLACE "^#define[\t ]+NEXUS_VERSION[\t ]+\"([^\"]*).*"
"\\1" NEXUS_VERSION_STRING "${NEXUS_version_str}")
unset(NEXUS_version_str)
endif()
# handle the QUIETLY and REQUIRED arguments and set NEXUS_FOUND to TRUE if
# all listed variables are TRUE
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NEXUS
REQUIRED_VARS NEXUS_LIBRARY NEXUS_INCLUDE_DIR
VERSION_VAR NEXUS_VERSION_STRING)
if (NOT NEXUS_FOUND)
unset(NEXUS_LIBRARY)
endif()
mark_as_advanced(NEXUS_INCLUDE_DIR NEXUS_LIBRARY)
@@ -11,7 +11,7 @@ FITPARAMETER
###############################################################
THEORY
asymmetry 1
userFcn libGapIntegrals TGapDWave 2 3 4 5
userFcn libGapIntegrals TGapPointPWave 2 3
###############################################################
RUN data/libGapIntegrals-test PIM3 PSI ASCII (name beamline institute data-file-format)
@@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>
@@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>
@@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>Si10_2.0_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>
@@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiO2_70nm2.0_30nm2.2_SiC_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>
+2 -2
View File
@@ -4,7 +4,7 @@
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -12,4 +12,4 @@
#pragma link C++ class PUserFcn+;
#endif //__CINT__
#endif //__CLING__
+1 -1
View File
@@ -48,5 +48,5 @@ runs 1
range 0 8 0 0.25
###############################################################
STATISTIC --- 2017-02-08 07:07:39
STATISTIC --- 2026-01-21 12:33:58
chisq = 134.0, NDF = 99, chisq/NDF = 1.353150
+90 -87
View File
@@ -2,106 +2,106 @@ MnSi, FLC68.2, 50 K
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Rate_1 1.6687 0.0086 none
2 Field_1 73089.883 0.090 none
3 Rate_2 1.968 0.032 none
4 Field_2 72289.02 0.24 none
1 Rate_1 1.6686 -0.0085 0.0086
2 Field_1 73089.887 -0.090 0.090
3 Rate_2 1.967 -0.032 0.032
4 Field_2 72289.02 -0.24 0.24
5 Asym_1 0.2949 0.0030 none
6 Frc_1 0.7316 0.0059 none
7 Phase_1 55.61 0.52 none
8 N0_1 940.35 0.54 none
9 Bkg_1 1.523 0.064 none
5 Asym_1 0.2949 -0.0030 0.0030
6 Frc_1 0.7316 -0.0058 0.0059
7 Phase_1 55.61 -0.52 0.52
8 N0_1 940.36 -0.54 0.54
9 Bkg_1 1.524 -0.064 0.064
10 Asym_2 0.2960 0.0030 none
11 Frc_2 0.7475 0.0059 none
12 Phase_2 30.77 0.50 none
13 N0_2 961.49 0.55 none
14 Bkg_2 1.928 0.065 none
10 Asym_2 0.2960 -0.0030 0.0030
11 Frc_2 0.7475 -0.0058 0.0059
12 Phase_2 30.77 -0.50 0.50
13 N0_2 961.50 -0.55 0.55
14 Bkg_2 1.929 -0.065 0.065
15 Asym_3 0.3002 0.0029 none
16 Frc_3 0.7462 0.0056 none
17 Phase_3 18.03 0.48 none
18 N0_3 1024.28 0.57 none
19 Bkg_3 1.919 0.067 none
15 Asym_3 0.3002 -0.0029 0.0029
16 Frc_3 0.7462 -0.0056 0.0057
17 Phase_3 18.03 -0.48 0.48
18 N0_3 1024.29 -0.57 0.57
19 Bkg_3 1.920 -0.067 0.067
20 Asym_4 0.3088 0.0029 none
21 Frc_4 0.7333 0.0054 none
22 Phase_4 336.94 0.47 none
23 N0_4 1029.36 0.57 none
24 Bkg_4 1.863 0.067 none
20 Asym_4 0.3088 -0.0029 0.0029
21 Frc_4 0.7333 -0.0053 0.0054
22 Phase_4 336.94 -0.48 0.47
23 N0_4 1029.37 -0.57 0.57
24 Bkg_4 1.865 -0.067 0.067
25 Asym_5 0.3094 0.0029 none
26 Frc_5 0.7416 0.0055 none
27 Phase_5 280.32 0.48 none
28 N0_5 1002.69 0.56 none
29 Bkg_5 1.979 0.067 none
25 Asym_5 0.3094 -0.0029 0.0029
26 Frc_5 0.7416 -0.0054 0.0055
27 Phase_5 280.33 -0.48 0.48
28 N0_5 1002.70 -0.56 0.56
29 Bkg_5 1.981 -0.067 0.067
30 Asym_6 0.3153 0.0032 none
31 Frc_6 0.7403 0.0058 none
32 Phase_6 211.07 0.51 none
33 N0_6 853.43 0.52 none
34 Bkg_6 1.656 0.061 none
30 Asym_6 0.3153 -0.0032 0.0032
31 Frc_6 0.7403 -0.0057 0.0058
32 Phase_6 211.07 -0.51 0.51
33 N0_6 853.44 -0.52 0.52
34 Bkg_6 1.658 -0.061 0.061
35 Asym_7 0.3118 0.0032 none
36 Frc_7 0.7378 0.0059 none
37 Phase_7 161.74 0.51 none
38 N0_7 858.76 0.52 none
39 Bkg_7 1.594 0.061 none
35 Asym_7 0.3118 -0.0032 0.0032
36 Frc_7 0.7377 -0.0058 0.0059
37 Phase_7 161.75 -0.51 0.51
38 N0_7 858.77 -0.52 0.52
39 Bkg_7 1.595 -0.061 0.062
40 Asym_8 0.2985 0.0031 none
41 Frc_8 0.7373 0.0061 none
42 Phase_8 133.69 0.53 none
43 N0_8 871.20 0.52 none
44 Bkg_8 1.746 0.062 none
40 Asym_8 0.2985 -0.0031 0.0031
41 Frc_8 0.7373 -0.0060 0.0061
42 Phase_8 133.70 -0.53 0.53
43 N0_8 871.20 -0.52 0.52
44 Bkg_8 1.748 -0.062 0.062
45 Asym_9 0.2874 0.0027 none
46 Frc_9 0.7340 0.0054 none
47 Phase_9 158.63 0.47 none
48 N0_9 1184.29 0.61 none
49 Bkg_9 2.542 0.073 none
45 Asym_9 0.2874 -0.0027 0.0027
46 Frc_9 0.7340 -0.0054 0.0055
47 Phase_9 158.63 -0.47 0.47
48 N0_9 1184.30 -0.61 0.61
49 Bkg_9 2.544 -0.073 0.073
50 Asym_10 0.2846 0.0027 none
51 Frc_10 0.7453 0.0055 none
52 Phase_10 128.05 0.47 none
53 N0_10 1193.66 0.61 none
54 Bkg_10 2.394 0.073 none
50 Asym_10 0.2845 -0.0027 0.0027
51 Frc_10 0.7452 -0.0055 0.0055
52 Phase_10 128.05 -0.47 0.47
53 N0_10 1193.67 -0.61 0.61
54 Bkg_10 2.396 -0.073 0.073
55 Asym_11 0.2877 0.0026 none
56 Frc_11 0.7463 0.0053 none
57 Phase_11 102.43 0.45 none
58 N0_11 1280.00 0.63 none
59 Bkg_11 2.730 0.075 none
55 Asym_11 0.2877 -0.0026 0.0026
56 Frc_11 0.7462 -0.0052 0.0053
57 Phase_11 102.42 -0.45 0.45
58 N0_11 1280.01 -0.63 0.63
59 Bkg_11 2.732 -0.075 0.075
60 Asym_12 0.2919 0.0025 none
61 Frc_12 0.7405 0.0050 none
62 Phase_12 42.97 0.43 none
63 N0_12 1383.96 0.66 none
64 Bkg_12 2.807 0.078 none
60 Asym_12 0.2919 -0.0025 0.0025
61 Frc_12 0.7405 -0.0050 0.0050
62 Phase_12 42.97 -0.43 0.43
63 N0_12 1383.97 -0.66 0.66
64 Bkg_12 2.809 -0.078 0.078
65 Asym_13 0.2903 0.0025 none
66 Frc_13 0.7494 0.0050 none
67 Phase_13 350.74 0.43 none
68 N0_13 1393.01 0.66 none
69 Bkg_13 2.738 0.078 none
65 Asym_13 0.2903 -0.0025 0.0025
66 Frc_13 0.7493 -0.0050 0.0050
67 Phase_13 350.74 -0.43 0.43
68 N0_13 1393.02 -0.66 0.66
69 Bkg_13 2.740 -0.078 0.079
70 Asym_14 0.2968 0.0025 none
71 Frc_14 0.7327 0.0049 none
72 Phase_14 288.56 0.43 none
73 N0_14 1374.46 0.66 none
74 Bkg_14 2.768 0.078 none
70 Asym_14 0.2968 -0.0025 0.0025
71 Frc_14 0.7327 -0.0049 0.0050
72 Phase_14 288.57 -0.43 0.43
73 N0_14 1374.47 -0.66 0.66
74 Bkg_14 2.771 -0.078 0.078
75 Asym_15 0.2799 0.0025 none
76 Frc_15 0.7427 0.0052 none
77 Phase_15 282.56 0.45 none
78 N0_15 1365.97 0.65 none
79 Bkg_15 2.809 0.078 none
75 Asym_15 0.2799 -0.0025 0.0025
76 Frc_15 0.7427 -0.0052 0.0053
77 Phase_15 282.56 -0.45 0.45
78 N0_15 1365.99 -0.66 0.65
79 Bkg_15 2.811 -0.078 0.078
80 Asym_16 0.2771 0.0026 none
81 Frc_16 0.7344 0.0055 none
82 Phase_16 212.46 0.48 none
83 N0_16 1256.94 0.63 none
84 Bkg_16 2.458 0.074 none
80 Asym_16 0.2771 -0.0026 0.0026
81 Frc_16 0.7344 -0.0054 0.0055
82 Phase_16 212.46 -0.48 0.48
83 N0_16 1256.95 -0.63 0.63
84 Bkg_16 2.460 -0.074 0.075
###############################################################
THEORY
@@ -257,9 +257,12 @@ t0 20039.0
###############################################################
COMMANDS
#OpenCL-GPU
CUDA
MAX_LIKELIHOOD
PRINT_LEVEL 2
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
@@ -278,5 +281,5 @@ phase par(7, 5, 16)
range 7.1 7.5
###############################################################
STATISTIC --- 2018-10-15 15:55:36
maxLH = 1286508.7, NDF = 1246064, maxLH/NDF = 1.032458
STATISTIC --- 2026-01-19 16:46:24
maxLH = 1286509.8, NDF = 1246064, maxLH/NDF = 1.032459
+7 -7
View File
@@ -2,20 +2,20 @@ LSCO x=0.02 (224-227), T=12.00 (K), E=5.57 keV, WEW B=~49(G)/8.62(A), Tr=15.02 (
###############################################################
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 AsymT 0.05053 -0.00071 0.00072 0 0.33
1 AsymT 0.05052 -0.00071 0.00072 0 0.33
2 Field 48.298 -0.094 0.095
3 RateT 0.129 -0.010 0.010 0 none
4 AsymL 0 0 none 0 0.33
5 RateL 0 0 none
6 AlphaLR 0.9784 -0.0013 0.0013
7 PhaseL 6.6 -1.6 1.6 -40 40
8 BkgL 6.920 -0.048 0.048
8 BkgL 6.921 -0.048 0.048
9 RelPhaseR 178.8 -1.9 1.9 150 210
10 NormR 419.46 -0.40 0.40
10 NormR 419.47 -0.40 0.40
11 BkgR 8.393 -0.050 0.050
12 AlphaTB 1.1025 -0.0015 0.0015
13 RelPhaseT 269.1 -1.9 1.9 240 300
14 BkgT 7.466 -0.049 0.049
14 BkgT 7.467 -0.049 0.050
15 NormB 393.08 -0.39 0.39
16 RelPhaseB 90.7 -2.0 2.0 60 120
17 BkgB 7.092 -0.048 0.048
@@ -36,7 +36,7 @@ FUNCTIONS
fun1 = par7 + map1
fun2 = par2 * gamma_mu
fun3 = map2 * map3
fun4 = par4 * cos(pi / 180.0 * (par7 + map1))
fun4 = par4 * cos(pi / 180 * (par7 + map1))
###############################################################
GLOBAL
@@ -96,5 +96,5 @@ range 0 9 -0.15 0.15
view_packing 500
###############################################################
STATISTIC --- 2018-11-13 07:58:56
maxLH = 3971.7, NDF = 4001, maxLH/NDF = 0.992668
STATISTIC --- 2026-02-13 14:07:06
maxLH = 3971.7, NDF = 4001, maxLH/NDF = 0.992678
+5 -3
View File
@@ -4,7 +4,7 @@ FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 phaseL 0 0 none
2 field 20.3381 -0.0085 0.0085 0 none
3 asym 0.23440 -0.00051 0.00051 0 0.3
3 asym 0.23440 -0.00051 0.00052 0 0.3
4 rate 0.0234 -0.0041 0.0035 0 100
5 Norm_L 1151.30 -0.53 0.53
6 BG_L 0 0 none 0 none
@@ -38,7 +38,6 @@ norm 5
backgr.fit 6
map 1 0 0 0 0 0 0 0 0 0
forward 1-48
#deadtime-cor file
RUN data/emu00139040 XXXX ISIS NEXUS (name beamline institute data-file-format)
norm 7
@@ -70,5 +69,8 @@ range 0 20 -0.35 0.35
view_packing 10
###############################################################
STATISTIC --- 2026-02-23 13:09:55
STATISTIC --- 2026-03-02 13:44:22
maxLH = 4228.9, NDF = 3726, maxLH/NDF = 1.134977
expected maxLH = 4211.4, NDF = 3726, expected maxLH/NDF = 1.130285
run block 1: (NDF/red.maxLH/red.maxLH_e) = (1862/1.170949/1.182735)
run block 2: (NDF/red.maxLH/red.maxLH_e) = (1861/1.100817/1.079629)
+7 -6
View File
@@ -8,9 +8,9 @@ FITPARAMETER
4 Phase_L 178.95 -0.41 0.41
5 Phase_R 1.75 -0.39 0.39
6 N0_L 1097.9 -1.0 1.0
7 N0_R 1159.7 -1.0 1.0
7 N0_R 1159.8 -1.0 1.0
8 Bkg_L 54.47 -0.20 0.20
9 Bkg_R 46.70 -0.19 0.19
9 Bkg_R 46.71 -0.19 0.19
###############################################################
THEORY
@@ -47,6 +47,7 @@ t0 202.0
###############################################################
COMMANDS
CUDA
SCALE_N0_BKG TRUE
MINIMIZE
MINOS
@@ -63,11 +64,11 @@ FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 12
apodization NONE # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
phase 8.5
#range_for_phase_correction 50.0 70.0
range 0.0 200.0
range 0 200
###############################################################
STATISTIC --- 2015-01-05 14:09:47
chisq = 663.9, NDF = 515, chisq/NDF = 1.289169
STATISTIC --- 2024-06-07 15:33:49
chisq = 663.9, NDF = 515, chisq/NDF = 1.289084
+2 -2
View File
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a49a5e0b750ed752f738f66d3ddeadd4
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: fae482e1a3134e03efb428cbbe21a254
tags: 645f666f9bcd5a90fca523b33c5a78b7
+5 -6
View File
@@ -733,10 +733,9 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT = ./ \
../src/musredit_qt5/mupp \
../src/musredit_qt5/mupp/var/include \
../src/musredit_qt5/mupp/var/src
INPUT =../src/musredit_qt5/mupp \
../src/musredit_qt5/mupp/var/include \
../src/musredit_qt5/mupp/var/src
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -756,7 +755,7 @@ INPUT_ENCODING = UTF-8
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
FILE_PATTERNS = mupp.dox *.cpp *.h *.hpp
FILE_PATTERNS = *.dox *.cpp *.h *.hpp
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -1533,7 +1532,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
# The default value is: YES.
GENERATE_LATEX = NO
GENERATE_LATEX = YES
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+7 -10
View File
@@ -32,13 +32,13 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
PROJECT_NAME = "mupp"
PROJECT_NAME = "musredit"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.1.0
PROJECT_NUMBER = 1.0.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
OUTPUT_DIRECTORY = ./technical/html/mupp
OUTPUT_DIRECTORY = ./technical/html/musredit
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -733,10 +733,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT = ./ \
../src/musredit_qt6/mupp \
../src/musredit_qt6/mupp/var/include \
../src/musredit_qt6/mupp/var/src
INPUT =../src/musredit_qt5/musredit
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -756,7 +753,7 @@ INPUT_ENCODING = UTF-8
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
FILE_PATTERNS = mupp.dox *.cpp *.h *.hpp
FILE_PATTERNS = *.dox *.cpp *.h
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -1533,7 +1530,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
# The default value is: YES.
GENERATE_LATEX = NO
GENERATE_LATEX = YES
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
@@ -1972,7 +1969,7 @@ TAGFILES =
# tag file that is based on the input files it reads. See section "Linking to
# external documentation" for more information about the usage of tag files.
GENERATE_TAGFILE = dox-tags/mupp.tag
GENERATE_TAGFILE = dox-tags/musredit.tag
# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
# class index. If set to NO only the inherited external classes will be listed.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+13 -11
View File
@@ -16,18 +16,18 @@
<p>People merely interested in the handling of the programs should check this link:
\htmlonly
<a href="https://lmu.pages.psi.ch/musrfit-docu/">musrfit user manual</a>
<a href="http://lmu.web.psi.ch/musrfit/user/html/index.html">musrfit user manual</a>
\endhtmlonly
\latexonly
musrfit user manual: \texttt{https://lmu.pages.psi.ch/musrfit-docu/user-manual.html}
musrfit user manual: \texttt{http://lmu.web.psi.ch/musrfit/user/html/index.html}
\endlatexonly
<p>People which would like to know how to install the musrfit framework, please check this link:
\htmlonly
<a href="https://lmu.pages.psi.ch/musrfit-docu/setup-standard.html">How to setup musrfit on different platforms</a>
<a href="http://lmu.web.psi.ch/musrfit/user/html/setup-standard.html">How to setup musrfit on different platforms</a>
\endhtmlonly
\latexonly
How to setup musrfit on different platforms: \texttt{https://lmu.pages.psi.ch/musrfit-docu/setup-standard.html}
How to setup musrfit on different platforms: \texttt{http://lmu.web.psi.ch/musrfit/user/html/setup-standard.html}
\endlatexonly
//****************************************************************************************************
@@ -47,7 +47,12 @@ under Linux, Mac OS X, and (with some more work) under Windows. The musrfit fram
msr-files with the same parameters and summarize the fitting results either in a TRIUMF DB or a column ASCII file.
- **msr2msr**: old WKM like msr-files can be transformed into musrfit style msr-files with this little program.
- musrgui (obsolete): an editor to handle msr-files, calling musrfit, etc. from within the editor, based on Qt3.x.
<<<<<<< HEAD
Only bug fixing will be done on this version, and if you have >= Qt4.6 available you should use musredit instead.
- **musredit**: an editor to handle msr-files, calling musrfit, etc. from within a simple text editor, based on >= Qt4.6. A technical documentation of musredit can be found
=======
- **musredit**: an editor to handle msr-files, calling musrfit, etc. from within a simple text editor, based on Qt5.x (soon being deprecated) or Qt6.x. A technical documentation of musredit can be found
>>>>>>> 3f50462c (make the technical docu more complete by adding musrStep and musrWiz.)
\htmlonly <a href="./musredit/html/index.html">here.</a>\endhtmlonly
- **musrWiz** (beta): allows to create an initial msr-file by a step-by-step instruction wizard. A technical documentation of musrWiz can be found
\htmlonly <a href="./musrWiz/html/index.html">here.</a>\endhtmlonly
@@ -55,7 +60,8 @@ under Linux, Mac OS X, and (with some more work) under Windows. The musrfit fram
\htmlonly <a href="./musrStep/html/index.html">here.</a>\endhtmlonly
- **mupp**: is the muSR parameter plotter. It allows to plot values in db- or dat-files (collections). A technical documentation of mupp can be found
\htmlonly <a href="./mupp/html/index.html">here.</a>\endhtmlonly
- **addRun**: allows to add runs from the command line
- **MuSRFit**: a graphical user interface based on PerlQt (written by Z. Salman) for an easy to use interface to the musrfit framework.
Compared to the more general approach of writing msr-files, it has some limitations, though it might be easier for a first user of the musrfit framework.
- **any2many**: should be a "universal" muSR data-file-format converter.
- **dump_header**: is a small program to dump the header information of a muSR data file to the standard output.
- **musrRootValidation**: this is a program to validate MusrRoot files.
@@ -79,11 +85,7 @@ This two points are somewhat contradictory, and currently it is not clear which
\section bugs How to report bugs
<p>Bugs, unexpected features, can be reported directly to me: \verbatim andreas.suter@psi.ch, \endverbatim or entered in the bug-tracking tool at \htmlonly
<a href="https://bitbucket.org/muonspin/musrfit/issues">bitbucket issue tracker</a>
\endhtmlonly
\latexonly
\verbatim https://bitbucket.org/muonspin/musrfit/issues \endverbatim.
\endlatexonly
<p>Bugs, unexpected features, can be reported directly to me: \verbatim andreas.suter@psi.ch, \endverbatim or entered in the bug-tracking tool at
bitbkucket \verbatim https://bitbucket.org/muonspin/musrfit/issues \endverbatim.
*/
+247 -555
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -82,6 +82,7 @@ add_executable(musrfit musrfit.cpp)
target_compile_options(musrfit BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
target_include_directories(musrfit
BEFORE PRIVATE
$<BUILD_INTERFACE:${DKS_INCLUDE_DIR}>
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
+18 -1
View File
@@ -6,7 +6,7 @@ set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
# Hence, target_include_directories cannot be used here because, targets are
# setup only afterwards.
include_directories(${MUSRFIT_INC})
include_directories(${FFTW3_INCLUDE})
include_directories(${FFTW3_INC})
root_generate_dictionary(
PFourierCanvasDict
@@ -95,6 +95,7 @@ add_library(PMusr SHARED
PFindRun.cpp
PFitter.cpp
PFitterFcn.cpp
PFitterFcnDKS.cpp
PFourier.cpp
PFourierCanvas.cpp
PFourierCanvasDict.cxx
@@ -129,6 +130,7 @@ add_library(PMusr SHARED
#--- make sure that the include directory is found ----------------------------
target_include_directories(
PMusr BEFORE PRIVATE
$<BUILD_INTERFACE:${DKS_INCLUDE_DIR}>
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
$<BUILD_INTERFACE:${HDF4_INCLUDE_DIRS}>
@@ -190,6 +192,14 @@ if (ROOT_GRTEQ_24)
target_compile_options(PMusr BEFORE PRIVATE "-DROOT_GRTEQ_24")
endif(ROOT_GRTEQ_24)
#--- add DKS compiler flags if enabled ----------------------------------------
if (DKS_FOUND)
if (CUDA_FOUND)
set(DKS_CXX_FLAGS -DDKS_OPENCL -DDKS_CUDA -I${CUDA_INCLUDE_DIRS} -I${DKS_INCLUDE_DIR})
target_compile_options(PMusr PUBLIC ${DKS_CXX_FLAGS})
endif (CUDA_FOUND)
endif (DKS_FOUND)
#--- add library dependencies -------------------------------------------------
set(DependOnLibs ${ROOT_LIBRARIES})
#set(DependOnLibs ${DependOnLibs} ${FFTW3_LIBRARY})
@@ -207,6 +217,13 @@ endif (nexus)
if (OpenMP_FOUND)
set(DependOnLibs ${DependOnLibs} OpenMP::OpenMP_CXX)
endif (OpenMP_FOUND)
if (DKS_FOUND)
if (APPLE)
set(DependOnLibs ${DependOnLibs} "-framework OpenCL")
endif (APPLE)
set(DependOnLibs ${DependOnLibs} "-L ${DKS_LIBRARY_DIR}")
set(DependOnLibs ${DependOnLibs} ${DKS_LIBRARY})
endif (DKS_FOUND)
target_link_libraries(PUserFcnBase PRIVATE ${ROOT_LIBRARIES})
target_link_libraries(PRgeHandler PRIVATE ${BOOST_LINK_LIBS} ${ROOT_LIBRARIES})
+313 -58
View File
@@ -31,6 +31,9 @@
#include "config.h"
#endif
#include <sys/time.h>
#include <sys/utsname.h>
#ifdef HAVE_GOMP
#include <omp.h>
#endif
@@ -38,6 +41,7 @@
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <limits>
#include <cmath>
@@ -291,6 +295,7 @@ PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bo
fChisqOnly(chisq_only), fYamlOut(yaml_out), fRunInfo(runInfo), fRunListCollection(runListCollection)
{
// initialize variables
fDKSReady = false;
fIsScanOnly = true;
fConverged = false;
fUseChi2 = true; // chi^2 is the default
@@ -336,8 +341,36 @@ PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bo
// create phase bool array
GetPhaseParams();
// create fit function object
fFitterFcn = std::make_unique<PFitterFcn>(runListCollection, fUseChi2);
// get the DKS tag from the commands block
fDKSTag = fRunInfo->GetDKSTag();
// check if the theory function can already run on the GPU
std::string theo = fRunInfo->GetDKSTheoryString();
if (fDKSTag != DKS_CPU_OPENMP) {
if (!theo.compare("??")) { // theory not yet DKS ready
std::cout << std::endl << ">> PFitter::PFitter(): **INFO** theory not yet DKS/GPU ready. Will run on the CPU." << std::endl;
} else {
fDKSReady = true;
std::cout << std::endl << ">> PFitter::PFitter(): **INFO** theory DKS/GPU ready. Will run on the GPU." << std::endl;
}
}
// create fit function object depending whether DKS/GPU can be used or not
if (fDKSReady && (fDKSTag != DKS_CPU_OPENMP)) { // run on the GPU
fFitterFcnDKS = std::make_unique<PFitterFcnDKS>(runListCollection, fUseChi2, fDKSTag, theo);
if (!fFitterFcnDKS) {
fIsValid = false;
}
if (!fFitterFcnDKS->IsValid()) {
fIsValid = false;
}
} else { // run on the CPU
fDKSReady = false; // needed in case dksTag == DKS_CPU_OPENMP
fFitterFcn = std::make_unique<PFitterFcn>(runListCollection, fUseChi2);
if (!fFitterFcn) {
fIsValid = false;
}
}
}
//--------------------------------------------------------------------------
@@ -658,13 +691,24 @@ Bool_t PFitter::DoFit()
if (error[i] != 0.0)
usedParams++;
}
UInt_t ndf = static_cast<int>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
Double_t val = (*fFitterFcn)(param);
UInt_t ndf = 0;
Double_t val = 0.0;
if (fDKSReady) {
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
val = (*fFitterFcnDKS)(param);
} else {
ndf = fFitterFcn->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
val = (*fFitterFcn)(param);
}
if (fUseChi2) {
// calculate expected chisq
Double_t totalExpectedChisq = 0.0;
PDoubleVector expectedChisqPerRun;
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
// calculate chisq per run
std::vector<Double_t> chisqPerRun;
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -677,14 +721,21 @@ Bool_t PFitter::DoFit()
std::cout << std::endl << ">> expected chisq = " << totalExpectedChisq << ", NDF = " << ndf << ", expected chisq/NDF = " << totalExpectedChisq/ndf;
UInt_t ndf_run = 0;
for (UInt_t i=0; i<expectedChisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.chisq/red.chisq_e) = (" << ndf_run << "/" << chisqPerRun[i]/ndf_run << "/" << expectedChisqPerRun[i]/ndf_run << ")";
}
} else if (chisqPerRun.size() > 0) { // in case expected chisq is not applicable like for asymmetry fits
UInt_t ndf_run = 0;
for (UInt_t i=0; i<chisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.chisq) = (" << ndf_run << "/" << chisqPerRun[i]/ndf_run << ")";
}
@@ -702,13 +753,20 @@ Bool_t PFitter::DoFit()
secFitRange[0].first = fSector[k].GetTimeRangeFirst(0);
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// calculate chisq
val = (*fFitterFcn)(param);
// calculate NDF
ndf = static_cast<UInt_t>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
// calculate chisq and NDF
if (fDKSReady) {
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
val = (*fFitterFcnDKS)(param);
} else {
ndf = fFitterFcn->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
val = (*fFitterFcn)(param);
}
// calculate expected chisq
totalExpectedChisq = 0.0;
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
// calculate chisq per run
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
chisqPerRun.push_back(fRunListCollection->GetSingleRunChisq(param, i));
@@ -723,14 +781,20 @@ Bool_t PFitter::DoFit()
std::cout << std::endl << ">> expected chisq = " << totalExpectedChisq << ", NDF = " << ndf << ", expected chisq/NDF = " << totalExpectedChisq/ndf;
UInt_t ndf_run = 0;
for (UInt_t i=0; i<expectedChisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.chisq/red.chisq_e) = (" << ndf_run << "/" << chisqPerRun[i]/ndf_run << "/" << expectedChisqPerRun[i]/ndf_run << ")";
}
} else if (chisqPerRun.size() > 0) { // in case expected chisq is not applicable like for asymmetry fits
UInt_t ndf_run = 0;
for (UInt_t i=0; i<chisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.chisq) = (" << ndf_run << "/" << chisqPerRun[i]/ndf_run << ")";
}
@@ -744,7 +808,10 @@ Bool_t PFitter::DoFit()
// calculate expected maxLH
Double_t totalExpectedMaxLH = 0.0;
std::vector<Double_t> expectedMaxLHPerRun;
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
// calculate maxLH per run
std::vector<Double_t> maxLHPerRun;
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -757,9 +824,12 @@ Bool_t PFitter::DoFit()
std::cout << std::endl << ">> expected maxLH = " << totalExpectedMaxLH << ", NDF = " << ndf << ", expected maxLH/NDF = " << totalExpectedMaxLH/ndf;
UInt_t ndf_run = 0;
for (UInt_t i=0; i<expectedMaxLHPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.maxLH/red.maxLH_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/maxLH.chisq/maxLH.chisq_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
}
}
@@ -775,13 +845,20 @@ Bool_t PFitter::DoFit()
secFitRange[0].first = fSector[k].GetTimeRangeFirst(0);
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// calculate maxLH
val = (*fFitterFcn)(param);
// calculate NDF
ndf = static_cast<int>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
// calculate chisq and NDF
if (fDKSReady) {
ndf = static_cast<Int_t>(fFitterFcnDKS->GetTotalNoOfFittedBins()) - usedParams;
val = (*fFitterFcnDKS)(param);
} else {
ndf = static_cast<Int_t>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
val = (*fFitterFcn)(param);
}
// calculate expected maxLH
totalExpectedMaxLH = 0.0;
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
// calculate maxLH per run
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
maxLHPerRun.push_back(fRunListCollection->GetSingleRunMaximumLikelihood(param, i));
@@ -796,9 +873,12 @@ Bool_t PFitter::DoFit()
std::cout << std::endl << ">> expected maxLH = " << totalExpectedMaxLH << ", NDF = " << ndf << ", expected maxLH/NDF = " << totalExpectedMaxLH/ndf;
UInt_t ndf_run = 0;
for (UInt_t i=0; i<expectedMaxLHPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.maxLH/red.maxLH_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/maxLH.chisq/maxLH.chisq_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
}
}
@@ -977,7 +1057,15 @@ Bool_t PFitter::CheckCommands()
if (line.Contains("COMMANDS", TString::kIgnoreCase)) {
continue;
} else if (line.Contains("SET BATCH", TString::kIgnoreCase)) { // needed for backward compatibility
} else if (it->fLine.Contains("OpenMP", TString::kIgnoreCase)) { // run on CPU using OpenMP
continue;
} else if (it->fLine.Contains("CUDA", TString::kIgnoreCase)) { // try to run DKS/GPU CUDA
continue;
} else if (it->fLine.Contains("OpenCL-GPU", TString::kIgnoreCase)) { // try to run DKS/GPU OpenCL
continue;
} else if (it->fLine.Contains("OpenCL-CPU", TString::kIgnoreCase)) { // try to run DKS/CPU OpenCL
continue;
} else if (it->fLine.Contains("SET BATCH", TString::kIgnoreCase)) { // needed for backward compatibility
continue;
} else if (line.Contains("END RETURN", TString::kIgnoreCase)) { // needed for backward compatibility
continue;
@@ -1703,7 +1791,13 @@ Bool_t PFitter::ExecuteContours()
return false;
}
ROOT::Minuit2::MnContours contours((*fFitterFcn), *fFcnMin);
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnContours contours((*fcn), *fFcnMin);
fScanData = contours(fScanParameter[0], fScanParameter[1], fScanNoPoints);
@@ -1841,8 +1935,13 @@ Bool_t PFitter::ExecuteHesse()
// call hesse
Double_t start=0.0, end=0.0;
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
start=MilliTime();
ROOT::Minuit2::MnUserParameterState mnState = hesse((*fFitterFcn), fMnUserParams, maxfcn);
ROOT::Minuit2::MnUserParameterState mnState = hesse((*fcn), fMnUserParams, maxfcn);
end=MilliTime();
std::cout << ">> PFitter::ExecuteMinimize(): execution time for Hesse = " << std::setprecision(3) << (end-start)/1.0e3 << " sec." << std::endl;
TString str = TString::Format("Hesse: %.3f sec", (end-start)/1.0e3);
@@ -1853,8 +1952,8 @@ Bool_t PFitter::ExecuteHesse()
return false;
}
if (!mnState.HasCovariance()) {
std::cerr << std::endl << ">> PFitter::ExecuteHesse(): **WARNING** Hesse encountered a problem! No covariance matrix available.";
std::cerr << std::endl;
std::cerr << std::endl << ">> PFitter::ExecuteHesse(): **WARNING** Hesse encountered a problem! No covariance matrix available.";
std::cerr << std::endl;
return false;
}
@@ -1884,7 +1983,12 @@ Bool_t PFitter::ExecuteMigrad()
// create migrad object
// strategy is by default = 'default'
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnMigrad migrad((*fcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
// minimize
// maxfcn is MINUIT2 Default maxfcn
@@ -1927,7 +2031,11 @@ Bool_t PFitter::ExecuteMigrad()
// handle statistics
Double_t minVal = min.Fval();
UInt_t ndf = fFitterFcn->GetTotalNoOfFittedBins();
UInt_t ndf = 0.0;
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins();
else
ndf = fFitterFcn->GetTotalNoOfFittedBins();
// subtract number of varied parameters from total no of fitted bins -> ndf
for (UInt_t i=0; i<fParams.size(); i++) {
if ((min.UserState().Error(i) != 0.0) && !fMnUserParams.Parameters().at(i).IsFixed())
@@ -1960,7 +2068,12 @@ Bool_t PFitter::ExecuteMinimize()
// create minimizer object
// strategy is by default = 'default'
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnMinimize minimize((*fcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
// minimize
// maxfcn is MINUIT2 Default maxfcn
@@ -2004,7 +2117,11 @@ Bool_t PFitter::ExecuteMinimize()
// handle statistics
Double_t minVal = min.Fval();
UInt_t ndf = fFitterFcn->GetTotalNoOfFittedBins();
UInt_t ndf = 0.0;
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins();
else
ndf = fFitterFcn->GetTotalNoOfFittedBins();
// subtract number of varied parameters from total no of fitted bins -> ndf
for (UInt_t i=0; i<fParams.size(); i++) {
if ((min.UserState().Error(i) != 0.0) && !fMnUserParams.Parameters().at(i).IsFixed())
@@ -2051,8 +2168,13 @@ Bool_t PFitter::ExecuteMinos()
// make minos analysis
Double_t start=0.0, end=0.0;
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
start=MilliTime();
ROOT::Minuit2::MnMinos minos((*fFitterFcn), (*fFcnMin));
ROOT::Minuit2::MnMinos minos((*fcn), (*fFcnMin));
for (UInt_t i=0; i<fParams.size(); i++) {
// only try to call minos if the parameter is not fixed!!
@@ -2246,7 +2368,12 @@ Bool_t PFitter::ExecuteScan()
{
std::cout << ">> PFitter::ExecuteScan(): will call scan ..." << std::endl;
ROOT::Minuit2::MnScan scan((*fFitterFcn), fMnUserParams);
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnScan scan((*fcn), fMnUserParams);
if (fScanAll) { // not clear at the moment what to be done here
// TO BE IMPLEMENTED
@@ -2304,9 +2431,13 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
// CalcExpectedChiSquare handles both, chisq and mlh
Bool_t ok;
PDoubleVector par_r = ParamRound(param, err, ok);
if (!ok)
par_r = param;
fFitterFcn->CalcExpectedChiSquare(par_r, totalExpectedChisq, expectedchisqPerRun);
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(par_r, totalExpectedChisq, expectedchisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(par_r, totalExpectedChisq, expectedchisqPerRun);
// calculate chisq per run
std::vector<Double_t> chisqPerRun;
@@ -2321,7 +2452,10 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
// get the ndf's of the histos
UInt_t ndf_run;
for (UInt_t i=0; i<expectedchisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndfPerHisto.push_back(ndf_run);
}
@@ -2336,16 +2470,12 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
} else if (chisqPerRun.size() > 1) { // in case expected chisq is not applicable like for asymmetry fits
UInt_t ndf_run = 0;
for (UInt_t i=0; i<chisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndfPerHisto.push_back(ndf_run);
}
// feed the msr-file handler
PMsrStatisticStructure *statistics = fRunInfo->GetMsrStatistic();
if (statistics) {
statistics->fMinPerHisto = chisqPerRun;
statistics->fNdfPerHisto = ndfPerHisto;
}
}
// check if sector command has been requested
@@ -2386,6 +2516,43 @@ Bool_t PFitter::ExecuteSave(Bool_t firstSave)
fout << std::endl << "*************************************************************************";
fout << std::endl;
// write CPU/GPU info
std::string hwInfo("??");
int status=0;
switch (fDKSTag) {
case DKS_CPU_OPENMP:
fout << std::endl << " CPU info : " << GetCPUInfo();
#ifdef HAVE_GOMP
fout << std::endl << " OpenMP" << std::endl;
#else
fout << std::endl << " CPU, i.e. single threaded" << std::endl;
#endif
break;
case DKS_CPU_OPENCL:
if (fFitterFcnDKS)
status = fFitterFcnDKS->GetDeviceName(hwInfo);
fout << std::endl << " CPU info : " << hwInfo;
fout << std::endl << " OpenCL" << std::endl;
break;
case DKS_GPU_CUDA:
if (fFitterFcnDKS)
status = fFitterFcnDKS->GetDeviceName(hwInfo);
fout << std::endl << " GPU info : " << hwInfo;
fout << std::endl << " Cuda" << std::endl;
break;
case DKS_GPU_OPENCL:
if (fFitterFcnDKS)
status = fFitterFcnDKS->GetDeviceName(hwInfo);
fout << std::endl << " GPU info : " << hwInfo;
fout << std::endl << " OpenCL" << std::endl;
break;
default:
fout << std::endl << " CPU/GPU info : unkown" << std::endl;
break;
}
fout << std::endl << "*************************************************************************";
fout << std::endl;
// write elapsed times
fout << std::endl << " elapsed times:";
for (UInt_t i=0; i<fElapsedTime.size(); i++) {
@@ -2784,7 +2951,12 @@ Bool_t PFitter::ExecuteSimplex()
// create minimizer object
// strategy is by default = 'default'
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnSimplex simplex((*fcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
// minimize
// maxfcn is 10*MINUIT2 Default maxfcn
@@ -2827,7 +2999,11 @@ Bool_t PFitter::ExecuteSimplex()
// handle statistics
Double_t minVal = min.Fval();
UInt_t ndf = fFitterFcn->GetTotalNoOfFittedBins();
UInt_t ndf = 0.0;
if (fDKSReady)
fFitterFcnDKS->GetTotalNoOfFittedBins();
else
fFitterFcn->GetTotalNoOfFittedBins();
// subtract number of varied parameters from total no of fitted bins -> ndf
for (UInt_t i=0; i<fParams.size(); i++) {
if ((min.UserState().Error(i) != 0.0) && !fMnUserParams.Parameters().at(i).IsFixed())
@@ -2879,14 +3055,23 @@ void PFitter::PrepareSector(PDoubleVector &param, PDoubleVector &error)
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// calculate chisq
val = (*fFitterFcn)(param);
if (fDKSReady)
val = (*fFitterFcnDKS)(param);
else
val = (*fFitterFcn)(param);
fSector[k].SetChisq(val);
// calculate NDF
ndf = static_cast<UInt_t>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
else
ndf = fFitterFcn->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
fSector[k].SetNDF(ndf);
// calculate expected chisq
totalExpectedChisq = 0.0;
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
fSector[k].SetExpectedChisq(totalExpectedChisq);
// calculate chisq per run
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -2898,7 +3083,10 @@ void PFitter::PrepareSector(PDoubleVector &param, PDoubleVector &error)
if (totalExpectedChisq != 0.0) {
UInt_t ndf_run = 0;
for (UInt_t i=0; i<expectedChisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0) {
fSector[k].SetNDF(ndf_run, i);
}
@@ -2906,7 +3094,10 @@ void PFitter::PrepareSector(PDoubleVector &param, PDoubleVector &error)
} else if (chisqPerRun.size() > 0) { // in case expected chisq is not applicable like for asymmetry fits
UInt_t ndf_run = 0;
for (UInt_t i=0; i<chisqPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0) {
fSector[k].SetNDF(ndf_run, i);
}
@@ -2926,14 +3117,23 @@ void PFitter::PrepareSector(PDoubleVector &param, PDoubleVector &error)
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// calculate maxLH
val = (*fFitterFcn)(param);
if (fDKSReady)
val = (*fFitterFcnDKS)(param);
else
val = (*fFitterFcn)(param);
fSector[k].SetChisq(val);
// calculate NDF
ndf = static_cast<UInt_t>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
else
ndf = fFitterFcn->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
fSector[k].SetNDF(ndf);
// calculate expected maxLH
totalExpectedMaxLH = 0.0;
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
fSector[k].SetExpectedChisq(totalExpectedMaxLH);
// calculate maxLH per run
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -2945,7 +3145,10 @@ void PFitter::PrepareSector(PDoubleVector &param, PDoubleVector &error)
if (totalExpectedMaxLH != 0.0) {
UInt_t ndf_run = 0;
for (UInt_t i=0; i<expectedMaxLHPerRun.size(); i++) {
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0) {
fSector[k].SetNDF(ndf_run, i);
}
@@ -3032,6 +3235,59 @@ Double_t PFitter::MilliTime()
return ((Double_t)now.tv_sec * 1.0e6 + (Double_t)now.tv_usec)/1.0e3;
}
//--------------------------------------------------------------------------
// GetCPUInfo (private)
//--------------------------------------------------------------------------
/**
* <p> extract CPU information from the system.
*
* @return the CPU information or ?? if this was not possible.
*/
std::string PFitter::GetCPUInfo()
{
std::string cpuInfo = "??";
// find out if linux or Mac OS X
struct utsname sys_info;
uname(&sys_info);
if (strstr(sys_info.sysname, "Linux")) {
char result[128];
strcpy(result, "??");
char line[128], str[128], *pos;
bool done = false;
std::ifstream fin("/proc/cpuinfo", std::ifstream::in);
while (fin.good() && !done) {
fin.getline(line, 128);
if (strstr(line, "model name")) {
pos = strstr(line, ":");
strcpy(str, pos+2);
strncpy(result, str, sizeof(result));
done = true;
}
}
fin.close();
cpuInfo = result;
} else if (strstr(sys_info.sysname, "Darwin")) {
system("sysctl -n machdep.cpu.brand_string >> /tmp/_musrfit_cpu_info.txt");
sleep(1);
char line[128], result[128];
std::ifstream fin("/tmp/_musrfit_cpu_info.txt", std::ifstream::in);
while (fin.good()) {
fin.getline(line, 128);
strncat(result, line, sizeof(result) - strlen(result) - 1);
}
fin.close();
system("rm /tmp/_musrfit_cpu_info.txt");
cpuInfo = result;
}
return cpuInfo;
}
//--------------------------------------------------------------------------
// ParamRound (private)
//--------------------------------------------------------------------------
@@ -3071,11 +3327,10 @@ PDoubleVector PFitter::ParamRound(const PDoubleVector &par, const PDoubleVector
par_r[i] = par[i];
}
}
return par_r;
}
//-------------------------------------------------------------------------------------------------
// end
//-------------------------------------------------------------------------------------------------
+15 -5
View File
@@ -38,16 +38,14 @@
* \param runList run list collection
* \param useChi2 if true, a chisq fit will be performed, otherwise a log max-likelihood fit will be carried out.
*/
PFitterFcn::PFitterFcn(PRunListCollection *runList, Bool_t useChi2)
PFitterFcn::PFitterFcn(PRunListCollection *runList, Bool_t useChi2) :
fUseChi2(useChi2),
fRunListCollection(runList)
{
fUseChi2 = useChi2;
if (fUseChi2)
fUp = 1.0;
else
fUp = 0.5;
fRunListCollection = runList;
}
//--------------------------------------------------------------------------
@@ -117,6 +115,12 @@ void PFitterFcn::CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
// mu minus
for (UInt_t i=0; i<fRunListCollection->GetNoOfMuMinus(); i++) {
value = fRunListCollection->GetSingleRunChisqExpected(par, i); // calculate the expected chisq for mu minus run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
} else { // log max. likelihood
// single histo
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
@@ -124,5 +128,11 @@ void PFitterFcn::CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
// mu minus
for (UInt_t i=0; i<fRunListCollection->GetNoOfMuMinus(); i++) {
value = fRunListCollection->GetSingleRunMaximumLikelihoodExpected(par, i); // calculate the expected maxLH for mu minus run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
}
}
+538
View File
@@ -0,0 +1,538 @@
/***************************************************************************
PFitterFcnDKS.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2026 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <iostream>
#include "PMusr.h"
#include "PFitterFcnDKS.h"
//--------------------------------------------------------------------------
// Constructor
//--------------------------------------------------------------------------
/**
* <p>Constructor.
*
* \param runList run list collection
* \param useChi2 if true, a chisq fit will be performed, otherwise a log max-likelihood fit will be carried out.
*/
PFitterFcnDKS::PFitterFcnDKS(PRunListCollection *runList, const Bool_t useChi2, const UInt_t dksTag,
const std::string theo) :
fTheoStr(theo),
fUseChi2(useChi2),
fRunListCollection(runList)
{
fValid = false;
if (fUseChi2)
fUp = 1.0;
else
fUp = 0.5;
InitDKS(dksTag);
}
//--------------------------------------------------------------------------
// Destructor
//--------------------------------------------------------------------------
/**
* <p>Destructor
*/
PFitterFcnDKS::~PFitterFcnDKS()
{
// FreeDKS();
}
//--------------------------------------------------------------------------
// operator()
//--------------------------------------------------------------------------
/**
* <p>Minuit2 interface function call routine. This is the function which should be minimized.
*
* \param par a vector with all the parameters of the function
*/
Double_t PFitterFcnDKS::operator()(const std::vector<Double_t>& par) const
{
Double_t value = 0.0, chisq = 0.0;
// write parameter to GPU
Int_t ierr = fDKS.writeParams(&par[0], par.size());
// loop over all data sets
PDKSParams dksp;
Double_t norm = 1.0;
// single histos
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
// get current values of N0, Nbkg, tau, the functions, the maps, the time resolution, the fit start time, etc.
ierr = fRunListCollection->GetSingleHistoParams(i, par, dksp);
// set N0, Nbkg
ierr += fDKS.callSetConsts(dksp.fN0, dksp.fTau, dksp.fNbkg);
// set fun values
if (dksp.fFun.size() == 0)
ierr += fDKS.writeFunctions(nullptr, 0);
else
ierr += fDKS.writeFunctions(&dksp.fFun[0], dksp.fFun.size());
// set map values
if (dksp.fMap.size() == 0)
ierr += fDKS.writeMaps(nullptr, 0);
else
ierr += fDKS.writeMaps(&dksp.fMap[0], dksp.fMap.size());
// calc chisq/log-mlh
chisq = 0.0;
ierr += fDKS.callLaunchChiSquare(FITTYPE_SINGLE_HISTO, fMemDataSingleHisto[i], fMemDataSingleHistoErr[i], dksp.fNoOfFitBins,
par.size(), dksp.fFun.size(), dksp.fMap.size(),
dksp.fStartTime , dksp.fPackedTimeResolution, chisq);
value += chisq;
if (ierr != 0) {
std::cerr << "PFitterFcnDKS::operator(): **ERROR** Kernel launch for single histo failed!" << std::endl;
exit (EXIT_FAILURE);
}
}
// asymmetries
for (UInt_t i=0; i<fRunListCollection->GetNoOfAsymmetry(); i++) {
// get current values of alpha and beta, the functions, the maps, the time resolution, the fit start time, etc.
ierr = fRunListCollection->GetAsymmetryParams(i, par, dksp);
// set alpha and beta
ierr += fDKS.callSetConsts(dksp.fAlpha, dksp.fBeta);
// set fun values
if (dksp.fFun.size() == 0)
ierr += fDKS.writeFunctions(nullptr, 0);
else
ierr += fDKS.writeFunctions(&dksp.fFun[0], dksp.fFun.size());
// set map values
if (dksp.fMap.size() == 0)
ierr += fDKS.writeMaps(nullptr, 0);
else
ierr += fDKS.writeMaps(&dksp.fMap[0], dksp.fMap.size());
// calc chisq
chisq = 0.0;
ierr += fDKS.callLaunchChiSquare(FITTYPE_ASYMMETRY, fMemDataAsymmetry[i], fMemDataAsymmetryErr[i], dksp.fNoOfFitBins,
par.size(), dksp.fFun.size(), dksp.fMap.size(),
dksp.fStartTime , dksp.fPackedTimeResolution, chisq);
value += chisq;
if (ierr != 0) {
std::cerr << "PFitterFcnDKS::operator(): **ERROR** Kernel launch for asymmetry failed!" << std::endl;
exit (EXIT_FAILURE);
}
}
// mu mius
for (UInt_t i=0; i<fRunListCollection->GetNoOfMuMinus(); i++) {
// get current values of N0, Nbkg, tau, the functions, the maps, the time resolution, the fit start time, etc.
ierr = fRunListCollection->GetMuMinusParams(i, par, dksp);
// set fun values
ierr += fDKS.writeFunctions(&dksp.fFun[0], dksp.fFun.size());
// set map values
ierr += fDKS.writeMaps(&dksp.fMap[0], dksp.fMap.size());
// calc chisq/log-mlh
chisq = 0.0;
ierr += fDKS.callLaunchChiSquare(FITTYPE_MU_MINUS, fMemDataMuMinus[i], fMemDataMuMinusErr[i], dksp.fNoOfFitBins,
par.size(), dksp.fFun.size(), dksp.fMap.size(),
dksp.fStartTime , dksp.fPackedTimeResolution, chisq);
value += chisq;
if (ierr != 0) {
std::cerr << "PFitterFcnDKS::operator(): **ERROR** Kernel launch for mu minus failed!" << std::endl;
exit (EXIT_FAILURE);
}
}
if (dksp.fScaleN0AndBkg)
norm = dksp.fPackedTimeResolution*1.0e3;
return norm*value;
}
//--------------------------------------------------------------------------
// CalcExpectedChiSquare (public)
//--------------------------------------------------------------------------
/**
* <p>Calculates the expected chisq, expected chisq per run, and chisq per run, if applicable.
*
* \param par
* \param totalExpectedChisq expected chisq for all run blocks
* \param expectedChisqPerRun expected chisq vector for all the run blocks
*/
void PFitterFcnDKS::CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_t &totalExpectedChisq, std::vector<Double_t> &expectedChisqPerRun)
{
// init expected chisq related variables
totalExpectedChisq = 0.0;
expectedChisqPerRun.clear();
// only do something for chisq
Double_t value = 0.0;
if (fUseChi2) {
// single histo
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
value = fRunListCollection->GetSingleRunChisqExpected(par, i); // calculate the expected chisq for single histo run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
// mu minus
for (UInt_t i=0; i<fRunListCollection->GetNoOfMuMinus(); i++) {
value = fRunListCollection->GetSingleRunChisqExpected(par, i); // calculate the expected chisq for mu minus run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
} else {
// single histo
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
value = fRunListCollection->GetSingleRunMaximumLikelihoodExpected(par, i); // calculate the expected maxLH for single histo run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
// mu minus
for (UInt_t i=0; i<fRunListCollection->GetNoOfMuMinus(); i++) {
value = fRunListCollection->GetSingleRunMaximumLikelihoodExpected(par, i); // calculate the expected maxLH for mu minus run block 'i'
expectedChisqPerRun.push_back(value);
totalExpectedChisq += value;
}
}
}
//--------------------------------------------------------------------------
// GetDeviceName (public)
//--------------------------------------------------------------------------
/**
* <p> get from DKS the device name used.
*
* \param devName deivce name, if status == 0
*
* \return 0 if OK, 1 otherwise
*/
int PFitterFcnDKS::GetDeviceName(std::string &devName)
{
int status = 1;
devName = "??";
if (!fValid)
return status;
status = fDKS.getDeviceName(devName);
return status;
}
//--------------------------------------------------------------------------
// InitDKS (private)
//--------------------------------------------------------------------------
/**
* <p>initializes the DKS interface
*
*/
void PFitterFcnDKS::InitDKS(const UInt_t dksTag)
{
Int_t ierr = 0;
Int_t fitType = FITTYPE_UNDEFINED;
Int_t startTimeBin = -1, endTimeBin = -1, length = -1;
// if any device was allocated before, free the device resources
FreeDKS();
// select framework
if (dksTag == DKS_GPU_CUDA)
fDKS.setAPI("Cuda");
else
fDKS.setAPI("OpenCL");
// select device
if (dksTag == DKS_CPU_OPENCL)
fDKS.setDevice("-cpu");
else
fDKS.setDevice("-gpu");
// init device
fDKS.initDevice();
// init chisq buffer on the GPU
// 1) calculate the maximum size for the data needed.
Int_t parSize = -1, mapSize = -1, funSize = -1;
Int_t maxSize = 0, size = -1;
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
size = fRunListCollection->GetNoOfBinsFitted(i);
if (maxSize < size)
maxSize = size;
}
for (UInt_t i=0; i<fRunListCollection->GetNoOfAsymmetry(); i++) {
size = fRunListCollection->GetNoOfBinsFitted(i);
if (maxSize < size)
maxSize = size;
}
for (UInt_t i=0; i<fRunListCollection->GetNoOfMuMinus(); i++) {
size = fRunListCollection->GetNoOfBinsFitted(i);
if (maxSize < size)
maxSize = size;
}
if (maxSize == 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to get data size to be fitted." << std::endl;
fValid = false;
return;
}
// 2) get number of parameters / functions / maps
parSize = fRunListCollection->GetNoOfParameters();
if (parSize == -1) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to get number of fit parameters." << std::endl;
fValid = false;
return;
}
funSize = fRunListCollection->GetNoOfFunctions();
if (funSize == -1) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to get number of functions." << std::endl;
fValid = false;
return;
}
mapSize = fRunListCollection->GetNoOfMaps();
if (mapSize == -1) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to get number of maps." << std::endl;
fValid = false;
return;
}
// now ready to init the chisq buffer on the GPU
ierr = fDKS.initChiSquare(maxSize, parSize, funSize, mapSize);
if (ierr != 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to allocate the necessary chisq buffer on the GPU." << std::endl;
fValid = false;
return;
}
// allocate memory for the data on the GPU/CPU and transfer the data sets
PRunData *runData=0;
// single histos
fMemDataSingleHisto.resize(fRunListCollection->GetNoOfSingleHisto());
fMemDataSingleHistoErr.resize(fRunListCollection->GetNoOfSingleHisto());
for (UInt_t i=0; i<fRunListCollection->GetNoOfSingleHisto(); i++) {
runData = fRunListCollection->GetSingleHisto(i);
if (runData == 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to get single histo data set (i=" << i << ") from fRunListCollection." << std::endl;
fValid = false;
return;
}
startTimeBin = fRunListCollection->GetStartTimeBin(MSR_FITTYPE_SINGLE_HISTO, i);
endTimeBin = fRunListCollection->GetEndTimeBin(MSR_FITTYPE_SINGLE_HISTO, i);
length = endTimeBin-startTimeBin;
if (startTimeBin < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** startTimeBin undefind (single histo fit)." << std::endl;
fValid = false;
return;
}
if (endTimeBin < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** endTimeBin undefind (single histo fit)." << std::endl;
fValid = false;
return;
}
if (length < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed for single histo data set (i=" << i << ") from fRunListCollection." << std::endl;
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** (endTimeBin=" << endTimeBin << ") < (startTimeBin=" << startTimeBin << ")." << std::endl;
fValid = false;
return;
}
fMemDataSingleHisto[i] = fDKS.allocateMemory<Double_t>(length, ierr);
fMemDataSingleHistoErr[i] = fDKS.allocateMemory<Double_t>(length, ierr);
if (ierr != 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to allocated single histo data set memory (i=" << i << ") on the GPU" << std::endl;
fValid = false;
return;
}
fDKS.writeData<double>(fMemDataSingleHisto[i], &runData->GetValue()->at(startTimeBin), length);
fDKS.writeData<double>(fMemDataSingleHistoErr[i], &runData->GetError()->at(startTimeBin), length);
}
if (fRunListCollection->GetNoOfSingleHisto() > 0)
fitType = FITTYPE_SINGLE_HISTO;
// asymmetry
fMemDataAsymmetry.resize(fRunListCollection->GetNoOfAsymmetry());
fMemDataAsymmetryErr.resize(fRunListCollection->GetNoOfAsymmetry());
for (UInt_t i=0; i<fRunListCollection->GetNoOfAsymmetry(); i++) {
runData = fRunListCollection->GetAsymmetry(i);
if (runData == 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to get asymmetry data set (i=" << i << ") from fRunListCollection." << std::endl;
fValid = false;
return;
}
startTimeBin = fRunListCollection->GetStartTimeBin(MSR_FITTYPE_ASYM, i);
endTimeBin = fRunListCollection->GetEndTimeBin(MSR_FITTYPE_ASYM, i);
length = endTimeBin-startTimeBin;
if (startTimeBin < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** startTimeBin undefind (asymmetry fit)." << std::endl;
fValid = false;
return;
}
if (endTimeBin < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** endTimeBin undefind (asymmetry fit)." << std::endl;
fValid = false;
return;
}
if (length < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed for asymmetry data set (i=" << i << ") from fRunListCollection." << std::endl;
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** (endTimeBin=" << endTimeBin << ") < (startTimeBin=" << startTimeBin << ")." << std::endl;
fValid = false;
return;
}
fMemDataAsymmetry[i] = fDKS.allocateMemory<Double_t>(length, ierr);
fMemDataAsymmetryErr[i] = fDKS.allocateMemory<Double_t>(length, ierr);
if (ierr != 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to allocated asymmetry data set memory (i=" << i << ") on the GPU" << std::endl;
fValid = false;
return;
}
fDKS.writeData<double>(fMemDataAsymmetry[i], &runData->GetValue()->at(startTimeBin), length);
fDKS.writeData<double>(fMemDataAsymmetryErr[i], &runData->GetError()->at(startTimeBin), length);
}
if (fRunListCollection->GetNoOfAsymmetry() > 0) {
if (fitType == FITTYPE_UNDEFINED) {
fitType = FITTYPE_ASYMMETRY;
} else {
std::cerr << ">>PFitterFcnDKS::InitDKS: **ERROR** mixed fit types found. This is currently not supported!" << std::endl;
fValid = false;
return;
}
}
// mu minus
fMemDataMuMinus.resize(fRunListCollection->GetNoOfMuMinus());
fMemDataMuMinusErr.resize(fRunListCollection->GetNoOfMuMinus());
for (UInt_t i=0; i<fRunListCollection->GetNoOfMuMinus(); i++) {
runData = fRunListCollection->GetMuMinus(i);
if (runData == 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to get mu minus data set (i=" << i << ") from fRunListCollection." << std::endl;
fValid = false;
return;
}
startTimeBin = fRunListCollection->GetStartTimeBin(MSR_FITTYPE_MU_MINUS, i);
endTimeBin = fRunListCollection->GetEndTimeBin(MSR_FITTYPE_MU_MINUS, i);
length = endTimeBin-startTimeBin;
if (startTimeBin < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** startTimeBin undefind (mu minus fit)." << std::endl;
fValid = false;
return;
}
if (endTimeBin < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** endTimeBin undefind (mu minus fit)." << std::endl;
fValid = false;
return;
}
if (length < 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed for mu minus data set (i=" << i << ") from fRunListCollection." << std::endl;
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** (endTimeBin=" << endTimeBin << ") < (startTimeBin=" << startTimeBin << ")." << std::endl;
fValid = false;
return;
}
fMemDataMuMinus[i] = fDKS.allocateMemory<Double_t>(length, ierr);
fMemDataMuMinusErr[i] = fDKS.allocateMemory<Double_t>(length, ierr);
if (ierr != 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to allocated mu minus data set memory (i=" << i << ") on the GPU" << std::endl;
fValid = false;
return;
}
fDKS.writeData<double>(fMemDataMuMinus[i], &runData->GetValue()->at(startTimeBin), length);
fDKS.writeData<double>(fMemDataMuMinusErr[i], &runData->GetError()->at(startTimeBin), length);
}
if (fRunListCollection->GetNoOfMuMinus() > 0) {
if (fitType == FITTYPE_UNDEFINED) {
fitType = FITTYPE_MU_MINUS;
} else {
std::cerr << ">>PFitterFcnDKS::InitDKS: **ERROR** mixed fit types found. This is currently not supported!" << std::endl;
fValid = false;
return;
}
}
// set the function string and compile the program
ierr = fDKS.callCompileProgram(fTheoStr, !fUseChi2);
if (ierr != 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** failed to compile theory!" << std::endl;
fValid = false;
return;
}
// checks device properties if openCL
ierr = fDKS.checkMuSRKernels(fitType);
if (ierr != 0) {
std::cerr << ">> PFitterFcnDKS::InitDKS: **ERROR** muSR kernel checks failed!" << std::endl;
fValid = false;
return;
}
fValid = true;
}
//--------------------------------------------------------------------------
// FreeDKS (private)
//--------------------------------------------------------------------------
/**
* <p>cleanup DKS/GPU memory
*
*/
void PFitterFcnDKS::FreeDKS()
{
PRunData *runData=0;
// single histo
for (UInt_t i=0; i<fMemDataSingleHisto.size(); i++) {
runData = fRunListCollection->GetSingleHisto(i);
fDKS.freeMemory<Double_t>(fMemDataSingleHisto[i], runData->GetValue()->size());
fDKS.freeMemory<Double_t>(fMemDataSingleHistoErr[i], runData->GetValue()->size());
}
fMemDataSingleHisto.clear();
fMemDataSingleHistoErr.clear();
// asymmetry
for (UInt_t i=0; i<fMemDataAsymmetry.size(); i++) {
runData = fRunListCollection->GetAsymmetry(i);
fDKS.freeMemory<Double_t>(fMemDataAsymmetry[i], runData->GetValue()->size());
fDKS.freeMemory<Double_t>(fMemDataAsymmetryErr[i], runData->GetValue()->size());
}
fMemDataAsymmetry.clear();
fMemDataAsymmetryErr.clear();
// mu minus
for (UInt_t i=0; i<fMemDataMuMinus.size(); i++) {
runData = fRunListCollection->GetMuMinus(i);
fDKS.freeMemory<Double_t>(fMemDataMuMinus[i], runData->GetValue()->size());
fDKS.freeMemory<Double_t>(fMemDataMuMinusErr[i], runData->GetValue()->size());
}
fMemDataMuMinus.clear();
fMemDataMuMinusErr.clear();
}
+241 -83
View File
@@ -479,7 +479,7 @@ double PFTPhaseCorrection::operator()(const std::vector<double> &par) const
* @see Transform()
* @see IsValid()
*/
PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTime, Bool_t dcCorrected, UInt_t zeroPaddingPower) :
PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTime, Bool_t dcCorrected, UInt_t zeroPaddingPower, Bool_t useFFTW) :
fData(data), fUnitTag(unitTag), fStartTime(startTime), fEndTime(endTime),
fDCCorrected(dcCorrected), fZeroPaddingPower(zeroPaddingPower)
{
@@ -491,9 +491,16 @@ PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTi
}
fValid = true;
fUseFFTW = true;
fIn = nullptr;
fOut = nullptr;
//as fPhCorrectedReFT = 0;
#ifdef HAVE_DKS
fInDKS = nullptr;
fOutDKS = nullptr;
#endif
SetUseFFTW(useFFTW);
fApodization = F_APODIZATION_NONE;
@@ -548,21 +555,71 @@ PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTi
}
// allocate necessary memory
fIn = static_cast<fftw_complex *>(fftw_malloc(sizeof(fftw_complex)*fNoOfBins));
fOut = static_cast<fftw_complex *>(fftw_malloc(sizeof(fftw_complex)*fNoOfBins));
// check if memory allocation has been successful
if ((fIn == nullptr) || (fOut == nullptr)) {
fValid = false;
return;
if (fUseFFTW) {
fIn = static_cast<fftw_complex *>(fftw_malloc(sizeof(fftw_complex)*fNoOfBins));
fOut = static_cast<fftw_complex *>(fftw_malloc(sizeof(fftw_complex)*fNoOfBins));
} else { // try DKS
#ifdef HAVE_DKS
fInDKS = new double[fNoOfBins];
unsigned int size=fNoOfBins/2+1;
fOutDKS = new complex<double>[size];
#endif
}
// get the FFTW3 plan (see FFTW3 manual)
fFFTwPlan = fftw_plan_dft_1d(static_cast<Int_t>(fNoOfBins), fIn, fOut, FFTW_FORWARD, FFTW_ESTIMATE);
// check if a valid plan has been generated
if (!fFFTwPlan) {
// check if memory allocation has been successful
if (fUseFFTW) {
if ((fIn == nullptr) || (fOut == nullptr)) {
fValid = false;
return;
}
} else { // try DKS
#ifdef HAVE_DKS
if ((fInDKS == nullptr) || (fOutDKS == nullptr)) {
fValid = false;
return;
}
#else
fValid = false;
return;
#endif
}
if (fUseFFTW) {
// get the FFTW3 plan (see FFTW3 manual)
fFFTwPlan = fftw_plan_dft_1d(fNoOfBins, fIn, fOut, FFTW_FORWARD, FFTW_ESTIMATE);
// check if a valid plan has been generated
if (!fFFTwPlan) {
fValid = false;
}
} else { // try DKS
#ifdef HAVE_DKS
// init DKSBase
fDks.setAPI("Cuda", 4);
fDks.setDevice("-gpu", 4);
fDks.initDevice();
int dimsize[3] = {(int)fNoOfBins, 1, 1};
fDks.setupFFT(1, dimsize);
// allocate memory on accelerator
int ierr;
unsigned int size=fNoOfBins/2+1;
fReal_ptr = 0;
fComp_ptr = 0;
fReal_ptr = fDks.allocateMemory<double>(fNoOfBins, ierr);
if (ierr > 0) {
cerr << ">> PFourier: **ERROR** Couldn't allocate memory for fReal_ptr." << endl;
fValid = false;
}
fComp_ptr = fDks.allocateMemory< complex<double> >(size, ierr);
if (ierr > 0) {
cerr << ">> PFourier: **ERROR** Couldn't allocate memory for fComp_ptr." << endl;
fValid = false;
}
if ((fReal_ptr==0) || (fComp_ptr==0))
fValid = false;
#else
fValid = false;
#endif
}
}
@@ -583,14 +640,25 @@ PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTi
*/
PFourier::~PFourier()
{
if (fFFTwPlan)
fftw_destroy_plan(fFFTwPlan);
if (fIn)
fftw_free(fIn);
if (fOut)
fftw_free(fOut);
//as if (fPhCorrectedReFT)
//as delete fPhCorrectedReFT;
if (fUseFFTW) {
if (fFFTwPlan)
fftw_destroy_plan(fFFTwPlan);
if (fIn)
fftw_free(fIn);
if (fOut)
fftw_free(fOut);
} else {
#ifdef HAVE_DKS
// free accelerator memory
fDks.freeMemory<double>(fReal_ptr, (int)fNoOfBins);
int size = fNoOfBins/2+1;
fDks.freeMemory< complex<double> >(fComp_ptr, size);
if (fIn)
delete [] fInDKS;
if (fOut)
delete [] fOutDKS;
#endif
}
}
//--------------------------------------------------------------------------
@@ -636,7 +704,23 @@ void PFourier::Transform(UInt_t apodizationTag)
PrepareFFTwInputData(apodizationTag);
fftw_execute(fFFTwPlan);
if (fUseFFTW) {
fftw_execute(fFFTwPlan);
} else {
#ifdef HAVE_DKS
int dimsize[3] = {(int)fNoOfBins, 1, 1};
int status=0, size=fNoOfBins/2+1;
// write data to the accelerator
status = fDks.writeData<double>(fReal_ptr, fInDKS, fNoOfBins);
// execute the FFT
status = fDks.callR2CFFT(fReal_ptr, fComp_ptr, 1, dimsize);
// read data from accelerator
status = fDks.readData< complex<double> >(fComp_ptr, fOutDKS, size);
#else
fValid = false;
return;
#endif
}
// correct the phase for tstart != 0.0
// find the first bin >= fStartTime
@@ -649,12 +733,42 @@ void PFourier::Transform(UInt_t apodizationTag)
}
Double_t phase, re, im;
for (UInt_t i=0; i<fNoOfBins; i++) {
phase = 2.0*PI/(fTimeResolution*fNoOfBins) * i * shiftTime;
re = fOut[i][0] * cos(phase) + fOut[i][1] * sin(phase);
im = -fOut[i][0] * sin(phase) + fOut[i][1] * cos(phase);
fOut[i][0] = re;
fOut[i][1] = im;
if (fUseFFTW) {
for (UInt_t i=0; i<fNoOfBins; i++) {
phase = 2.0*PI/(fTimeResolution*fNoOfBins) * i * shiftTime;
re = fOut[i][0] * cos(phase) + fOut[i][1] * sin(phase);
im = -fOut[i][0] * sin(phase) + fOut[i][1] * cos(phase);
fOut[i][0] = re;
fOut[i][1] = im;
}
} else { // try DKS
UInt_t size=fNoOfBins/2+1;
for (UInt_t i=0; i<size; i++) {
phase = 2.0*PI/(fTimeResolution*fNoOfBins) * i * shiftTime;
#ifdef HAVE_DKS
re = fOutDKS[i].real() * cos(phase) + fOutDKS[i].imag() * sin(phase);
im = -fOutDKS[i].real() * sin(phase) + fOutDKS[i].imag() * cos(phase);
fOutDKS[i] = complex<double>(re, im);
#endif
}
}
}
//--------------------------------------------------------------------------
// SetUseFFTW
//--------------------------------------------------------------------------
/**
* <p>Set fUseFFTW flag. Checks if DKS support is in place before setting the flag.
*/
void PFourier::SetUseFFTW(const Bool_t flag)
{
if (flag == false) {
#ifndef HAVE_DKS
fUseFFTW = true;
std::cerr << std::endl << "PFouier::SetUseFFTW: **ERROR** DKS not in use, will fall back to FFTW" << std::endl << std::endl;
#else
fUseFFTW = flag;
#endif
}
}
@@ -684,11 +798,7 @@ void PFourier::Transform(UInt_t apodizationTag)
*/
Double_t PFourier::GetMaxFreq()
{
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
UInt_t noOfFourierBins = fNoOfBins/2+1;
return fResolution*noOfFourierBins;
}
@@ -740,11 +850,7 @@ TH1F* PFourier::GetRealFourier(const Double_t scale)
snprintf(name, sizeof(name), "%s_Fourier_Re", fData->GetName());
snprintf(title, sizeof(title), "%s_Fourier_Re", fData->GetTitle());
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
UInt_t noOfFourierBins = fNoOfBins/2+1;
TH1F *realFourier = new TH1F(name, title, static_cast<Int_t>(noOfFourierBins), -fResolution/2.0, static_cast<Double_t>(noOfFourierBins-1)*fResolution+fResolution/2.0);
if (realFourier == nullptr) {
@@ -754,9 +860,19 @@ TH1F* PFourier::GetRealFourier(const Double_t scale)
}
// fill realFourier vector
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
realFourier->SetBinContent(i+1, scale*fOut[i][0]);
realFourier->SetBinError(i+1, 0.0);
if (fUseFFTW) {
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
realFourier->SetBinContent(i+1, scale*fOut[i][0]);
realFourier->SetBinError(i+1, 0.0);
}
} else {
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
#ifdef HAVE_DKS
realFourier->SetBinContent(i+1, scale*fOutDKS[i].real());
#else
realFourier->SetBinContent(i+1, PMUSR_UNDEFINED);
#endif
}
}
return realFourier;
}
@@ -940,11 +1056,7 @@ TH1F* PFourier::GetImaginaryFourier(const Double_t scale)
snprintf(name, sizeof(name), "%s_Fourier_Im", fData->GetName());
snprintf(title, sizeof(title), "%s_Fourier_Im", fData->GetTitle());
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
UInt_t noOfFourierBins = fNoOfBins/2+1;
TH1F* imaginaryFourier = new TH1F(name, title, static_cast<Int_t>(noOfFourierBins), -fResolution/2.0, static_cast<Double_t>(noOfFourierBins-1)*fResolution+fResolution/2.0);
if (imaginaryFourier == nullptr) {
@@ -954,11 +1066,20 @@ TH1F* PFourier::GetImaginaryFourier(const Double_t scale)
}
// fill imaginaryFourier vector
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
imaginaryFourier->SetBinContent(i+1, scale*fOut[i][1]);
imaginaryFourier->SetBinError(i+1, 0.0);
if (fUseFFTW) {
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
imaginaryFourier->SetBinContent(i+1, scale*fOut[i][1]);
imaginaryFourier->SetBinError(i+1, 0.0);
}
} else {
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
#ifdef HAVE_DKS
imaginaryFourier->SetBinContent(i+1, scale*fOutDKS[i].imag());
#else
imaginaryFourier->SetBinContent(i+1, PMUSR_UNDEFINED);
#endif
}
}
return imaginaryFourier;
}
@@ -1010,11 +1131,7 @@ TH1F* PFourier::GetPowerFourier(const Double_t scale)
snprintf(name, sizeof(name), "%s_Fourier_Pwr", fData->GetName());
snprintf(title, sizeof(title), "%s_Fourier_Pwr", fData->GetTitle());
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
UInt_t noOfFourierBins = fNoOfBins/2+1;
TH1F* pwrFourier = new TH1F(name, title, static_cast<Int_t>(noOfFourierBins), -fResolution/2.0, static_cast<Double_t>(noOfFourierBins-1)*fResolution+fResolution/2.0);
if (pwrFourier == nullptr) {
@@ -1024,11 +1141,20 @@ TH1F* PFourier::GetPowerFourier(const Double_t scale)
}
// fill powerFourier vector
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
pwrFourier->SetBinContent(i+1, scale*sqrt(fOut[i][0]*fOut[i][0]+fOut[i][1]*fOut[i][1]));
pwrFourier->SetBinError(i+1, 0.0);
if (fUseFFTW) {
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
pwrFourier->SetBinContent(i+1, scale*sqrt(fOut[i][0]*fOut[i][0]+fOut[i][1]*fOut[i][1]));
pwrFourier->SetBinError(i+1, 0.0);
}
} else {
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
#ifdef HAVE_DKS
pwrFourier->SetBinContent(i+1, scale*sqrt(fOutDKS[i].real()*fOutDKS[i].real()+fOutDKS[i].imag()*fOutDKS[i].imag()));
#else
pwrFourier->SetBinContent(i+1, PMUSR_UNDEFINED);
#endif
}
}
return pwrFourier;
}
@@ -1082,11 +1208,7 @@ TH1F* PFourier::GetPhaseFourier(const Double_t scale)
snprintf(name, sizeof(name), "%s_Fourier_Phase", fData->GetName());
snprintf(title, sizeof(title), "%s_Fourier_Phase", fData->GetTitle());
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
UInt_t noOfFourierBins = fNoOfBins/2+1;
TH1F* phaseFourier = new TH1F(name, title, static_cast<Int_t>(noOfFourierBins), -fResolution/2.0, static_cast<Double_t>(noOfFourierBins-1)*fResolution+fResolution/2.0);
if (phaseFourier == nullptr) {
@@ -1097,18 +1219,31 @@ TH1F* PFourier::GetPhaseFourier(const Double_t scale)
// fill phaseFourier vector
Double_t value = 0.0;
Double_t re, im;
for (Int_t i=0; i<static_cast<Int_t>(noOfFourierBins); i++) {
if (fUseFFTW) {
re = fOut[i][0];
im = fOut[i][1];
} else {
#ifdef HAVE_DKS
re = fOutDKS[i].real();
im = fOutDKS[i].imag();
#else
re = 1.0;
im = 0.0;
#endif
}
// calculate the phase
if (fOut[i][0] == 0.0) {
if (fOut[i][1] >= 0.0)
if (re == 0) {
if (im >= 0.0)
value = PI_HALF;
else
value = -PI_HALF;
} else {
value = atan(fOut[i][1]/fOut[i][0]);
value = atan(re/im);
// check sector
if (fOut[i][0] < 0.0) {
if (fOut[i][1] > 0.0)
if (re < 0.0) {
if (im > 0.0)
value = PI + value;
else
value = PI - value;
@@ -1163,28 +1298,42 @@ void PFourier::PrepareFFTwInputData(UInt_t apodizationTag)
}
}
// find the bin of the start time
Int_t ival = static_cast<Int_t>(fStartTime/fTimeResolution) + t0bin;
UInt_t start = 0;
if (ival >= 0) {
UInt_t start = 1;
if (ival > 0) { // start time > 0
start = static_cast<UInt_t>(ival);
}
Double_t mean = 0.0;
if (fDCCorrected) {
for (UInt_t i=0; i<fNoOfData; i++) {
mean += fData->GetBinContent(static_cast<Int_t>(i+start));
for (UInt_t i=start; i<start+fNoOfData; i++) {
mean += fData->GetBinContent(static_cast<Int_t>(i));
}
mean /= static_cast<Double_t>(fNoOfData);
}
}
// 2nd fill fIn
for (UInt_t i=0; i<fNoOfData; i++) {
fIn[i][0] = fData->GetBinContent(static_cast<Int_t>(i+start)) - mean;
fIn[i][1] = 0.0;
}
for (UInt_t i=fNoOfData; i<fNoOfBins; i++) {
fIn[i][0] = 0.0;
fIn[i][1] = 0.0;
if (fUseFFTW) {
for (UInt_t i=0; i<fNoOfData; i++) {
fIn[i][0] = fData->GetBinContent(static_cast<Int_t>(i+start)) - mean;
fIn[i][1] = 0.0;
}
for (UInt_t i=fNoOfData; i<fNoOfBins; i++) {
fIn[i][0] = 0.0;
fIn[i][1] = 0.0;
}
} else {
for (UInt_t i=0; i<fNoOfData; i++) {
#ifdef HAVE_DKS
fInDKS[i] = fData->GetBinContent(static_cast<Int_t>(i+start)) - mean;
#endif
}
for (UInt_t i=fNoOfData; i<fNoOfBins; i++) {
#ifdef HAVE_DKS
fInDKS[i] = 0.0;
#endif
}
}
// 3rd apodize data (if wished)
@@ -1225,6 +1374,9 @@ void PFourier::PrepareFFTwInputData(UInt_t apodizationTag)
*/
void PFourier::ApodizeData(Int_t apodizationTag) {
if (apodizationTag == F_APODIZATION_NONE)
return;
const Double_t cweak[3] = { 0.384093, -0.087577, 0.703484 };
const Double_t cmedium[3] = { 0.152442, -0.136176, 0.983734 };
const Double_t cstrong[3] = { 0.045335, 0.554883, 0.399782 };
@@ -1265,6 +1417,12 @@ void PFourier::ApodizeData(Int_t apodizationTag) {
for (UInt_t j=1; j<5; j++) {
q += c[j] * pow(static_cast<Double_t>(i)/static_cast<Double_t>(fNoOfData), 2.0*static_cast<Double_t>(j));
}
fIn[i][0] *= q;
if (fUseFFTW) {
fIn[i][0] *= q;
} else {
#ifdef HAVE_DKS
fInDKS[i] *= q;
#endif
}
}
}
+12
View File
@@ -137,6 +137,18 @@ Bool_t PFunctionHandler::DoParse()
}
}
// for DKS, functions must be numbered consecutive
if (success) {
for (UInt_t i=0; i<fFuncs.size(); i++) {
if (fFuncs[i].GetFuncNo() != i+1) {
std::cerr << std::endl << "**ERROR**: for DKS, the function numbers need to be consecutive, sorry.";
std::cerr << std::endl;
success = false;
break;
}
}
}
return success;
}
+361 -1
View File
@@ -3973,7 +3973,6 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
}
}
// xy-data -----------------------------------------------
if (line.BeginsWith("xy-data", TString::kIgnoreCase)) {
@@ -6450,6 +6449,14 @@ Bool_t PMsrHandler::CheckMaps()
}
}
if (result == true) {
PIntVector *map = fRuns[0].GetMap();
fNoOfMaps = 0;
for (UInt_t i=0; i<map->size(); i++)
if (map->at(i) != 0)
fNoOfMaps++;
}
// clean up
mapVec.clear();
mapBlock.clear();
@@ -6852,6 +6859,359 @@ Bool_t PMsrHandler::EstimateN0()
return fStartupOptions->estimateN0;
}
//--------------------------------------------------------------------------
// GetDKSTheoryString (public)
//--------------------------------------------------------------------------
/**
* <p>returns the theory string in a c++ compatible string. This is needed
* for DKS/GPU.
*
* \return the theory in a c++ like string.
*/
std::string PMsrHandler::GetDKSTheoryString()
{
std::string result("");
PStringVector args;
TString tp = TString::Format("%.15lf", TMath::TwoPi());
TString ph = TString::Format("%.15lf", TMath::Pi() / 180.0);
for (UInt_t i=1; i<fTheory.size(); i++) { // start with 1, since fTheory[0].fLine == "THEORY"
if (i > 1) {
if (!fTheory[i-1].fLine.BeginsWith("+")) {
result += " * ";
}
}
HandleTheoryArguments(fTheory[i].fLine, args);
if (fTheory[i].fLine.BeginsWith("asymmetry ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("a ", TString::kIgnoreCase)) {
result += args[0].Data();
} else if (fTheory[i].fLine.BeginsWith("const ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("c ", TString::kIgnoreCase)) {
result += args[0].Data();
} else if (fTheory[i].fLine.BeginsWith("simplExpo ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("se ")) { // se -> se(t, lambda)
result += "se(t, ";
result += args[0].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("generExpo ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("ge ")) { // ge -> ge(t, lambda, beta)
result += "ge(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("simpleGss ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("sg ")) { // sg -> sg(t, sigma)
result += "sg(t, ";
result += args[0].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("statGssKT ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("stg ")) { // stg -> stg(t, sigma)
result += "stg(t, ";
result += args[0].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("statExpKT ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("sekt ")) { // sekt -> sekt(t, lambda)
result += "sekt(t, ";
result += args[0].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("combiLGKT ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("lgkt ")) { // lgkt -> lgkt(t, lambda, sigma)
result += "lgkt(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("strKT ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("skt ")) { // skt -> skt(t, sigma, beta)
result += "skt(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("spinGlass ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("spg ")) { // spg -> spg(t, lambda, gamma, q)
result += "spg(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("rdAnisoHf ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("rahf ")) { // rahf -> rahf(t, nu, lambda)
result += "rahf(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("TFieldCos ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("tf ")) { // tf -> tf(t, phi (°), nu (MHz))
result += "tf(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("internFld ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("if ")) { // if -> ifld(t, alpha, phi, nu, lambdaT, lambdaL)
result += "ifld(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ", ";
result += args[3].Data();
result += ", ";
result += args[4].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("internFldGK ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("ifgk ", TString::kIgnoreCase)) { // if -> ifgk(t, alpha, nu, lambdaT, lambdaL, beta)
result += "ifgk(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ", ";
result += args[3].Data();
result += ", ";
result += args[4].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("internFldLL ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("ifll ", TString::kIgnoreCase)) { // if -> ifll(t, alpha, nu, lambdaT, lambdaL, beta)
result += "ifll(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ", ";
result += args[3].Data();
result += ", ";
result += args[4].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("Bessel ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("b ")) { // b -> b(t, phi, nu)
result += "b(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("internBsl ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("ib ")) { // ib -> ib(t, alpha, phi, nu, lambdaT, lambdaL)
result += "ib(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ", ";
result += args[3].Data();
result += ", ";
result += args[4].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("abragam ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("ab ")) { // ab -> ab(t, sigma, gamma)
result += "ab(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("staticNKZF ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("snkzf ")) { // snkzf -> snkzf(t, Deltat0, Rb)
result += "snkzf(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("staticNKTF ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("snktf ")) { // snktf -> snktf(t, phi, nu, Delta0, Rb)
result += "snktf(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ", ";
result += args[3].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("dynamicNKZF ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("dnkzf ")) { // dnkzf -> dnkzf(t, Delta0, Rb, nu_c)
result += "dnkzf(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("dynamicNKTF ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("dnktf ")) { // dnktf -> dnktf(t, phi, nu, Delta0, Rb, nu_c)
result += "dnktf(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ", ";
result += args[3].Data();
result += ", ";
result += args[4].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("muMinusExpTF ", TString::kIgnoreCase) ||
fTheory[i].fLine.BeginsWith("mmsetf ")) { // mmsetf -> mmsetf(t, N0, tau, A, lambda, phi, nu)
result += "mmsetf(t, ";
result += args[0].Data();
result += ", ";
result += args[1].Data();
result += ", ";
result += args[2].Data();
result += ", ";
result += args[3].Data();
result += ", ";
result += args[4].Data();
result += ", ";
result += args[5].Data();
result += ")";
} else if (fTheory[i].fLine.BeginsWith("+")) {
result.erase(result.end()-3, result.end()); // remove the '*' at the end
result += " + ";
} else {
result = std::string("??"); // not yet available in DKS
break;
}
}
std::cout << "debug> ++++" << std::endl;
std::cout << "debug> " << result << std::endl;
std::cout << "debug> ++++" << std::endl;
return result;
}
//--------------------------------------------------------------------------
// GetDKSTag (public)
//--------------------------------------------------------------------------
/**
* <p> Checks the COMMAND block for DKS related tags. Currently the following
* tags are allowed:
* (i) OpenMP: which means run on the CPU with OpenMP
* (ii) Cuda: which means run on the GPU using Cuda
* (iii) OpenCL-CPU: which means run on the CPU with OpenCL
* (iv) OpenCL-GPU: which means run on the GPU with OpenCL
*
* @return DKS tag
*/
UInt_t PMsrHandler::GetDKSTag()
{
UInt_t count=0;
UInt_t tag = DKS_CPU_OPENMP;
TString last("");
for (UInt_t i=0; i<fCommands.size(); i++) {
if (fCommands[i].fLine.Contains("OpenMP", TString::kIgnoreCase)) {
count++;
tag = DKS_CPU_OPENMP;
last = "OpenMP";
} else if (fCommands[i].fLine.Contains("Cuda", TString::kIgnoreCase)) {
count++;
tag = DKS_GPU_CUDA;
last = "Cuda";
} else if (fCommands[i].fLine.Contains("OpenCL-CPU", TString::kIgnoreCase)) {
count++;
tag = DKS_CPU_OPENCL;
last = "OpenCL-CPU";
} else if (fCommands[i].fLine.Contains("OpenCL-GPU", TString::kIgnoreCase)) {
count++;
tag = DKS_GPU_OPENCL;
last = "OpenCL-GPU";
}
}
if (count > 1) {
std::cerr << ">> PMsrHandler::GetDKSTag(): **WARNING** found multiple DKS tags, will use the last one found: '" << last.Data() << "'" << std::endl;
}
return tag;
}
//--------------------------------------------------------------------------
// HandleTheoryArguments (private)
//--------------------------------------------------------------------------
/**
* <p>tokenizes the theory function arguments and transforms them for DKS
*
* \param theo
* \param args vector of the transformed arguments
*/
void PMsrHandler::HandleTheoryArguments(const TString theo, PStringVector &args)
{
TObjArray *tok=theo.Tokenize(" \t");
TObjString *ostr=0;
TString str, argStr;
Int_t ival;
args.clear(); // make sure vector is empty
if (tok == 0) {
std::cerr << ">> PMsrHandler::HandleTheoryArguments(): **ERROR** couldn't tokensize '" << theo << "'" << std::endl;
return;
}
for (Int_t i=0; i<tok->GetEntries(); i++) {
ostr = dynamic_cast<TObjString*>(tok->At(i));
str = ostr->GetString();
if (str.BeginsWith("#") || str.BeginsWith("(")) { // comment or description
continue;
} else if (str.IsDigit()) { // parameter
ival = str.Atoi();
ival -= 1;
str = TString::Format("%d",ival);
argStr = "p["+ str +"]";
args.push_back(argStr);
} else if (str.BeginsWith("map", TString::kIgnoreCase)) { // map
str.Remove(0,3);
if (!str.IsDigit()) {
return;
}
ival = str.Atoi();
ival -= 1;
str = TString::Format("%d",ival);
argStr = "p[m[" + str + "]]";
args.push_back(argStr);
} else if (str.BeginsWith("fun", TString::kIgnoreCase)) { // function
str.Remove(0,3);
if (!str.IsDigit()) {
return;
}
ival = str.Atoi();
ival -= 1;
str = TString::Format("%d",ival);
argStr = "f[" + str + "]";
args.push_back(argStr);
}
}
// clean up
delete tok;
}
//--------------------------------------------------------------------------
// NeededPrecision (private)
//--------------------------------------------------------------------------
+3 -3
View File
@@ -733,9 +733,9 @@ PRawRunDataSet* PRawRunData::GetDataSet(const UInt_t idx, Bool_t wantHistoNo)
*/
const Bool_t PRawRunData::DeadTimeCorrectionReady()
{
if ((fNumberOfGoodFrames > 0) && (fDeadTimeParam.size() > 0))
return true;
return false;
if ((fNumberOfGoodFrames > 0) && (fDeadTimeParam.size() > 0))
return true;
return false;
}
//--------------------------------------------------------------------------
+17 -10
View File
@@ -141,6 +141,8 @@ PMusrCanvas::PMusrCanvas()
{
fTimeout = 0;
fStartWithFourier = false;
fUseDKS = false;
fScaleN0AndBkg = true;
fValid = false;
fAveragedView = false;
@@ -204,10 +206,10 @@ PMusrCanvas::PMusrCanvas()
*/
PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
const Bool_t batch, const Bool_t fourier, const Bool_t avg,
const Bool_t theoAsData) :
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg),
fBatchMode(batch), fPlotNumber(number)
const Bool_t batch, const Bool_t fourier, const Bool_t avg,
const Bool_t theoAsData, const Bool_t useDKS) :
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg),
fUseDKS(useDKS), fBatchMode(batch), fPlotNumber(number)
{
fTimeout = 0;
fAveragedView = false;
@@ -272,10 +274,10 @@ PMusrCanvas::PMusrCanvas(const Int_t number, const Char_t* title,
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
PMsrFourierStructure fourierDefault,
const PIntVector markerList, const PIntVector colorList,
const Bool_t batch, const Bool_t fourier, const Bool_t avg,
const Bool_t theoAsData) :
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg), fBatchMode(batch),
fPlotNumber(number), fFourier(fourierDefault),
const Bool_t batch, const Bool_t fourier, const Bool_t avg,
const Bool_t theoAsData, const Bool_t useDKS) :
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg), fUseDKS(useDKS),
fBatchMode(batch), fPlotNumber(number), fFourier(fourierDefault),
fMarkerList(markerList), fColorList(colorList)
{
fTimeout = 0;
@@ -3390,12 +3392,17 @@ void PMusrCanvas::HandleFourier()
fData[i].dataFourierPhase->SetMarkerStyle(fData[i].data->GetMarkerStyle());
// calculate fourier transform of the theory
Bool_t useFFTW = true;
PFourier *fourierTheory = nullptr;
if (fTheoAsData) { // theory only at the data points
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, fFourier.fFourierPower);
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, fFourier.fFourierPower, useFFTW);
} else {
Int_t powerPad = fFourier.fFourierPower+5; // +5 means 8 times more points on theo (+3) + 4 times more points in fourier (+2)
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, powerPad);
#ifdef HAVE_DKS
if ((powerPad >= 20) && fUseDKS)
useFFTW = false; // i.e. use DKS
#endif
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, powerPad, useFFTW);
}
if (!fourierTheory->IsValid()) {
std::cerr << std::endl << ">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier theory ..." << std::endl;
+79 -79
View File
@@ -2193,98 +2193,98 @@ Bool_t PRunDataHandler::ReadRootFile()
Bool_t PRunDataHandler::ReadNexusFile()
{
#ifdef PNEXUS_ENABLED
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Will read nexus file " << fRunPathName.Data() << " ...";
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Will read nexus file " << fRunPathName.Data() << " ...";
nxs::HDFType type = nxs::checkHDFType(fRunPathName.Data());
nxs::HDFType type = nxs::checkHDFType(fRunPathName.Data());
// check for type errors, missing enabled HDF4
switch (type) {
case nxs::HDFType::HDF4:
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF4 file." << std::endl;
// check for type errors, missing enabled HDF4
switch (type) {
case nxs::HDFType::HDF4:
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF4 file." << std::endl;
#ifndef HAVE_HDF4
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): **ERROR**, HDF4 is not enabled." << std::endl;
return false;
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): **ERROR**, HDF4 is not enabled." << std::endl;
return false;
#endif
break;
case nxs::HDFType::HDF5:
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF5 file." << std::endl;
break;
case nxs::HDFType::Unknown:
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file." << std::endl;
return false;
}
break;
case nxs::HDFType::HDF5:
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF5 file." << std::endl;
break;
case nxs::HDFType::Unknown:
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file." << std::endl;
return false;
}
PDoubleVector histoData;
PRawRunData runData;
PRawRunDataSet dataSet;
TString str;
std::string sstr;
Int_t ival, idf{-1};
Double_t dval, factor;
bool ok;
PDoubleVector histoData;
PRawRunData runData;
PRawRunDataSet dataSet;
TString str;
std::string sstr;
Int_t ival, idf{-1};
Double_t dval, factor;
bool ok;
if (type == nxs::HDFType::HDF4) {
if (type == nxs::HDFType::HDF4) {
#ifdef HAVE_HDF4
std::unique_ptr<nxH4::PNeXus> nxs_file = std::make_unique<nxH4::PNeXus>(fRunPathName.Data());
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH4::PNeXus object failed." << std::endl;
return true;
}
std::unique_ptr<nxH4::PNeXus> nxs_file = std::make_unique<nxH4::PNeXus>(fRunPathName.Data());
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH4::PNeXus object failed." << std::endl;
return true;
}
// check for IDF_version
if (nxs_file->HasDataset("/run/IDF_version")) {
idf = nxs_file->GetDataset<int>("/run/IDF_version").GetData()[0];
std::cout << ">> PRunDataHandler::ReadNexusFile(): IDF V" << idf << std::endl;
}
if (idf == -1) { // IDF_version not found
if (nxs_file->HasDataset("/raw_data_1/IDF_version")) {
idf = nxs_file->GetDataset<int>("/raw_data_1/IDF_version").GetData()[0];
// check for IDF_version
if (nxs_file->HasDataset("/run/IDF_version")) {
idf = nxs_file->GetDataset<int>("/run/IDF_version").GetData()[0];
std::cout << ">> PRunDataHandler::ReadNexusFile(): IDF V" << idf << std::endl;
}
}
if ((idf != 1) && (idf != 2)) {
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): a NeXus file with an invalid IDF V" << idf << std::endl;
return false;
}
if (idf == 1) { // HDF4 IDF V1
if (!ReadNexusFileIdf1(nxs_file))
if (idf == -1) { // IDF_version not found
if (nxs_file->HasDataset("/raw_data_1/IDF_version")) {
idf = nxs_file->GetDataset<int>("/raw_data_1/IDF_version").GetData()[0];
std::cout << ">> PRunDataHandler::ReadNexusFile(): IDF V" << idf << std::endl;
}
}
if ((idf != 1) && (idf != 2)) {
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): a NeXus file with an invalid IDF V" << idf << std::endl;
return false;
} else { // HDF4 IDF V2
// not yet implemented
}
}
if (idf == 1) { // HDF4 IDF V1
if (!ReadNexusFileIdf1(nxs_file))
return false;
} else { // HDF4 IDF V2
// not yet implemented
}
#endif
} else { // HDF5
std::unique_ptr<nxH5::PNeXus> nxs_file = std::make_unique<nxH5::PNeXus>(fRunPathName.Data());
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH5::PNeXus object failed." << std::endl;
return true;
}
} else { // HDF5
std::unique_ptr<nxH5::PNeXus> nxs_file = std::make_unique<nxH5::PNeXus>(fRunPathName.Data());
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH5::PNeXus object failed." << std::endl;
return true;
}
// check for IDF_version
if (nxs_file->HasDataset("/run/IDF_version")) {
idf = nxs_file->GetDataset<int>("/run/IDF_version").GetData()[0];
std::cout << ">> PRunDataHandler::ReadNexusFile(): IDF V" << idf << std::endl;
}
if (idf == -1) { // IDF_version not found
if (nxs_file->HasDataset("/raw_data_1/IDF_version")) {
idf = nxs_file->GetDataset<int>("/raw_data_1/IDF_version").GetData()[0];
// check for IDF_version
if (nxs_file->HasDataset("/run/IDF_version")) {
idf = nxs_file->GetDataset<int>("/run/IDF_version").GetData()[0];
std::cout << ">> PRunDataHandler::ReadNexusFile(): IDF V" << idf << std::endl;
}
}
if ((idf != 1) && (idf != 2)) {
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): a NeXus file with an invalid IDF V" << idf << std::endl;
return false;
}
if (idf == -1) { // IDF_version not found
if (nxs_file->HasDataset("/raw_data_1/IDF_version")) {
idf = nxs_file->GetDataset<int>("/raw_data_1/IDF_version").GetData()[0];
std::cout << ">> PRunDataHandler::ReadNexusFile(): IDF V" << idf << std::endl;
}
}
if ((idf != 1) && (idf != 2)) {
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): a NeXus file with an invalid IDF V" << idf << std::endl;
return false;
}
if (idf == 1) { // HDF5 IDF V1
if (!ReadNexusFileIdf1(nxs_file))
return false;
} else { // HDF5 IDF V2
if (!ReadNexusFileIdf2(nxs_file))
return false;
if (idf == 1) { // HDF5 IDF V1
if (!ReadNexusFileIdf1(nxs_file))
return false;
} else { // HDF5 IDF V2
if (!ReadNexusFileIdf2(nxs_file))
return false;
}
}
}
#else
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
#endif
@@ -4846,9 +4846,9 @@ Bool_t PRunDataHandler::WriteNexusFile(TString format, TString fln)
// set program name
nxs->AddDataset<std::string>("/run/program_name", {"any2many"}, {1}, nxH4::H4DataType::kCHAR8);
str="n/a";
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
str = PACKAGE_VERSION;
#endif
#endif
nxs->AddDatasetAttribute<std::string>("/run/program_name", "version", str);
// set run number
@@ -5220,9 +5220,9 @@ Bool_t PRunDataHandler::WriteNexusFile(TString format, TString fln)
// set program name
nxs->AddDataset<std::string>("/run/program_name", {"any2many"}, {1}, H5::StrType(H5::PredType::C_S1, H5T_VARIABLE));
str="n/a";
#ifdef HAVE_CONFIG_H
#ifdef HAVE_CONFIG_H
str = PACKAGE_VERSION;
#endif
#endif
nxs->AddDatasetAttribute<std::string>("/run/program_name", "version", str);
// set run number
+311 -12
View File
@@ -498,6 +498,7 @@ Double_t PRunListCollection::GetNonMusrChisq(const std::vector<Double_t>& par) c
//--------------------------------------------------------------------------
/**
* <p>Calculates expected chi-square of the run block index idx of a msr-file.
* Currently this is only possible for Single Histo, and Mu Minus fits.
*
* <b>return:</b>
* - expected chi-square of for a single run block
@@ -527,7 +528,6 @@ Double_t PRunListCollection::GetSingleRunChisqExpected(const std::vector<Double_
}
}
// return the chisq of the single run
switch (type) {
case PRUN_SINGLE_HISTO:
@@ -548,9 +548,6 @@ Double_t PRunListCollection::GetSingleRunChisqExpected(const std::vector<Double_
case PRUN_MU_MINUS:
expectedChisq = fRunMuMinusList[subIdx]->CalcChiSquareExpected(par);
break;
case PRUN_NON_MUSR:
expectedChisq = fRunNonMusrList[subIdx]->CalcChiSquareExpected(par);
break;
default:
break;
}
@@ -886,17 +883,17 @@ UInt_t PRunListCollection::GetNoOfBinsFitted(const UInt_t idx) const
return result;
}
UInt_t subIdx = 0;
Int_t type = fMsrInfo->GetMsrRunList()->at(idx).GetFitType();
if (type == -1) { // i.e. not found in the RUN block, try the GLOBAL block
type = fMsrInfo->GetMsrGlobal()->GetFitType();
subIdx = idx;
} else { // found in the RUN block
// count how many entries of this fit-type are present up to idx
for (UInt_t i=0; i<idx; i++) {
if (fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type)
subIdx++;
}
}
// count how many entries of this fit-type are present up to idx
UInt_t subIdx = 0;
for (UInt_t i=0; i<idx; i++) {
if ((fMsrInfo->GetMsrRunList()->at(i).GetFitType() == type) ||
(fMsrInfo->GetMsrRunList()->at(i).GetFitType() == -1)) // the -1 is needed if there is a global section
subIdx++;
}
// return the chisq of the single run
@@ -1394,3 +1391,305 @@ const Char_t* PRunListCollection::GetYAxisTitle(const TString &runName, const UI
return result;
}
//--------------------------------------------------------------------------
// GetStartTimeBin (public)
//--------------------------------------------------------------------------
/**
* @brief PRunListCollection::GetStartTimeBin
* @param fitType
* @param idx
* @return
*/
Int_t PRunListCollection::GetStartTimeBin(Int_t fitType, UInt_t idx)
{
Int_t result = -1;
switch (fitType) {
case MSR_FITTYPE_SINGLE_HISTO:
if (idx < fRunSingleHistoList.size())
result = fRunSingleHistoList[idx]->GetStartTimeBin();
break;
case MSR_FITTYPE_ASYM:
if (idx < fRunAsymmetryList.size())
result = fRunAsymmetryList[idx]->GetStartTimeBin();
break;
case MSR_FITTYPE_MU_MINUS:
if (idx < fRunMuMinusList.size())
result = fRunMuMinusList[idx]->GetStartTimeBin();
break;
default:
break;
}
return result;
}
//--------------------------------------------------------------------------
// GetEndTimeBin (public)
//--------------------------------------------------------------------------
/**
* @brief PRunListCollection::GetEndTimeBin
* @param fitType
* @param idx
* @return
*/
Int_t PRunListCollection::GetEndTimeBin(Int_t fitType, UInt_t idx)
{
Int_t result = -1;
switch (fitType) {
case MSR_FITTYPE_SINGLE_HISTO:
if (idx < fRunSingleHistoList.size())
result = fRunSingleHistoList[idx]->GetEndTimeBin();
break;
case MSR_FITTYPE_ASYM:
if (idx < fRunAsymmetryList.size())
result = fRunAsymmetryList[idx]->GetEndTimeBin();
break;
case MSR_FITTYPE_MU_MINUS:
if (idx < fRunMuMinusList.size())
result = fRunMuMinusList[idx]->GetEndTimeBin();
break;
default:
break;
}
return result;
}
//--------------------------------------------------------------------------
// GetSingleHistoParams (public)
//--------------------------------------------------------------------------
/**
* @brief PRunListCollection::GetSingleHistoParams
* @param idx
* @param par
* @param shp
* @return
*/
Int_t PRunListCollection::GetSingleHistoParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp)
{
Int_t ierr = 0;
// make sure idx is within proper bounds
if (idx >= fRunSingleHistoList.size())
return 1;
// init param
InitDKSParams(dksp);
// get flag if scaling of N0 and Nbkg is wished
dksp.fScaleN0AndBkg = fRunSingleHistoList[idx]->GetScaleN0AndBkg();
// get the meta data needed to calculate the functions
PMetaData metaData = fRunSingleHistoList[idx]->GetMetaData();
// check if norm is a parameter or a function
PMsrRunBlock runInfo = fMsrInfo->GetMsrRunList()->at(idx);
if (runInfo.GetNormParamNo() < MSR_PARAM_FUN_OFFSET) { // norm is a parameter
dksp.fN0 = par[runInfo.GetNormParamNo()-1];
} else { // norm is a function
// get function number
UInt_t funNo = runInfo.GetNormParamNo()-MSR_PARAM_FUN_OFFSET;
// evaluate function
dksp.fN0 = fMsrInfo->EvalFunc(funNo, *runInfo.GetMap(), par, metaData);
}
// get tau
if (runInfo.GetLifetimeParamNo() != -1)
dksp.fTau = par[runInfo.GetLifetimeParamNo()-1];
else
dksp.fTau = PMUON_LIFETIME;
// get background
if (runInfo.GetBkgFitParamNo() == -1) { // bkg not fitted
if (runInfo.GetBkgFix(0) == PMUSR_UNDEFINED) { // no fixed background given (background interval)
dksp.fNbkg = GetBackground(idx);
} else { // fixed bkg given
dksp.fNbkg = runInfo.GetBkgFix(0);
}
} else { // bkg fitted
dksp.fNbkg = par[runInfo.GetBkgFitParamNo()-1];
}
// get packed time resolution
dksp.fPackedTimeResolution = fRunSingleHistoList[idx]->GetData()->GetDataTimeStep();
// get start time
// fRunSingleHistoList[idx]->GetData()->GetDataTimeStart() : time of fgb, which is 0-bin of the fit-data-set
// fRunSingleHistoList[idx]->GetStartTimeBin() * dksp.fPackedTimeResolution : time-offset from fgb-time to fit start time
dksp.fStartTime = fRunSingleHistoList[idx]->GetData()->GetDataTimeStart() + fRunSingleHistoList[idx]->GetStartTimeBin() * dksp.fPackedTimeResolution;
// get number of bins fitted
dksp.fNoOfFitBins = fRunSingleHistoList[idx]->GetNoOfFitBins();
// calculate functions
Int_t funcNo = 0;
for (Int_t i=0; i<fMsrInfo->GetNoOfFuncs(); i++) {
funcNo = fMsrInfo->GetFuncNo(i);
dksp.fFun.push_back(fMsrInfo->EvalFunc(funcNo, *runInfo.GetMap(), par, metaData));
}
// get map vector
dksp.fMap = *runInfo.GetMap();
dksp.fMap.erase(dksp.fMap.begin()+GetNoOfMaps(), dksp.fMap.end());
// need to reduce map indexes by 1 since in C/C++ arrays start at 0
for (UInt_t i=0; i<dksp.fMap.size(); i++)
dksp.fMap[i] -= 1;
return ierr;
}
//--------------------------------------------------------------------------
// GetAsymmetryParams (public)
//--------------------------------------------------------------------------
/**
* @brief PRunListCollection::GetAsymmetryParams
* @param idx
* @param par
* @param shp
* @return
*/
Int_t PRunListCollection::GetAsymmetryParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp)
{
Int_t ierr=0, ival=0;
// make sure idx is within proper bounds
if (idx >= fRunAsymmetryList.size())
return 1;
// init param
InitDKSParams(dksp);
// get the meta data needed to calculate the functions
PMetaData metaData = fRunAsymmetryList[idx]->GetMetaData();
// get alpha
PMsrRunBlock runInfo = fMsrInfo->GetMsrRunList()->at(idx);
ival = runInfo.GetAlphaParamNo();
if (ival > 0)
dksp.fAlpha = par[ival-1];
// get beta
ival = runInfo.GetBetaParamNo();
if (ival > 0)
dksp.fBeta = par[ival-1];
// get packed time resolution
dksp.fPackedTimeResolution = fRunAsymmetryList[idx]->GetData()->GetDataTimeStep();
// get start time
// fRunAsymmetryList[idx]->GetData()->GetDataTimeStart() : time of fgb, which is 0-bin of the fit-data-set
// fRunAsymmetryList[idx]->GetStartTimeBin() * dksp.fPackedTimeResolution : time-offset from fgb-time to fit start time
dksp.fStartTime = fRunAsymmetryList[idx]->GetData()->GetDataTimeStart() + fRunAsymmetryList[idx]->GetStartTimeBin() * dksp.fPackedTimeResolution;
// get number of bins fitted
dksp.fNoOfFitBins = fRunAsymmetryList[idx]->GetNoOfFitBins();
// calculate functions
Int_t funcNo = 0;
for (Int_t i=0; i<fMsrInfo->GetNoOfFuncs(); i++) {
funcNo = fMsrInfo->GetFuncNo(i);
dksp.fFun.push_back(fMsrInfo->EvalFunc(funcNo, *runInfo.GetMap(), par, metaData));
}
// get map vector
dksp.fMap = *runInfo.GetMap();
dksp.fMap.erase(dksp.fMap.begin()+GetNoOfMaps(), dksp.fMap.end());
// need to reduce map indexes by 1 since in C/C++ arrays start at 0
for (UInt_t i=0; i<dksp.fMap.size(); i++)
dksp.fMap[i] -= 1;
return ierr;
}
//--------------------------------------------------------------------------
// GetMuMinusParams (public)
//--------------------------------------------------------------------------
/**
* @brief PRunListCollection::GetMuMinusParams
* @param idx
* @param par
* @param shp
* @return
*/
Int_t PRunListCollection::GetMuMinusParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp)
{
Int_t ierr = 0;
// make sure idx is within proper bounds
if (idx >= fRunMuMinusList.size())
return 1;
// get run block
PMsrRunBlock runInfo = fMsrInfo->GetMsrRunList()->at(idx);
// get the meta data needed to calculate the functions
PMetaData metaData = fRunMuMinusList[idx]->GetMetaData();
// init param
InitDKSParams(dksp);
// get packed time resolution
dksp.fPackedTimeResolution = fRunMuMinusList[idx]->GetData()->GetDataTimeStep();
// get start time
// fRunSingleHistoList[idx]->GetData()->GetDataTimeStart() : time of fgb, which is 0-bin of the fit-data-set
// fRunSingleHistoList[idx]->GetStartTimeBin() * dksp.fPackedTimeResolution : time-offset from fgb-time to fit start time
dksp.fStartTime = fRunMuMinusList[idx]->GetData()->GetDataTimeStart() + fRunMuMinusList[idx]->GetStartTimeBin() * dksp.fPackedTimeResolution;
// get number of bins fitted
dksp.fNoOfFitBins = fRunMuMinusList[idx]->GetNoOfFitBins();
// calculate functions
Int_t funcNo = 0;
for (Int_t i=0; i<fMsrInfo->GetNoOfFuncs(); i++) {
funcNo = fMsrInfo->GetFuncNo(i);
dksp.fFun.push_back(fMsrInfo->EvalFunc(funcNo, *runInfo.GetMap(), par, metaData));
}
// get map vector
dksp.fMap = *runInfo.GetMap();
dksp.fMap.erase(dksp.fMap.begin()+GetNoOfMaps(), dksp.fMap.end());
// need to reduce map indexes by 1 since in C/C++ arrays start at 0
for (UInt_t i=0; i<dksp.fMap.size(); i++)
dksp.fMap[i] -= 1;
return ierr;
}
//--------------------------------------------------------------------------
// InitDKSParams (private)
//--------------------------------------------------------------------------
/**
* \brief PRunListCollection::InitDKSParams
* \param param
*/
void PRunListCollection::InitDKSParams(PDKSParams &param)
{
param.fScaleN0AndBkg = false;
param.fN0 = -1.0;
param.fNbkg = -1.0;
param.fTau = -1.0;
param.fAlpha = 1.0;
param.fBeta = 1.0;
param.fPackedTimeResolution = -1.0;
param.fStartTime = -1.0;
param.fNoOfFitBins = -1;
param.fFun.clear();
param.fMap.clear();
}
//--------------------------------------------------------------------------
// GetBackground (private)
//--------------------------------------------------------------------------
/**
* @brief PRunListCollection::GetBackground
* @param idx
* @return
*/
Double_t PRunListCollection::GetBackground(Int_t idx)
{
// make sure idx is within proper bounds
if (idx >= (Int_t)fRunSingleHistoList.size())
return 0.0;
return fRunSingleHistoList[idx]->GetBackground();
}
+13
View File
@@ -291,6 +291,10 @@ void PStartupHandler::OnStartDocument()
fFourierDefaults.fPlotRange[0] = -1.0;
fFourierDefaults.fPlotRange[1] = -1.0;
fFourierDefaults.fPhaseIncrement = 1.0;
fStartupOptions.writeExpectedChisq = false; // NOT defined in the XML, but initialized for later use!!
fStartupOptions.estimateN0 = false; // NOT defined in the XML, but initialized for later use!!
fStartupOptions.useDKS = false;
}
//--------------------------------------------------------------------------
@@ -350,6 +354,8 @@ void PStartupHandler::OnStartElement(const Char_t *str, const TList *attributes)
{
if (!strcmp(str, "data_path")) {
fKey = eDataPath;
} else if (!strcmp(str, "use_dks")) {
fKey = eUseDKS;
} else if (!strcmp(str, "run_name_template")) {
fKey = eRunNameTemplate;
TXMLAttr *attr;
@@ -463,6 +469,11 @@ void PStartupHandler::OnCharacters(const Char_t *str)
// add str to the path list
fDataPathList.push_back(str);
break;
case eUseDKS:
tstr = TString(str);
if (tstr.BeginsWith("y") || tstr.BeginsWith("Y"))
fStartupOptions.useDKS = true;
break;
case eRunNameTemplate:
tmpl.instrument = fCurrentInstrumentName;
tmpl.runNameTemplate = str;
@@ -940,6 +951,8 @@ Bool_t PStartupHandler::WriteDefaultStartupFile(bool reset_startup_file)
fout << " <comment>" << std::endl;
fout << " Defines default settings for the musrfit package" << std::endl;
fout << " </comment>" << std::endl;
fout << " <!-- the use_dks flag is only for the GPU Fourier support, not the fitting -->" << std::endl;
fout << " <use_dks>no</use_dks>" << std::endl;
fout << " <data_path>/psi.ch/group/lmu/public/data/lem/his</data_path>" << std::endl;
fout << " <data_path>/psi.ch/group/lmu/public/data/alc/his</data_path>" << std::endl;
fout << " <data_path>/psi.ch/group/lmu/public/data/dolly/his</data_path>" << std::endl;
+25 -25
View File
@@ -382,42 +382,42 @@ int dump_header_root(const std::string fileName, const bool summary, const bool
int dump_header_nexus(const std::string fileName, const bool counts) {
#ifdef PNEXUS_ENABLED
nxs::HDFType type = nxs::checkHDFType(fileName);
nxs::HDFType type = nxs::checkHDFType(fileName);
// check for type errors, missing enabled HDF4
switch (type) {
// check for type errors, missing enabled HDF4
switch (type) {
case nxs::HDFType::HDF4:
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF4 file." << std::endl;
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF4 file." << std::endl;
#ifndef HAVE_HDF4
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): **ERROR**, HDF4 is not enabled." << std::endl;
return 1;
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): **ERROR**, HDF4 is not enabled." << std::endl;
return 1;
#endif
break;
break;
case nxs::HDFType::HDF5:
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF5 file." << std::endl;
break;
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF5 file." << std::endl;
break;
case nxs::HDFType::Unknown:
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file." << std::endl;
return 1;
}
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file." << std::endl;
return 1;
}
if (type == nxs::HDFType::HDF4) {
if (type == nxs::HDFType::HDF4) {
#ifdef HAVE_HDF4
std::unique_ptr<nxH4::PNeXus> nxs_file = std::make_unique<nxH4::PNeXus>(fileName);
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH4::PNeXus object failed." << std::endl;
}
nxs_file->Dump();
std::unique_ptr<nxH4::PNeXus> nxs_file = std::make_unique<nxH4::PNeXus>(fileName);
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH4::PNeXus object failed." << std::endl;
}
nxs_file->Dump();
#endif
} else { // HDF5
std::unique_ptr<nxH5::PNeXus> nxs_file = std::make_unique<nxH5::PNeXus>(fileName);
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH5::PNeXus object failed." << std::endl;
} else { // HDF5
std::unique_ptr<nxH5::PNeXus> nxs_file = std::make_unique<nxH5::PNeXus>(fileName);
if (nxs_file == nullptr) {
std::cerr << std::endl << "**ERROR** allocation of nxH5::PNeXus object failed." << std::endl;
}
nxs_file->Dump();
}
nxs_file->Dump();
}
#else
std::cout << std::endl << "NeXus not enabled, hence the header information cannot be dumped." << std::endl << std::endl;
std::cout << std::endl << "NeXus not enabled, hence the header information cannot be dumped." << std::endl << std::endl;
#endif
return 0;
-31
View File
@@ -45,7 +45,6 @@
#define SEED 0
#define STATEFILE NULL
//-----------------------------------------------------------------------------
std::vector<double> TPointPWaveGapIntegralCuhre::fPar;
@@ -224,7 +223,6 @@ int TLinePWaveGapIntegralCuhre::Integrand_cc(const int *ndim, const double x[],
std::vector<double> TDWaveGapIntegralCuhre::fPar; ///< Static parameter vector for d-wave integrand
//-----------------------------------------------------------------------------
/**
* @brief Integrate the function using the Cuhre interface for d-wave symmetry.
*
@@ -254,7 +252,6 @@ double TDWaveGapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* @brief Calculate the function value for the use with Cuhre---actual implementation of the function
* for d-wave symmetry.
@@ -276,11 +273,8 @@ int TDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TCosSqDWaveGapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -311,7 +305,6 @@ double TCosSqDWaveGapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -332,11 +325,8 @@ int TCosSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TSinSqDWaveGapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -367,7 +357,6 @@ double TSinSqDWaveGapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -388,11 +377,8 @@ int TSinSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TAnSWaveGapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -423,7 +409,6 @@ double TAnSWaveGapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -444,11 +429,8 @@ int TAnSWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TAnSWaveGapIntegralDivonne::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Divonne interface
*
@@ -487,7 +469,6 @@ double TAnSWaveGapIntegralDivonne::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Divonne---actual implementation of the function
*
@@ -508,11 +489,8 @@ int TAnSWaveGapIntegralDivonne::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TAnSWaveGapIntegralSuave::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Suave interface
*
@@ -545,7 +523,6 @@ double TAnSWaveGapIntegralSuave::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Suave---actual implementation of the function
*
@@ -566,11 +543,8 @@ int TAnSWaveGapIntegralSuave::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TNonMonDWave1GapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -601,7 +575,6 @@ double TNonMonDWave1GapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -622,11 +595,8 @@ int TNonMonDWave1GapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TNonMonDWave2GapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -657,7 +627,6 @@ double TNonMonDWave2GapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
+14 -37
View File
@@ -48,7 +48,6 @@
#include <vector>
#include <memory>
//-----------------------------------------------------------------------------
/**
* @class T2Integrator
* @brief Alternative base class for 1D integrations using the GNU Scientific Library integrator.
@@ -71,7 +70,6 @@ class T2Integrator {
static double FuncAtXgsl(double, void *);
};
//-----------------------------------------------------------------------------
/**
* <p>Method for passing the integrand function value to the integrator.
*
@@ -87,7 +85,6 @@ inline double T2Integrator::FuncAtXgsl(double x, void *ptrPair)
return pairOfPointers->first->FuncAtX(x, *(pairOfPointers->second));
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the integral of the function between the given boundaries
*
@@ -110,7 +107,20 @@ inline double T2Integrator::IntegrateFunc(double x1, double x2, const std::vecto
return value;
}
//-----------------------------------------------------------------------------
/**
* @class TIntegrator
* @brief Base class for 1D integrations using the GNU Scientific Library integrator.
@@ -136,7 +146,6 @@ class TIntegrator {
mutable double (*fFunc)(double, void *); ///< pointer to the integrand function
};
//-----------------------------------------------------------------------------
/**
* <p>Constructor of the base class for 1D integrations
* Allocation of memory for an integration using the adaptive 31 point Gauss-Kronrod rule
@@ -145,7 +154,6 @@ inline TIntegrator::TIntegrator() : fFunc(0) {
fIntegrator = std::make_unique<ROOT::Math::GSLIntegrator>(ROOT::Math::Integration::kADAPTIVE,ROOT::Math::Integration::kGAUSS31);
}
//-----------------------------------------------------------------------------
/**
* <p>Destructor of the base class for 1D integrations
* Clean up.
@@ -155,7 +163,6 @@ inline TIntegrator::~TIntegrator(){
fFunc=0;
}
//-----------------------------------------------------------------------------
/**
* <p>Method for passing the integrand function value to the integrator.
*
@@ -170,7 +177,6 @@ inline double TIntegrator::FuncAtXgsl(double x, void *obj)
return ((TIntegrator*)obj)->FuncAtX(x);
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the integral of the function between the given boundaries
*
@@ -186,7 +192,6 @@ inline double TIntegrator::IntegrateFunc(double x1, double x2)
return fIntegrator->Integral(fFunc, (this), x1, x2);
}
//-----------------------------------------------------------------------------
/**
* @class TMCIntegrator
* @brief Base class for multidimensional Monte-Carlo integrations using the GNU Scientific Library integrator.
@@ -213,7 +218,6 @@ class TMCIntegrator {
mutable double (*fFunc)(double *, size_t, void *); ///< pointer to the integrand function
};
//-----------------------------------------------------------------------------
/**
* <p>Constructor of the base class for multidimensional Monte-Carlo integrations
* Allocation of memory for an integration using the MISER algorithm of Press and Farrar
@@ -222,7 +226,6 @@ inline TMCIntegrator::TMCIntegrator() : fFunc(0) {
fMCIntegrator = std::make_unique<ROOT::Math::GSLMCIntegrator>(ROOT::Math::MCIntegration::kMISER, 1.E-6, 1.E-4, 500000);
}
//-----------------------------------------------------------------------------
/**
* <p>Destructor of the base class for 1D integrations
* Clean up.
@@ -232,7 +235,6 @@ inline TMCIntegrator::~TMCIntegrator(){
fFunc=0;
}
//-----------------------------------------------------------------------------
/**
* <p>Method for passing the integrand function value to the integrator.
*
@@ -248,7 +250,6 @@ inline double TMCIntegrator::FuncAtXgsl(double *x, size_t dim, void *obj)
return ((TMCIntegrator*)obj)->FuncAtX(x);
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the integral of the function between the given boundaries
*
@@ -333,7 +334,6 @@ class TDWaveGapIntegralCuhre {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class TCosSqDWaveGapIntegralCuhre
* @brief Two-dimensional integrator class for the efficient calculation of the superfluid density along the a-axis
@@ -355,7 +355,6 @@ class TCosSqDWaveGapIntegralCuhre {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class TSinSqDWaveGapIntegralCuhre
* @brief Two-dimensional integrator class for the efficient calculation of the superfluid density along the b-axis
@@ -377,7 +376,6 @@ class TSinSqDWaveGapIntegralCuhre {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class TAnSWaveGapIntegralCuhre
* @brief Two-dimensional integrator class for the efficient calculation of the superfluid density
@@ -399,7 +397,6 @@ class TAnSWaveGapIntegralCuhre {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class TAnSWaveGapIntegralDivonne
* @brief Two-dimensional integrator class for the efficient calculation of the superfluid density
@@ -421,7 +418,6 @@ class TAnSWaveGapIntegralDivonne {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class TAnSWaveGapIntegralSuave
* @brief Two-dimensional integrator class for the efficient calculation of the superfluid density
@@ -443,7 +439,6 @@ class TAnSWaveGapIntegralSuave {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class TNonMonDWave1GapIntegralCuhre
* @brief Two-dimensional integrator class for the efficient calculation of the superfluid density
@@ -465,7 +460,6 @@ class TNonMonDWave1GapIntegralCuhre {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class TNonMonDWave2GapIntegralCuhre
* @brief Two-dimensional integrator class for the efficient calculation of the superfluid density
@@ -487,7 +481,6 @@ class TNonMonDWave2GapIntegralCuhre {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class T2DTest
* @brief Test class for the 2D Monte-Carlo integration.
@@ -501,7 +494,6 @@ class T2DTest : public TMCIntegrator {
double FuncAtX(double *) const; ///< Calculate integrand x*y at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function x*y
*
@@ -595,7 +587,6 @@ class TDWaveGapIntegral : public TMCIntegrator {
double FuncAtX(double *) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function
*
@@ -611,7 +602,6 @@ inline double TDWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPar
return -1.0/(2.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt));
}
//-----------------------------------------------------------------------------
/**
* @class TAnSWaveGapIntegral
* @brief Class for the 2D Monte-Carlo integration for the calculation of the superfluid density
@@ -627,7 +617,6 @@ class TAnSWaveGapIntegral : public TMCIntegrator {
double FuncAtX(double *) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function
*
@@ -643,7 +632,6 @@ inline double TAnSWaveGapIntegral::FuncAtX(double *x) const // x = {E, phi}, fPa
return -1.0/(2.0*twokt*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt)*TMath::CosH(TMath::Sqrt(x[0]*x[0]+deltasq)/twokt));
}
//-----------------------------------------------------------------------------
/**
* @class TIntBesselJ0Exp
* @brief Class for the 1D integration of j0(a*x)*exp(-b*x).
@@ -659,7 +647,6 @@ class TIntBesselJ0Exp : public T2Integrator {
double FuncAtX(double, const std::vector<double>&) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function j0(a*x)*exp(-b*x)
*
@@ -680,7 +667,6 @@ inline double TIntBesselJ0Exp::FuncAtX(double x, const std::vector<double> &par)
return j0 * TMath::Exp(-par[1]*x);
}
//-----------------------------------------------------------------------------
/**
* @class TIntSinGss
* @brief Class for the 1D integration of sin(a*x)*exp(-b*x*x).
@@ -696,7 +682,6 @@ class TIntSinGss : public T2Integrator {
double FuncAtX(double, const std::vector<double>&) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function sin(a*x)*exp(-b*x*x)
*
@@ -710,7 +695,6 @@ inline double TIntSinGss::FuncAtX(double x, const std::vector<double> &par) cons
return TMath::Sin(TMath::TwoPi()*par[0]*x) * TMath::Exp(-0.5*par[1]*par[1]*x*x);
}
//-----------------------------------------------------------------------------
/**
* @class TIntSGInterpolation
* @brief Class for the 1D integration of the "DeRenzi Spin Glass Interpolation Integrand".
@@ -728,7 +712,6 @@ class TIntSGInterpolation : public T2Integrator {
double FuncAtX(double, const std::vector<double>&) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function
*
@@ -745,7 +728,6 @@ inline double TIntSGInterpolation::FuncAtX(double x, const std::vector<double> &
return (wt*TMath::Cos(wt)-TMath::Sin(wt))/(wt*wt)*TMath::Exp(-TMath::Power(expo,par[3]))/TMath::Power(expo,(1.0-par[3]));
}
//-----------------------------------------------------------------------------
/**
* @class TGapIntegral
* @brief Class for the 1D integration for the calculation of the superfluid density within the semi-classical model
@@ -760,7 +742,6 @@ class TGapIntegral : public TIntegrator {
double FuncAtX(double) const; ///< Calculate integrand at energy E
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function df/dE * E / sqrt(E^2 - Delta^2)
*
@@ -774,7 +755,6 @@ inline double TGapIntegral::FuncAtX(double e) const
return 1.0/(TMath::Power(TMath::CosH(TMath::Sqrt(e*e+fPar[1]*fPar[1])/fPar[0]),2.0));
}
//-----------------------------------------------------------------------------
/**
* @class TFirstUniaxialGssKTIntegral
* @brief Class for the 1D integration for the calculation of the uniaxial static Gauss-Kubo-Toyabe function.
@@ -790,7 +770,6 @@ class TFirstUniaxialGssKTIntegral : public T2Integrator {
virtual double FuncAtX(double, const std::vector<double>&) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the integrand in Eq. (7) of Solt's article
*
@@ -808,7 +787,6 @@ inline double TFirstUniaxialGssKTIntegral::FuncAtX(double x, const std::vector<d
return (1.0 - x*x)*(p - SsqTsq)/TMath::Power(p, 2.5)*TMath::Exp(-0.5*SsqTsq/p);
}
//-----------------------------------------------------------------------------
/**
* @class TSecondUniaxialGssKTIntegral
* @brief Class for the 1D integration for the calculation of the uniaxial static Gauss-Kubo-Toyabe function.
@@ -824,7 +802,6 @@ class TSecondUniaxialGssKTIntegral : public T2Integrator {
virtual double FuncAtX(double, const std::vector<double>&) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the integrand in Eq. (7) of Solt's article
*
+1 -2
View File
@@ -6,7 +6,6 @@ set(DEPTH_PROFILE_INC ${CMAKE_CURRENT_SOURCE_DIR}/../inc)
# ROOT requires that the dictonary header files are found at configuration time.
# Hence, target_include_directories cannot be used here because, targets are
# setup only afterwards.
include_directories(${FFTW3_INCLUDE})
include_directories(${MUSRFIT_INC})
include_directories(${DEPTH_PROFILE_INC})
@@ -14,7 +13,7 @@ root_generate_dictionary(
PDepthProfileDict
PDepthProfile.h
OPTIONS
-I${FFTW3_INCLUDE}
-I${FFTW3_INCLUDE_DIR}
-I${MUSRFIT_INC}
-I${DEPTH_PROFILE_INC}
-inlineInputHeader
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1
View File
@@ -54,6 +54,7 @@ target_include_directories(
PNL_PippardFitter BEFORE PRIVATE
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
$<BUILD_INTERFACE:${MUSRFIT_INC}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -1,4 +1,4 @@
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -1,4 +1,4 @@
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -66,7 +66,7 @@ class SExpRlx : public PUserFcnBase {
public:
// default constructor and destructor
SExpRlx(){}
SExpRlx(){sexp1.SetNpx(1000); sexp2.SetNpx(1000);}
~SExpRlx(){}
// function operator
+2 -2
View File
@@ -29,7 +29,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -38,4 +38,4 @@
#pragma link C++ class ExpRlx+;
#pragma link C++ class SExpRlx+;
#endif //__CINT__
#endif //__CLING__
@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -39,6 +39,6 @@
#pragma link C++ class TMeanFieldsForScTrilayer+;
#pragma link C++ class TMeanFieldsForScTrilayerWithInsulator+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
+912
View File
@@ -0,0 +1,912 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# src/external/libCuba/src/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/musrfit
pkgincludedir = $(includedir)/musrfit
pkglibdir = $(libdir)/musrfit
pkglibexecdir = $(libexecdir)/musrfit
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-apple-darwin17.5.0
host_triplet = x86_64-apple-darwin17.5.0
subdir = src/external/libCuba/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = cuba.pc
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libcuba_la_DEPENDENCIES = common/libcommon.la cuhre/libcuhre.la \
divonne/libdivonne.la suave/libsuave.la vegas/libvegas.la
am_libcuba_la_OBJECTS =
libcuba_la_OBJECTS = $(am_libcuba_la_OBJECTS)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
am__v_lt_1 =
libcuba_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libcuba_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I. -I$(top_builddir)
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_$(V))
am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_$(V))
am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libcuba_la_SOURCES)
DIST_SOURCES = $(libcuba_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DATA = $(pkgconfig_DATA)
HEADERS = $(include_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cuba.pc.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = ${SHELL} /Users/suter_a/Applications/musrfit-root6/admin/missing aclocal-1.16
ALLOCA =
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = ar
AUTOCONF = ${SHELL} /Users/suter_a/Applications/musrfit-root6/admin/missing autoconf
AUTOHEADER = ${SHELL} /Users/suter_a/Applications/musrfit-root6/admin/missing autoheader
AUTOMAKE = ${SHELL} /Users/suter_a/Applications/musrfit-root6/admin/missing automake-1.16
AWK = awk
BMWTOOLS_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/external/BMWtools
BMWTOOLS_LIBS = /Users/suter_a/Applications/musrfit-root6/src/external/BMWtools/libBMWtools.la
BNMRLIBS_CFLAGS =
BNMRLIBS_LIBS =
BOOST_CFLAGS = -I/opt/local/include
BOOST_INCLUDE = /opt/local/include
BOOST_LIBS =
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS =
CPP = gcc -E
CPPFLAGS =
CUBA_API_VERSION = 4.2
CUBA_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/external/libCuba/src
CUBA_LIBRARY_NAME = cuba
CUBA_LIBRARY_VERSION = 4:2:0
CUBA_LIBS = /Users/suter_a/Applications/musrfit-root6/src/external/libCuba/src/libcuba.la
CUBA_PREFIX =
CUBA_RELEASE = 4.2
CUBA_VERSION = 4.2.0
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -std=c++11 -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DLLTOOL = false
DOCDIR = /Users/suter_a/Applications/root/root_exec/share/doc/musrfit
DSYMUTIL = dsymutil
DUMPBIN =
ECHO_C = \c
ECHO_N =
ECHO_T =
EGREP = /usr/bin/grep -E
EXEEXT =
FFTW3_CFLAGS = -I/opt/local/include
FFTW3_LIBS = -L/opt/local/lib -lfftw3 -lfftw3_threads -lpthread -lfftw3f -lfftw3f_threads -lpthread
FFTW3_PREFIX =
FGREP = /usr/bin/grep -F
FITPOFB_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/external/libFitPofB/include
FITPOFB_LIBS = /Users/suter_a/Applications/musrfit-root6/src/external/libFitPofB/classes/libFitPofB.la
GREP = /usr/bin/grep
GSL_CFLAGS = -I/opt/local/include
GSL_LIBS = -L/opt/local/lib -lgsl -lgslcblas -lm
GSL_PREFIX =
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
LDFLAGS =
LEM_API_VERSION = 1.5
LEM_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/external/TLemRunHeader
LEM_LIBRARY_NAME = TLemRunHeader
LEM_LIBRARY_VERSION = 1:5:0
LEM_LIBS = /Users/suter_a/Applications/musrfit-root6/src/external/TLemRunHeader/libTLemRunHeader.la
LEM_RELEASE = 1.5
LEM_VERSION = 1.5.0
LIBOBJS =
LIBS =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBXML2_CFLAGS = -I/usr/include/libxml2
LIBXML2_LIBS = -L/usr/include/lib -lxml2
LIBXML2_PREFIX = /usr/include
LIPO = lipo
LN_S = ln -s
LOCAL_BIN_CXXFLAGS = -m64 -fPIC -DPIC -Wall -Wno-trigraphs
LOCAL_BIN_LDFLAGS = -Wl,-rpath /Users/suter_a/Applications/root/root_exec/lib
LOCAL_CUBA_LIB_CFLAGS = -m64 -fPIC -DPIC -Wall -Wno-trigraphs -O3 -fomit-frame-pointer -ffast-math
LOCAL_LIB_CXXFLAGS = -m64 -fPIC -DPIC -Wall -Wno-trigraphs
LOCAL_LIB_LDFLAGS =
LOCAL_MUD_LIB_CFLAGS = -m64 -fPIC -DPIC -Wall -Wno-trigraphs -g -O2
LOCAL_PNEXUS_LIB_CXXFLAGS = -m64 -fPIC -DPIC -Wall -Wno-trigraphs
LOCAL_PSIBIN_LIB_CXXFLAGS = -m64 -fPIC -DPIC -Wall -Wno-trigraphs -D_Darwin_
LTLIBOBJS =
LT_SYS_LIBRARY_PATH =
MAKEINFO = ${SHELL} /Users/suter_a/Applications/musrfit-root6/admin/missing makeinfo
MANIFEST_TOOL = :
MKDIR_P = ../../../../admin/install-sh -c -d
MUD_API_VERSION = 0.0
MUD_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/external/mud/src
MUD_LIBRARY_NAME = mud
MUD_LIBRARY_VERSION = 0:0:0
MUD_LIBS = /Users/suter_a/Applications/musrfit-root6/src/external/mud/src/libmud.la
MUD_RELEASE = 0.0
MUD_VERSION = 0.0.0
MUSR_API_VERSION = 1.2
MUSR_LIBRARY_NAME = PMusr
MUSR_LIBRARY_VERSION = 1:2:1
MUSR_RELEASE = 1.2
MUSR_ROOT_API_VERSION = 1.0
MUSR_ROOT_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/external/MusrRoot
MUSR_ROOT_LIBRARY_NAME = TMusrRunHeader
MUSR_ROOT_LIBRARY_VERSION = 1:0:0
MUSR_ROOT_LIBS = /Users/suter_a/Applications/musrfit-root6/src/external/MusrRoot/libTMusrRunHeader.la
MUSR_ROOT_RELEASE = 1.0
MUSR_ROOT_VERSION = 1.0.0
MUSR_VERSION = 1.2.1
NEXUS_CFLAGS =
NEXUS_LIBS =
NEXUS_PREFIX =
NM = /opt/local/bin/nm -B
NMEDIT = nmedit
OBJDUMP = objdump
OBJEXT = o
OTOOL = otool
OTOOL64 = :
PACKAGE = musrfit
PACKAGE_BUGREPORT = andreas.suter@psi.ch
PACKAGE_NAME = musrfit
PACKAGE_STRING = musrfit 1.2.1
PACKAGE_TARNAME = musrfit
PACKAGE_URL =
PACKAGE_VERSION = 1.2.1
PATH_SEPARATOR = :
PKG_CONFIG = /opt/local/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH =
PLUGIN_API_VERSION = 1.0
PLUGIN_LIBRARY_VERSION = 1:0:0
PLUGIN_MAJOR_VERSION = 1
PLUGIN_MINOR_VERSION = 0
PLUGIN_RELEASE = 1.0
PLUGIN_VERSION = 1.0.0
PMUSR_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/include
PMUSR_LIBS = /Users/suter_a/Applications/musrfit-root6/src/classes/libPMusr.la
PNEXUS_API_VERSION = 0.9
PNEXUS_CXXFLAGS =
PNEXUS_LIBRARY_NAME = PNeXus
PNEXUS_LIBRARY_VERSION = 0:9:0
PNEXUS_LIBS =
PNEXUS_RELEASE = 0.9
PNEXUS_VERSION = 0.9.0
PSIBIN_API_VERSION = 0.1
PSIBIN_CFLAGS = -I/Users/suter_a/Applications/musrfit-root6/src/external/MuSR_software/Class_MuSR_PSI
PSIBIN_LIBRARY_NAME = Class_MuSR_PSI
PSIBIN_LIBRARY_VERSION = 0:1:0
PSIBIN_LIBS = /Users/suter_a/Applications/musrfit-root6/src/external/MuSR_software/Class_MuSR_PSI/libClass_MuSR_PSI.la
PSIBIN_RELEASE = 0.1
PSIBIN_VERSION = 0.1.0
QT3MT_CFLAGS =
QT3MT_LIBS =
QT3_CFLAGS =
QT3_LIBS =
QT4_CFLAGS =
QT4_LIBS =
QT5_CFLAGS =
QT5_LIBS =
RANLIB = ranlib
ROOTAUXCFLAGS = -pthread -stdlib=libc++ -std=c++11 -m64
ROOTAUXLIBS = -lpthread -stdlib=libc++ -lm -ldl
ROOTCFLAGS = -I/Users/suter_a/Applications/root/root_exec/include
ROOTCLING = /Users/suter_a/Applications/root/root_exec/bin/rootcling
ROOTCONF = /Users/suter_a/Applications/root/root_exec/bin/root-config
ROOTETCDIR = /Users/suter_a/Applications/root/root_exec/etc
ROOTEXEC = /Users/suter_a/Applications/root/root_exec/bin/root
ROOTGLIBS = -lGui -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc
ROOTINCDIR = /Users/suter_a/Applications/root/root_exec/include
ROOTLIBDIR = /Users/suter_a/Applications/root/root_exec/lib
ROOTLIBS = -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc
ROOTRPATH = /Users/suter_a/Applications/root/root_exec/lib
ROOTSOVERSION = 6.13
ROOTVERSION = 6.13/02
ROOT_CFLAGS = -I/Users/suter_a/Applications/root/root_exec/include -I/Users/suter_a/Applications/root/root_exec/include -pthread -stdlib=libc++ -std=c++11 -m64
ROOT_LIBS = -L/Users/suter_a/Applications/root/root_exec/lib -lGui -lCore -lImt -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lTreePlayer -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lpthread -stdlib=libc++ -lm -ldl -lMinuit2 -lMathMore -lXMLParser
SED = /usr/bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
USERFCN_LIBRARY_NAME = PUserFcnBase
USERFCN_LIBS = /Users/suter_a/Applications/musrfit-root6/src/classes/libPUserFcnBase.la
VERSION = 1.2.1
abs_builddir = /Users/suter_a/Applications/musrfit-root6/src/external/libCuba/src
abs_srcdir = /Users/suter_a/Applications/musrfit-root6/src/external/libCuba/src
abs_top_builddir = /Users/suter_a/Applications/musrfit-root6
abs_top_srcdir = /Users/suter_a/Applications/musrfit-root6
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_DUMPBIN =
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build = x86_64-apple-darwin17.5.0
build_alias =
build_cpu = x86_64
build_os = darwin17.5.0
build_vendor = apple
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-apple-darwin17.5.0
host_alias =
host_cpu = x86_64
host_os = darwin17.5.0
host_vendor = apple
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /Users/suter_a/Applications/musrfit-root6/admin/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /Users/suter_a/Applications/root/root_exec
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix = ../../../../
top_builddir = ../../../..
top_srcdir = ../../../..
SUBDIRS = cuhre divonne suave vegas common
include_HEADERS = cuba.h
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS)
CLEANFILES = common/*~ cuhre/*~ divonne/*~ suave/*~ vegas/*~ *~ core
lib_LTLIBRARIES = libcuba.la
libcuba_la_SOURCES =
libcuba_la_LIBADD = common/libcommon.la cuhre/libcuhre.la divonne/libdivonne.la suave/libsuave.la vegas/libvegas.la -lm
libcuba_la_LDFLAGS = -version-info $(CUBA_LIBRARY_VERSION) -release $(CUBA_RELEASE) $(AM_LDFLAGS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = cuba.pc
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/external/libCuba/src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/external/libCuba/src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
cuba.pc: $(top_builddir)/config.status $(srcdir)/cuba.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libcuba.la: $(libcuba_la_OBJECTS) $(libcuba_la_DEPENDENCIES) $(EXTRA_libcuba_la_DEPENDENCIES)
$(AM_V_CCLD)$(libcuba_la_LINK) -rpath $(libdir) $(libcuba_la_OBJECTS) $(libcuba_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-includeHEADERS install-pkgconfigDATA
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
uninstall-pkgconfigDATA
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-libLTLIBRARIES \
clean-libtool cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-includeHEADERS install-info \
install-info-am install-libLTLIBRARIES install-man install-pdf \
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES \
uninstall-pkgconfigDATA
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+912
View File
@@ -0,0 +1,912 @@
# Makefile.in generated by automake 1.16.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = src/external/libCuba/src
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
$(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = cuba.pc
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \
"$(DESTDIR)$(includedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
libcuba_la_DEPENDENCIES = common/libcommon.la cuhre/libcuhre.la \
divonne/libdivonne.la suave/libsuave.la vegas/libvegas.la
am_libcuba_la_OBJECTS =
libcuba_la_OBJECTS = $(am_libcuba_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
libcuba_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libcuba_la_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libcuba_la_SOURCES)
DIST_SOURCES = $(libcuba_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
install-exec-recursive install-html-recursive \
install-info-recursive install-pdf-recursive \
install-ps-recursive install-recursive installcheck-recursive \
installdirs-recursive pdf-recursive ps-recursive \
tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DATA = $(pkgconfig_DATA)
HEADERS = $(include_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cuba.pc.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BMWTOOLS_CFLAGS = @BMWTOOLS_CFLAGS@
BMWTOOLS_LIBS = @BMWTOOLS_LIBS@
BNMRLIBS_CFLAGS = @BNMRLIBS_CFLAGS@
BNMRLIBS_LIBS = @BNMRLIBS_LIBS@
BOOST_CFLAGS = @BOOST_CFLAGS@
BOOST_INCLUDE = @BOOST_INCLUDE@
BOOST_LIBS = @BOOST_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CUBA_API_VERSION = @CUBA_API_VERSION@
CUBA_CFLAGS = @CUBA_CFLAGS@
CUBA_LIBRARY_NAME = @CUBA_LIBRARY_NAME@
CUBA_LIBRARY_VERSION = @CUBA_LIBRARY_VERSION@
CUBA_LIBS = @CUBA_LIBS@
CUBA_PREFIX = @CUBA_PREFIX@
CUBA_RELEASE = @CUBA_RELEASE@
CUBA_VERSION = @CUBA_VERSION@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DOCDIR = @DOCDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FFTW3_CFLAGS = @FFTW3_CFLAGS@
FFTW3_LIBS = @FFTW3_LIBS@
FFTW3_PREFIX = @FFTW3_PREFIX@
FGREP = @FGREP@
FITPOFB_CFLAGS = @FITPOFB_CFLAGS@
FITPOFB_LIBS = @FITPOFB_LIBS@
GREP = @GREP@
GSL_CFLAGS = @GSL_CFLAGS@
GSL_LIBS = @GSL_LIBS@
GSL_PREFIX = @GSL_PREFIX@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEM_API_VERSION = @LEM_API_VERSION@
LEM_CFLAGS = @LEM_CFLAGS@
LEM_LIBRARY_NAME = @LEM_LIBRARY_NAME@
LEM_LIBRARY_VERSION = @LEM_LIBRARY_VERSION@
LEM_LIBS = @LEM_LIBS@
LEM_RELEASE = @LEM_RELEASE@
LEM_VERSION = @LEM_VERSION@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
LIBXML2_LIBS = @LIBXML2_LIBS@
LIBXML2_PREFIX = @LIBXML2_PREFIX@
LIPO = @LIPO@
LN_S = @LN_S@
LOCAL_BIN_CXXFLAGS = @LOCAL_BIN_CXXFLAGS@
LOCAL_BIN_LDFLAGS = @LOCAL_BIN_LDFLAGS@
LOCAL_CUBA_LIB_CFLAGS = @LOCAL_CUBA_LIB_CFLAGS@
LOCAL_LIB_CXXFLAGS = @LOCAL_LIB_CXXFLAGS@
LOCAL_LIB_LDFLAGS = @LOCAL_LIB_LDFLAGS@
LOCAL_MUD_LIB_CFLAGS = @LOCAL_MUD_LIB_CFLAGS@
LOCAL_PNEXUS_LIB_CXXFLAGS = @LOCAL_PNEXUS_LIB_CXXFLAGS@
LOCAL_PSIBIN_LIB_CXXFLAGS = @LOCAL_PSIBIN_LIB_CXXFLAGS@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MUD_API_VERSION = @MUD_API_VERSION@
MUD_CFLAGS = @MUD_CFLAGS@
MUD_LIBRARY_NAME = @MUD_LIBRARY_NAME@
MUD_LIBRARY_VERSION = @MUD_LIBRARY_VERSION@
MUD_LIBS = @MUD_LIBS@
MUD_RELEASE = @MUD_RELEASE@
MUD_VERSION = @MUD_VERSION@
MUSR_API_VERSION = @MUSR_API_VERSION@
MUSR_LIBRARY_NAME = @MUSR_LIBRARY_NAME@
MUSR_LIBRARY_VERSION = @MUSR_LIBRARY_VERSION@
MUSR_RELEASE = @MUSR_RELEASE@
MUSR_ROOT_API_VERSION = @MUSR_ROOT_API_VERSION@
MUSR_ROOT_CFLAGS = @MUSR_ROOT_CFLAGS@
MUSR_ROOT_LIBRARY_NAME = @MUSR_ROOT_LIBRARY_NAME@
MUSR_ROOT_LIBRARY_VERSION = @MUSR_ROOT_LIBRARY_VERSION@
MUSR_ROOT_LIBS = @MUSR_ROOT_LIBS@
MUSR_ROOT_RELEASE = @MUSR_ROOT_RELEASE@
MUSR_ROOT_VERSION = @MUSR_ROOT_VERSION@
MUSR_VERSION = @MUSR_VERSION@
NEXUS_CFLAGS = @NEXUS_CFLAGS@
NEXUS_LIBS = @NEXUS_LIBS@
NEXUS_PREFIX = @NEXUS_PREFIX@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
PLUGIN_API_VERSION = @PLUGIN_API_VERSION@
PLUGIN_LIBRARY_VERSION = @PLUGIN_LIBRARY_VERSION@
PLUGIN_MAJOR_VERSION = @PLUGIN_MAJOR_VERSION@
PLUGIN_MINOR_VERSION = @PLUGIN_MINOR_VERSION@
PLUGIN_RELEASE = @PLUGIN_RELEASE@
PLUGIN_VERSION = @PLUGIN_VERSION@
PMUSR_CFLAGS = @PMUSR_CFLAGS@
PMUSR_LIBS = @PMUSR_LIBS@
PNEXUS_API_VERSION = @PNEXUS_API_VERSION@
PNEXUS_CXXFLAGS = @PNEXUS_CXXFLAGS@
PNEXUS_LIBRARY_NAME = @PNEXUS_LIBRARY_NAME@
PNEXUS_LIBRARY_VERSION = @PNEXUS_LIBRARY_VERSION@
PNEXUS_LIBS = @PNEXUS_LIBS@
PNEXUS_RELEASE = @PNEXUS_RELEASE@
PNEXUS_VERSION = @PNEXUS_VERSION@
PSIBIN_API_VERSION = @PSIBIN_API_VERSION@
PSIBIN_CFLAGS = @PSIBIN_CFLAGS@
PSIBIN_LIBRARY_NAME = @PSIBIN_LIBRARY_NAME@
PSIBIN_LIBRARY_VERSION = @PSIBIN_LIBRARY_VERSION@
PSIBIN_LIBS = @PSIBIN_LIBS@
PSIBIN_RELEASE = @PSIBIN_RELEASE@
PSIBIN_VERSION = @PSIBIN_VERSION@
QT3MT_CFLAGS = @QT3MT_CFLAGS@
QT3MT_LIBS = @QT3MT_LIBS@
QT3_CFLAGS = @QT3_CFLAGS@
QT3_LIBS = @QT3_LIBS@
QT4_CFLAGS = @QT4_CFLAGS@
QT4_LIBS = @QT4_LIBS@
QT5_CFLAGS = @QT5_CFLAGS@
QT5_LIBS = @QT5_LIBS@
RANLIB = @RANLIB@
ROOTAUXCFLAGS = @ROOTAUXCFLAGS@
ROOTAUXLIBS = @ROOTAUXLIBS@
ROOTCFLAGS = @ROOTCFLAGS@
ROOTCLING = @ROOTCLING@
ROOTCONF = @ROOTCONF@
ROOTETCDIR = @ROOTETCDIR@
ROOTEXEC = @ROOTEXEC@
ROOTGLIBS = @ROOTGLIBS@
ROOTINCDIR = @ROOTINCDIR@
ROOTLIBDIR = @ROOTLIBDIR@
ROOTLIBS = @ROOTLIBS@
ROOTRPATH = @ROOTRPATH@
ROOTSOVERSION = @ROOTSOVERSION@
ROOTVERSION = @ROOTVERSION@
ROOT_CFLAGS = @ROOT_CFLAGS@
ROOT_LIBS = @ROOT_LIBS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USERFCN_LIBRARY_NAME = @USERFCN_LIBRARY_NAME@
USERFCN_LIBS = @USERFCN_LIBS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = cuhre divonne suave vegas common
include_HEADERS = cuba.h
AM_LDFLAGS = $(LOCAL_LIB_LDFLAGS)
CLEANFILES = common/*~ cuhre/*~ divonne/*~ suave/*~ vegas/*~ *~ core
lib_LTLIBRARIES = libcuba.la
libcuba_la_SOURCES =
libcuba_la_LIBADD = common/libcommon.la cuhre/libcuhre.la divonne/libdivonne.la suave/libsuave.la vegas/libvegas.la -lm
libcuba_la_LDFLAGS = -version-info $(CUBA_LIBRARY_VERSION) -release $(CUBA_RELEASE) $(AM_LDFLAGS)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = cuba.pc
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/external/libCuba/src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/external/libCuba/src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
cuba.pc: $(top_builddir)/config.status $(srcdir)/cuba.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libcuba.la: $(libcuba_la_OBJECTS) $(libcuba_la_DEPENDENCIES) $(EXTRA_libcuba_la_DEPENDENCIES)
$(AM_V_CCLD)$(libcuba_la_LINK) -rpath $(libdir) $(libcuba_la_OBJECTS) $(libcuba_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-recursive
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-includeHEADERS install-pkgconfigDATA
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-libLTLIBRARIES
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
uninstall-pkgconfigDATA
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
check-am clean clean-generic clean-libLTLIBRARIES \
clean-libtool cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-includeHEADERS install-info \
install-info-am install-libLTLIBRARIES install-man install-pdf \
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES \
uninstall-pkgconfigDATA
.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
+12
View File
@@ -0,0 +1,12 @@
# Suave.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/Suave.o'
# Name of the non-PIC object
non_pic_object=none
+2 -2
View File
@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -41,6 +41,6 @@
#pragma link C++ class TLondon1D3LS+;
//#pragma link C++ class TLondon1D4L+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
+2 -2
View File
@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -35,6 +35,6 @@
#pragma link C++ class TSkewedGss+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
+2 -2
View File
@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -46,6 +46,6 @@
#pragma link C++ class TBulkAnisotropicTriVortexAGL+;
#pragma link C++ class TBulkAnisotropicTriVortexAGLGlobal+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
+1 -1
View File
@@ -41,7 +41,7 @@ add_library(GapIntegrals SHARED
#--- set target properties, e.g. version --------------------------------------
set_target_properties(GapIntegrals
PROPERTIES
VERSION "1.1.0"
VERSION "1.0.0"
)
#--- make sure that the include directory is found ----------------------------
+2 -2
View File
@@ -28,7 +28,7 @@
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -63,6 +63,6 @@
#pragma link C++ class TLambdaInvPowerLaw+;
#pragma link C++ class TFilmMagnetizationDWave+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
+2 -2
View File
@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -35,6 +35,6 @@
#pragma link C++ class PGbGLF+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
+2 -2
View File
@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -40,6 +40,6 @@
#pragma link C++ class TLFDynSG+;
#pragma link C++ class TLFSGInterpolation+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+2 -2
View File
@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
@@ -37,6 +37,6 @@
#pragma link C++ class ZFMagExp+;
#pragma link C++ class UniaxialStatGssKT+;
#endif //__CINT__
#endif //__CLING__
// root dictionary stuff --------------------------------------------------
+6 -5
View File
@@ -5,7 +5,7 @@ set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\$\{prefix\}")
set(libdir "\$\{exec_prefix\}/lib")
set(includedir "\$\{prefix\}/include")
set(PNEXUS_VERSION "1.0.0")
set(PNEXUS_VERSION "0.9.0")
set(PNEXUS_LIBRARY_NAME "PNeXus")
configure_file("PNeXus.pc.in" "PNeXus.pc" @ONLY)
@@ -21,10 +21,11 @@ set_target_properties(PNeXus
)
#--- make sure that the include directory is found ----------------------------
target_include_directories(PNeXus
BEFORE PRIVATE $<BUILD_INTERFACE:${HDF4_INCLUDE_DIRS}>
BEFORE PRIVATE $<BUILD_INTERFACE:${HDF5_INCLUDE_DIRS}>
BEFORE PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
target_include_directories(
PNeXus BEFORE PRIVATE
$<BUILD_INTERFACE:${HDF4_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${HDF5_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
)
#--- add library dependencies -------------------------------------------------
+69
View File
@@ -0,0 +1,69 @@
2011/04/13 -- BMW
Under Cygwin of all the required libraries for NeXus only HDF5 is available.
The packages <hdf5> and <libhdf5-devel> can be installed through the Cygwin setup.
One should also make sure that <bison>, <flex> and a package containing "/usr/lib/librpc.a" (e.g. <sunrpc> = 4.0-3) are installed.
All other libraries have to be built from the sources:
* JPEG-6b
URL: http://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpegsrc.v6b.tar.gz
Configure options: --prefix=/usr/local --enable-static
* MXML 2.5
URL: http://ftp.easysw.com/pub/mxml/2.5/mxml-2.5.tar.gz
Configure options: --prefix=/usr/local --enable-static
* HDF 4.2.5
URL: http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.5.tar.gz
Configure options: --prefix=/usr/local --enable-static --disable-fortran --with-jpeg=/usr/local
* NeXus 4.2.1
URL: http://download.nexusformat.org/kits/nexus-4.2.1.tar.gz
Configure options: --prefix=/usr/local --with-hdf4=/usr/local --with-hdf5=/usr --with-xml=/usr/local
The version numbers and source-code locations might of course change with time but should be easily adjustable.
If one is confident enough that all requirements to build the above packages are fullfilled, one could also try to run the following lines as a script.
However, there is absolutely no warranty that it works.
---
#!/bin/sh
cd
mkdir nexus
cd nexus
curl http://www.hdfgroup.org/ftp/lib-external/jpeg/src/jpegsrc.v6b.tar.gz -G | tar xz
cd jpeg-6b
./configure --prefix=/usr/local --enable-static
make
make install
cd ..
curl http://ftp.easysw.com/pub/mxml/2.5/mxml-2.5.tar.gz -G | tar xz
cd mxml-2.5
./configure --prefix=/usr/local --enable-static
make
make install
cd ..
curl http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/hdf-4.2.5.tar.gz -G | tar xz
cd hdf-4.2.5
./configure --prefix=/usr/local --enable-static --disable-fortran --with-jpeg=/usr/local
make
make install
cd ..
curl http://download.nexusformat.org/kits/nexus-4.2.1.tar.gz -G | tar xz
./configure --prefix=/usr/local --with-hdf4=/usr/local --with-hdf5=/usr --with-xml=/usr/local
make
make install
---
In order to obtain NeXus support in musrfit after installing the above libraries, musrfit has to be configured with the options
"--enable-static --enable-NeXus"
Further information on how to set up musrfit under Cygwin can be found here:
https://intranet.psi.ch/MUSR/MusrFitSetup#A_4_MS_Windows
http://lmu.web.psi.ch/facilities/software/musrfit/user/intranet.psi.ch/MUSR/MusrFitSetup.html#A_4_MS_Windows
EOF
-1206
View File
File diff suppressed because it is too large Load Diff
-144
View File
@@ -1,144 +0,0 @@
# - h4nexus
cmake_minimum_required(VERSION 3.26)
project(h4nexus VERSION 0.1.0 LANGUAGES CXX)
#--- set C++ standard ---------------------------------------------------------
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
#--- set a default build type if none was specified ---------------------------
set(default_build_type "Release")
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif ()
#--- check for pkg-config -----------------------------------------------------
find_package(PkgConfig REQUIRED)
#--- check for git ------------------------------------------------------------
find_package(Git REQUIRED)
#--- check for HDF4 -----------------------------------------------------------
# Find HDF4 manually (pkg-config often doesn't have hdf4)
find_path(HDF4_INCLUDE_DIR
NAMES mfhdf.h
PATHS /usr/include /usr/local/include
PATH_SUFFIXES hdf
)
find_library(HDF4_DF_LIBRARY
NAMES df libdf
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)
find_library(HDF4_MFHDF_LIBRARY
NAMES mfhdf libmfhdf
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib
)
if (HDF4_INCLUDE_DIR AND HDF4_DF_LIBRARY AND HDF4_MFHDF_LIBRARY)
set(HDF4_FOUND TRUE)
set(HDF4_INCLUDE_DIRS ${HDF4_INCLUDE_DIR})
set(HDF4_LIBRARIES ${HDF4_MFHDF_LIBRARY} ${HDF4_DF_LIBRARY})
message(STATUS "Found HDF4: ${HDF4_INCLUDE_DIR}")
message(STATUS " HDF4 libraries: ${HDF4_LIBRARIES}")
else ()
message(FATAL_ERROR "HDF4 library not found. Please install libhdf4-dev or hdf-devel")
endif ()
include_directories(${HDF4_INCLUDE_DIRS})
#--- check for HDF5 -----------------------------------------------------------
find_package(HDF5 REQUIRED COMPONENTS CXX)
if(NOT HDF5_FOUND)
message(FATAL_ERROR "HDF5 C++ library not found")
endif()
include_directories(${HDF5_INCLUDE_DIRS})
#--- check for ROOT -----------------------------------------------------------
find_package(ROOT 6.36 REQUIRED COMPONENTS Minuit2)
if (ROOT_miniut2_FOUND)
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
include(${ROOT_USE_FILE})
endif (ROOT_miniut2_FOUND)
#--- all checks done -> feed config.h -----------------------------------------
set(HAVE_CONFIG_H 1 CACHE INTERNAL "config.h is available")
configure_file(${CMAKE_SOURCE_DIR}/cmake/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
#--- check if project source is a git repo ------------------------------------
if (EXISTS "${CMAKE_SOURCE_DIR}/.git/HEAD")
message(STATUS "is a git repo")
set(IS_GIT_REPO 1)
else ()
message(STATUS "is NOT a git repo")
set(IS_GIT_REPO 0)
endif ()
#--- start create git-revision.h ----------------------------------------------
if (IS_GIT_REPO)
execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/git_revision.sh ${CMAKE_BINARY_DIR})
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
set(GIT_REV_H "git-revision.h")
else (IS_GIT_REPO)
set(HAVE_GIT_REV_H "")
set(GIT_REV_H "")
endif (IS_GIT_REPO)
#--- end create git-revision.h ------------------------------------------------
#--- write summary of the installation
cmake_host_system_information(RESULT PROCESSOR QUERY PROCESSOR_DESCRIPTION)
message("")
message("|-----------------------------------------------------------------------|")
message("| |")
message("| Summary |")
message("| |")
message("|-----------------------------------------------------------------------|")
message("")
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
message(" Processor: ${PROCESSOR} (${CMAKE_SYSTEM_PROCESSOR})")
message(" ----------")
message("")
message(" h4nexus Version: ${h4nexus_VERSION}")
message(" ----------------")
message("")
message(" Build Type: ${CMAKE_BUILD_TYPE}")
message(" -----------")
message("")
message(" Requirements:")
message(" -------------")
message("")
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
message(" ROOT found in ${ROOT_INCLUDE_DIRS}, Version: ${ROOT_VERSION}")
message("")
message(" Installation directories:")
message(" -------------------------")
message("")
message(" Programs : ${CMAKE_INSTALL_PREFIX}/bin")
message("")
message("-------------------------------------------------------------------------")
message("")
#--- h4nexus executable -------------------------------------------------------
add_executable(h4nexus
../../PNeXus.cpp
main.cpp)
target_compile_options(h4nexus BEFORE PRIVATE "-DHAVE_HDF4 -DHAVE_CONFIG_H" ${HAVE_GIT_REV_H})
target_include_directories(h4nexus
BEFORE PRIVATE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/build>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/../..>
$<BUILD_INTERFACE:${ROOT_INCLUDE_DIRS}>
)
target_link_libraries(h4nexus ${HDF4_LIBRARIES} ${HDF5_LIBRARIES} ${ROOT_LIBRARIES})
-7
View File
@@ -1,7 +0,0 @@
/* config.h.in. Generated from CMakeLists.txt */
/* Define to 1 if you have the <config.h> file. */
#cmakedefine HAVE_CONFIG_H @HAVE_CONFIG_H@
/* h4nexus version */
#define H4NEXUS_VERSION "@h4nexus_VERSION@"
-155
View File
@@ -1,155 +0,0 @@
# h4nexus - handle muSR-NeXus files via HDF4 only
## Contents
Tests and classes to handle muSR-NeXus files directly via the HDF4 C API.
This project provides the same API as h5nexus but uses HDF4 instead of HDF5 for handling NeXus files.
## Features
- **Read and write NeXus HDF4 files** with a clean C++ API
- **Case-insensitive path lookup** for datasets and groups
- **Type-safe data handling** using template classes
- **Dead time correction calculation** for muon detector data using ROOT Minuit2
- **Compatible API with h5nexus** for easy migration
## Key Classes
- `nxH4::PNeXus` - Main class for reading/writing NeXus HDF4 files
- `nxH4::PNXdata<T>` - Template class for storing dataset content with attributes
- `nxH4::PNeXusDeadTime` - Dead time correction calculator for muon detector data
## Requirements
- CMake >= 3.26
- C++17 compatible compiler
- HDF4 library (libhdf4-dev or hdf-devel)
- ROOT >= 6.36 with Minuit2 component
- pkg-config
## Building
```bash
mkdir build
cd build
cmake ..
make
```
## Installation
```bash
make install
```
This will install:
- Library: `libh4nexus.so` in `${CMAKE_INSTALL_PREFIX}/lib`
- Executable: `h4nexus` in `${CMAKE_INSTALL_PREFIX}/bin`
- Header: `PNeXus.h` in `${CMAKE_INSTALL_PREFIX}/include/h4nexus`
## Usage
### Command Line
```bash
# Display help
h4nexus --help
# Read and display a NeXus HDF4 file
h4nexus --fn input.nxs
# Read with debug output
h4nexus --fn input.nxs --debug
# Calculate dead time corrections
h4nexus --fn input.nxs --dead_time_estimate
# Write output file
h4nexus --fn input.nxs --out output.nxs
```
### Programmatic Usage
```cpp
#include <h4nexus/PNeXus.h>
// Read a NeXus file
nxH4::PNeXus nexus("data.nxs");
// Access datasets
auto counts_data = nexus.GetDataset<int>("/raw_data_1/detector_1/counts");
const auto& counts = counts_data.GetData();
const auto& dims = counts_data.GetDimensions();
// Dump file contents
nexus.Dump();
// Write to new file
nexus.WriteNexusFile("output.nxs", 2); // IDF version 2
```
### Creating Files from Scratch
```cpp
nxH4::PNeXus nxs_out;
// Add datasets
std::vector<int> counts(16*66000, 0);
nxs_out.AddDataset<int>("/raw_data_1/detector_1/counts",
counts, {1, 16, 66000},
nxH4::H4DataType::INT32);
// Add attributes
nxs_out.AddDatasetAttribute<int>("/raw_data_1/detector_1/counts",
"units", std::string("counts"));
// Add group attributes
nxs_out.AddGroupAttribute("/raw_data_1", "NX_class", std::string("NXentry"));
// Write file
nxs_out.WriteNexusFile("output.nxs");
```
## API Compatibility with h5nexus
The h4nexus API is designed to be compatible with h5nexus. The main differences are:
- Namespace: `nxH4::` instead of `nxH5::`
- Data types: `H4DataType` enum instead of `H5::DataType`
- Dimensions: Uses `uint32_t` instead of `hsize_t`
Code migration typically requires only:
1. Changing namespace from `nxH5` to `nxH4`
2. Changing `H5::PredType::NATIVE_INT` to `nxH4::H4DataType::INT32` (etc.)
3. Changing dimension types from `hsize_t` to `uint32_t`
## Supported Data Types
- `H4DataType::INT32` - 32-bit signed integer
- `H4DataType::FLOAT32` - 32-bit floating point
- `H4DataType::FLOAT64` - 64-bit floating point
- `H4DataType::CHAR8` - 8-bit character/string
- `H4DataType::UINT32` - 32-bit unsigned integer
- `H4DataType::INT16` - 16-bit signed integer
- `H4DataType::UINT16` - 16-bit unsigned integer
- `H4DataType::INT8` - 8-bit signed integer
- `H4DataType::UINT8` - 8-bit unsigned integer
## Differences from HDF5
HDF4 has some limitations compared to HDF5:
- No true hierarchical groups (simulated using naming conventions)
- Less flexible attribute handling
- Different maximum name lengths
- C API instead of C++ API
The h4nexus library abstracts these differences to provide a similar interface to h5nexus.
## License
GNU General Public License v2 (GPLv2)
## Contacts
Andreas Suter <andreas.suter@psi.ch>
-35
View File
@@ -1,35 +0,0 @@
#!/bin/bash
# Script to create git-revision.h with current git information
# Usage: git_revision.sh [output_directory]
output_dir="${1:-.}"
output_file="${output_dir}/git-revision.h"
# Check if we're in a git repository
if ! git rev-parse --git-dir > /dev/null 2>&1; then
echo "Not in a git repository, skipping git-revision.h generation"
exit 0
fi
# Get git information
git_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
git_hash=$(git rev-parse --short HEAD 2>/dev/null)
git_date=$(git log -1 --format=%cd --date=short 2>/dev/null)
# Create header file
cat > "$output_file" << EOF
// This file is auto-generated by git_revision.sh
// Do not edit manually
#ifndef GIT_REVISION_H
#define GIT_REVISION_H
#define GIT_BRANCH "$git_branch"
#define GIT_HASH "$git_hash"
#define GIT_DATE "$git_date"
#endif // GIT_REVISION_H
EOF
echo "Generated $output_file"
-447
View File
@@ -1,447 +0,0 @@
/***************************************************************************
main.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2026 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
/**
* @file main.cpp
* @brief Command-line interface for the h4nexus NeXus HDF4 file reader/writer
*
* This file contains the main() function and command-line interface for the
* h4nexus program. It provides functionality to:
* - Read and display NeXus HDF4 files
* - Write NeXus HDF4 files using the PNXdata approach
* - Calculate dead time corrections for muon detector data
*
* **Command-Line Options:**
* - --fn <file>: Input NeXus HDF4 file (required)
* - --out <file>: Output NeXus HDF4 file (optional)
* - --debug, -d: Enable debug output
* - --dead_time_estimate, -dt: Calculate dead time corrections
* - --help, -h: Display help message
* - --version, -v: Display version information
*
* @author Andreas Suter
* @date 2007-2026
* @copyright GNU General Public License v2
* @version 1.0
*
* @see nxH4::PNeXus
* @see nxH4::PNeXusDeadTime
*/
#include <cstring>
#include <iostream>
#include <string>
#include <memory>
#include <ctime>
#include <mfhdf.h>
#include "PNeXus.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_GIT_REV_H
#include "git-revision.h"
#endif
//-----------------------------------------------------------------------------
/**
* @brief Display command-line syntax and help information
*
* Prints the usage syntax and available command-line options for the h4nexus
* program to stdout and exits the program.
*/
void h4nexus_syntax() {
std::cout << std::endl;
std::cout << "usage: h4nexus [--help | -h] |" << std::endl;
std::cout << " [--version | -v] |" << std::endl;
std::cout << " --fn <fln> [--debug | -d]" << std::endl;
std::cout << " [--dead_time_estimate | -dt]]" << std::endl;
std::cout << " [--out <fout>]" << std::endl;
std::cout << std::endl;
std::cout << "options:" << std::endl;
std::cout << " --help, -h: this help." << std::endl;
std::cout << " --version, -v: version of h4nexus." << std::endl;
std::cout << " --fn <fln>: nexus hdf4 input file name <fn>." << std::endl;
std::cout << " --dead_time_estimate, -dt: dead time estimate for the read hdf4 nexus file." << std::endl;
std::cout << " --debug, -d: print additional debug information." << std::endl;
std::cout << " --out <fout>: write the required datasets of a nexus hdf4 file to file " << std::endl;
std::cout << " with name <fout>. Only makes sense together with the option --fn <fln>." << std::endl;
std::cout << std::endl;
exit(0);
}
//-----------------------------------------------------------------------------
/**
* @brief Calculate dead time corrections for muon detector data
*
* Estimates dead time corrections for each detector in the NeXus file using
* the PNeXusDeadTime class and ROOT Minuit2 minimization.
*
* @param nxs Pointer to the PNeXus object containing the data
* @param debug If true, print additional debug information
*
* @see nxH4::PNeXusDeadTime
*/
void h4nexus_deadTimeEstimate(const nxH4::PNeXus *nxs, bool debug)
{
if (debug) {
std::cout << std::endl;
std::cout << std::endl << "+++++++++++++++++++";
std::cout << std::endl << "in deadTimeEstimate";
std::cout << std::endl << "+++++++++++++++++++";
std::cout << std::endl;
}
nxH4::PNeXusDeadTime ndt(nxs, debug);
auto dims = ndt.GetDimensions();
for (unsigned int i=0; i<dims[1]; i++) {
ndt.minimize(i);
}
}
//-----------------------------------------------------------------------------
/**
* @brief Write NeXus HDF4 file using the PNXdata approach
*
* Writes all datasets from the PNeXus data map to a new NeXus HDF4 file.
* This function uses the WriteNexusFile() method to create a complete
* NeXus file with all groups, datasets, and attributes.
*
* @param nxs Pointer to the PNeXus object containing the data to write
* @param outFileName Output filename for the NeXus HDF4 file
* @param debug If true, print additional debug information
*
* @note Currently only supports IDF version 2 files
*
* @see nxH4::PNeXus::WriteNexusFile()
*/
void h4nexus_writeTest(const nxH4::PNeXus *nxs, const std::string& outFileName, bool debug)
{
if (debug) {
std::cout << std::endl;
std::cout << "++++++++++++++++++++" << std::endl;
std::cout << "Writing NeXus file" << std::endl;
std::cout << "++++++++++++++++++++" << std::endl;
std::cout << std::endl;
}
if (nxs->GetIdfVersion() == 1) {
std::cerr << "Error: IDF v1 write not yet implemented" << std::endl;
return;
}
// Write using the read object's data
int result = const_cast<nxH4::PNeXus*>(nxs)->WriteNexusFile(outFileName, nxs->GetIdfVersion());
if (result == 0) {
std::cout << "Successfully wrote: " << outFileName << std::endl;
} else {
std::cerr << "Failed to write file: " << outFileName << std::endl;
}
// write data from scratch
std::unique_ptr<nxH4::PNeXus> nxs_out = std::make_unique<nxH4::PNeXus>();
std::vector<int> ival;
std::vector<float> fval;
std::vector<std::string> sval;
// ----------
// raw_data_1
// ----------
// IDF version
ival.push_back(2);
nxs_out->AddDataset<int>("/raw_data_1/IDF_version", ival, {1}, nxH4::H4DataType::INT32);
ival.clear();
// add group attribute to '/raw_data_1'
nxs_out->AddGroupAttribute("/raw_data_1", "NX_class", std::string("NXentry"));
// beamline
sval.push_back("piE3");
nxs_out->AddDataset<std::string>("/raw_data_1/beamline", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// definition
sval.push_back("muonTD");
nxs_out->AddDataset<std::string>("/raw_data_1/definition", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// run_number
ival.push_back(1234);
nxs_out->AddDataset<int>("/raw_data_1/run_number", ival, {1}, nxH4::H4DataType::INT32);
ival.clear();
// title
sval.push_back("this is the run title.");
nxs_out->AddDataset<std::string>("/raw_data_1/title", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// start time
sval.push_back("2026-01-01T01:02:03");
nxs_out->AddDataset<std::string>("/raw_data_1/start_time", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// end time
sval.push_back("2026-01-01T02:03:42");
nxs_out->AddDataset<std::string>("/raw_data_1/end_time", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// experiment_identifier - pgroup for PSI
sval.push_back("p18324");
nxs_out->AddDataset<std::string>("/raw_data_1/experiment_identifier", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// -------------------
// detector_1 (NXdata)
// -------------------
// add group attribute to /raw_data_1/instrument
nxs_out->AddGroupAttribute("/raw_data_1/detector_1", "NX_class", std::string("NXdata"));
// counts
std::vector<int> counts(16*66000, 42); // data 16 histos with length 66000
nxs_out->AddDataset<int>("/raw_data_1/detector_1/counts", counts, {1, 16, 66000}, nxH4::H4DataType::INT32);
// attributes for counts
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "signal", 1);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "axes", std::string("period_index,spectrum_index,raw_time"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "long_name", std::string("positron_counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "t0_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "first_good_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "last_good_bin", 66000);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "units", std::string("counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "target", std::string("/raw_data_1/instrument/detector_1/counts"));
// raw_time
std::vector<float> raw_time(66000, 0.0);
for (unsigned int i=0; i<raw_time.size(); i++)
raw_time[i] = 0.1953125f*1.0e-3*((float)i-2741.0f+0.5f);
nxs_out->AddDataset<float>("/raw_data_1/detector_1/raw_time", raw_time, {66000}, nxH4::H4DataType::FLOAT32);
// attributes raw_time
nxs_out->AddDatasetAttribute<float>("/raw_data_1/detector_1/raw_time", "units", std::string("microseconds"));
nxs_out->AddDatasetAttribute<float>("/raw_data_1/detector_1/raw_time", "target", std::string("/raw_data_1/instrument/detector_1/raw_time"));
// ----------
// instrument
// ----------
// add group attribute to /raw_data_1/instrument
nxs_out->AddGroupAttribute("/raw_data_1/instrument", "NX_class", std::string("NXinstrument"));
// name
sval.push_back("LEM");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/name", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// ------
// source
// ------
// add group attribute to /raw_data_1/instrument/source
nxs_out->AddGroupAttribute("/raw_data_1/instrument/source", "NX_class", std::string("NXsource"));
// name
sval.push_back("PSI");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/source/name", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// type
sval.push_back("continuous muon source");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/source/types", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// probe
sval.push_back("postive muons");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/source/probe", sval, {1}, nxH4::H4DataType::CHAR8);
sval.clear();
// -----------------------
// detector_1 (NXdetector)
// -----------------------
// add group attribute to /raw_data_1/instrument/detector_1
nxs_out->AddGroupAttribute("/raw_data_1/instrument/detector_1", "NX_class", std::string("NXdetector"));
// counts
nxs_out->AddDataset<int>("/raw_data_1/instrument/detector_1/counts", counts, {1, 16, 66000}, nxH4::H4DataType::INT32);
// attributes for counts
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "signal", 1);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "axes", std::string("period_index,spectrum_index,raw_time"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "long_name", std::string("positron_counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "t0_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "first_good_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "last_good_bin", 66000);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "units", std::string("counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "target", std::string("/raw_data_1/instrument/detector_1/counts"));
// raw_time
nxs_out->AddDataset<float>("/raw_data_1/instrument/detector_1/raw_time", raw_time, {66000}, nxH4::H4DataType::FLOAT32);
// attributes raw_time
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/raw_time", "units", std::string("microseconds"));
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/raw_time", "target", std::string("/raw_data_1/instrument/detector_1/raw_time"));
// resolution
fval.push_back(195.3125);
nxs_out->AddDataset<float>("/raw_data_1/instrument/detector_1/resolution", fval, {1}, nxH4::H4DataType::FLOAT32);
fval.clear();
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/resolution",
"units", std::string("picoseconds"));
// spectrum_index
for (unsigned int i=0; i<16; i++)
ival.push_back(i+1);
nxs_out->AddDataset<int>("/raw_data_1/instrument/detector_1/spectrum_index", ival, {16}, nxH4::H4DataType::INT32);
ival.clear();
// dead_time
std::vector<float> deadTime(16, 0.0);
nxs_out->AddDataset<float>("/raw_data_1/instrument/detector_1/dead_time", deadTime, {16}, nxH4::H4DataType::FLOAT32);
// attributes dead_time
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/dead_time", "available", 0);
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/dead_time", "units", std::string("microseconds"));
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/dead_time", "target", std::string("/raw_data_1/instrument/detector_1/dead_time"));
// add root attributes
// file name
nxs_out->AddRootAttribute("file_name", std::string("_test.nxs"));
// date-time
std::time_t time = std::time({});
char timeString[std::size("yyyy-mm-ddThh:mm:ssZ")];
std::strftime(std::data(timeString), std::size(timeString),
"%FT%TZ", std::gmtime(&time));
nxs_out->AddRootAttribute("file_time", std::string(timeString));
// NeXus version
nxs_out->AddRootAttribute("NeXus_Version", std::string("4.3.0"));
// hdf4 version
nxs_out->AddRootAttribute("HDF4_Version", std::string(nxs->GetHdf4Version()));
// creator
nxs_out->AddRootAttribute("creator", std::string("h4nexus - PSI"));
nxs_out->WriteNexusFile("_test.nxs");
}
//-----------------------------------------------------------------------------
/**
* @brief Main entry point for the h4nexus program
*
* Parses command-line arguments and performs the requested operations:
* - Read and display NeXus HDF4 file information
* - Write NeXus HDF4 files with modified data
* - Calculate dead time corrections
*
* @param argc Number of command-line arguments
* @param argv Array of command-line argument strings
*
* @return 0 on success, non-zero on error
*
* @see h4nexus_syntax() for available command-line options
*/
int main(int argc, char *argv[])
{
std::string fileName{""};
std::string fileNameOut{""};
bool printDebug{false};
bool deadTimeEstimate{false};
if (argc == 1)
h4nexus_syntax();
for (int i=1; i<argc; i++) {
if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
h4nexus_syntax();
} else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) {
#ifdef HAVE_CONFIG_H
#ifdef HAVE_GIT_REV_H
std::cout << std::endl << "h4nexus version: " << H4NEXUS_VERSION << ", git-branch: " << GIT_BRANCH << ", git-hash: " << GIT_HASH << std::endl << std::endl;
#else
std::cout << std::endl << "h4nexus version: " << H4NEXUS_VERSION << std::endl << std::endl;
#endif
#else
#ifdef HAVE_GIT_REV_H
std::cout << std::endl << "h4nexus git-branch: " << GIT_BRANCH << ", git-hash: " << GIT_HASH << std::endl << std::endl;
#else
std::cout << std::endl << "h4nexus version: unknown." << std::endl << std::endl;
#endif
#endif
return 0;
} else if (!strcmp(argv[i], "--fn")) {
if (i+1 >= argc) {
std::cout << std::endl << "**ERROR** found --fn without <fln>." << std::endl;
h4nexus_syntax();
}
i++;
fileName = argv[i];
} else if (!strcmp(argv[i], "-dt") || !strcmp(argv[i], "--dead_time_estimate")) {
deadTimeEstimate = true;
} else if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) {
printDebug = true;
} else if (!strcmp(argv[i], "--out")) {
if (i+1 >= argc) {
std::cout << std::endl << "**ERROR** found --out without <fout>." << std::endl;
h4nexus_syntax();
}
i++;
fileNameOut = argv[i];
} else {
h4nexus_syntax();
}
}
if (fileName.empty()) {
std::cerr << std::endl;
std::cerr << "**ERROR** <fln> is missing." << std::endl;
std::cerr << std::endl;
h4nexus_syntax();
}
std::unique_ptr<nxH4::PNeXus> nxs = std::make_unique<nxH4::PNeXus>(fileName, printDebug);
nxs->Dump();
if (deadTimeEstimate) {
h4nexus_deadTimeEstimate(nxs.get(), printDebug);
}
if (!fileNameOut.empty()) {
h4nexus_writeTest(nxs.get(), fileNameOut, printDebug);
}
return 0;
}
-114
View File
@@ -1,114 +0,0 @@
# - h5nexus
cmake_minimum_required(VERSION 3.26)
project(h5nexus VERSION 0.1.0 LANGUAGES CXX)
#--- set C++ standard ---------------------------------------------------------
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
#--- set a default build type if none was specified ---------------------------
set(default_build_type "Release")
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif ()
#--- check for pkg-config -----------------------------------------------------
find_package(PkgConfig REQUIRED)
#--- check for git ------------------------------------------------------------
find_package(Git REQUIRED)
#--- check for HDF5 -----------------------------------------------------------
find_package(HDF5 REQUIRED COMPONENTS CXX)
if(NOT HDF5_FOUND)
message(FATAL_ERROR "HDF5 C++ library not found")
endif()
include_directories(${HDF5_INCLUDE_DIRS})
#--- check for ROOT -----------------------------------------------------------
find_package(ROOT 6.36 REQUIRED COMPONENTS Minuit2)
if (ROOT_miniut2_FOUND)
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
include(${ROOT_USE_FILE})
endif (ROOT_miniut2_FOUND)
#--- all checks done -> feed config.h -----------------------------------------
set(HAVE_CONFIG_H 1 CACHE INTERNAL "config.h is available")
configure_file(${CMAKE_SOURCE_DIR}/cmake/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
#--- check if project source is a git repo ------------------------------------
if (EXISTS "${CMAKE_SOURCE_DIR}/.git/HEAD")
message(STATUS "is a git repo")
set(IS_GIT_REPO 1)
else ()
message(STATUS "is NOT a git repo")
set(IS_GIT_REPO 0)
endif ()
#--- start create git-revision.h ----------------------------------------------
if (IS_GIT_REPO)
execute_process(COMMAND sh ${CMAKE_SOURCE_DIR}/src/git_revision.sh)
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
set(GIT_REV_H "git-revision.h")
else (IS_GIT_REPO)
set(HAVE_GIT_REV_H "")
set(GIT_REV_H "")
endif (IS_GIT_REPO)
#--- end create git-revision.h ------------------------------------------------
#--- write summary of the installation
cmake_host_system_information(RESULT PROCESSOR QUERY PROCESSOR_DESCRIPTION)
message("")
message("|-----------------------------------------------------------------------|")
message("| |")
message("| Summary |")
message("| |")
message("|-----------------------------------------------------------------------|")
message("")
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
message(" Processor: ${PROCESSOR} (${CMAKE_SYSTEM_PROCESSOR})")
message(" ----------")
message("")
message(" h5nexus Version: ${musrfit_VERSION}")
message(" ----------------")
message("")
message(" Build Type: ${CMAKE_BUILD_TYPE}")
message(" -----------")
message("")
message(" Requirements:")
message(" -------------")
message("")
message(" HDF5 found in ${HDF5_INCLUDE_DIRS}, Version: ${HDF5_VERSION}")
message(" ROOT found in ${ROOT_INCLUDE_DIRS}, Version: ${ROOT_VERSION}")
message("")
message(" Installation directories:")
message(" -------------------------")
message("")
message(" Programs : ${CMAKE_INSTALL_PREFIX}/bin")
message("")
message("-------------------------------------------------------------------------")
message("")
#--- add executable -----------------------------------------------------------
add_executable(h5nexus
../../PNeXus.cpp
main.cpp)
target_compile_options(h5nexus BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
target_include_directories(h5nexus
BEFORE PRIVATE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/build>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/../..>
$<BUILD_INTERFACE:${ROOT_INCLUDE_DIRS}>
)
target_link_libraries(h5nexus ${HDF5_CXX_LIBRARIES} ${ROOT_LIBRARIES})
-5
View File
@@ -1,5 +0,0 @@
// config.h
#define PACKAGE_VERSION "@PROJECT_VERSION@"
#define BUILD_TYPE "@CMAKE_BUILD_TYPE@"
@@ -1,8 +0,0 @@
#ifndef GIT_VERSION_H
#define GIT_VERSION_H
#define GIT_BRANCH "@GIT_BRANCH@"
#define GIT_CURRENT_SHA1 @GIT_CURRENT_SHA1@
#endif // GIT_VERSION_H
-55
View File
@@ -1,55 +0,0 @@
# h5nexus Documentation
This directory contains documentation for the h5nexus project.
## Available Documentation
- **Usage.md** - Comprehensive usage guide with detailed examples and workflow patterns
## Project Structure
The h5nexus example project has the following structure:
```
h5nexus/
├── CMakeLists.txt - Build configuration
├── main.cpp - Main program source
├── git_revision.sh - Git revision header generator
├── cmake/
│ ├── config.h.in - CMake config template
│ └── git-revision.h.in - Git revision template
└── docu/
├── README.md - This file
└── Usage.md - Detailed usage documentation
```
## Building
```bash
mkdir build
cd build
cmake ..
make
```
### Prerequisites
- CMake >= 3.26
- C++17 compatible compiler
- HDF5 C++ library
- ROOT >= 6.36 with Minuit2
## Key Classes
The h5nexus example uses the PNeXus library which provides:
- `nxH5::PNeXus` - Main NeXus file reader/writer class
- `nxH5::PNXdata<T>` - Template class for dataset storage
- `nxH5::PNeXusDeadTime` - Dead time correction calculator
- `nxs::checkHDFType()` - File format detection
## Additional Resources
- [Doxygen Manual](https://www.doxygen.nl/manual/)
- [HDF5 Documentation](https://portal.hdfgroup.org/documentation/)
- [NeXus Format](https://www.nexusformat.org/)
File diff suppressed because it is too large Load Diff
-27
View File
@@ -1,27 +0,0 @@
#!/bin/bash
echo "-- Generating header for git hash"
GIT_HEADER="git-revision.h"
[ -d src ] || mkdir src
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
GIT_VERSION=`git log -n 1 --pretty=format:"%ad - %h"`
if [ "$(grep -ics "$GIT_VERSION" $GIT_HEADER)" = 1 ]
then
echo "-- No need to generate new $GIT_HEADER - git hash is unchanged"
exit 0;
fi
echo "-- git branch is : " $GIT_BRANCH
echo "-- git version is : " $GIT_VERSION
echo "#ifndef GIT_VERSION_H" > $GIT_HEADER
echo "#define GIT_VERSION_H" >> $GIT_HEADER
echo "" >> $GIT_HEADER
echo "#define GIT_BRANCH \"$GIT_BRANCH\"" >> $GIT_HEADER
echo "#define GIT_CURRENT_SHA1 \"$GIT_VERSION\"" >> $GIT_HEADER
echo "" >> $GIT_HEADER
echo "#endif //GIT_VERSION_H" >> $GIT_HEADER
echo "-- file is generated into" $GIT_HEADER
-572
View File
@@ -1,572 +0,0 @@
/***************************************************************************
main.cpp
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2026 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
/**
* @file main.cpp
* @brief Command-line interface for the h5nexus NeXus HDF5 file reader/writer
*
* This file contains the main() function and command-line interface for the
* h5nexus program. It provides functionality to:
* - Read and display NeXus HDF5 files
* - Write NeXus HDF5 files using the PNXdata approach
* - Calculate dead time corrections for muon detector data
*
* **Command-Line Options:**
* - --fn <file>: Input NeXus HDF5 file (required)
* - --out <file>: Output NeXus HDF5 file (optional)
* - --debug, -d: Enable debug output
* - --dead_time_estimate, -dt: Calculate dead time corrections
* - --help, -h: Display help message
* - --version, -v: Display version information
*
* @author Andreas Suter
* @date 2007-2026
* @copyright GNU General Public License v2
* @version 1.0
*
* @see nxH5::PNeXus
* @see nxH5::PNeXusDeadTime
*/
#include <cstring>
#include <iostream>
#include <string>
#include <memory>
#include <ctime>
#include <fstream>
#include "hdf5.h"
#include "PNeXus.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_GIT_REV_H
#include "git-revision.h"
#endif
//-----------------------------------------------------------------------------
/**
* @brief Display command-line syntax and help information
*
* Prints the usage syntax and available command-line options for the h5nexus
* program to stdout and exits the program.
*/
void h5nexus_syntax() {
std::cout << std::endl;
std::cout << "usage: h5nexus [--help | -h] |" << std::endl;
std::cout << " [--version | -v] |" << std::endl;
std::cout << " --fn <fln> [--debug | -d]" << std::endl;
std::cout << " [--dead_time_estimate | -dt]]" << std::endl;
std::cout << " [--out <fout>]" << std::endl;
std::cout << " [--data idx <dout>]" << std::endl;
std::cout << std::endl;
std::cout << "options:" << std::endl;
std::cout << " --help, -h: this help." << std::endl;
std::cout << " --version, -v: version of h5nexus." << std::endl;
std::cout << " --fn <fln>: nexus hdf5 input file name <fn>." << std::endl;
std::cout << " --dead_time_estimate, -dt: dead time estimate for the read hdf5 nexus file." << std::endl;
std::cout << " --debug, -d: print additional debug information." << std::endl;
std::cout << " --out <fout>: write the required datasets of a nexus hdf5 file to file " << std::endl;
std::cout << " with name <fout>. Only makes sense together with the option --fn <fln>." << std::endl;
std::cout << " --data idx <dout>: write a single ascii data set with idx to <dout>." << std::endl;
std::cout << " Only makes sense together with the option --fn <fln>." << std::endl;
std::cout << std::endl;
exit(0);
}
//-----------------------------------------------------------------------------
/**
* @brief Calculate dead time corrections for muon detector data
*
* Estimates dead time corrections for each detector in the NeXus file using
* the PNeXusDeadTime class and ROOT Minuit2 minimization.
*
* @param nxs Pointer to the PNeXus object containing the data
* @param debug If true, print additional debug information
*
* @see nxH5::PNeXusDeadTime
*/
std::vector<float> h5nexus_deadTimeEstimate(const nxH5::PNeXus *nxs, bool debug)
{
if (debug) {
std::cout << std::endl;
std::cout << std::endl << "+++++++++++++++++++";
std::cout << std::endl << "in deadTimeEstimate";
std::cout << std::endl << "+++++++++++++++++++";
std::cout << std::endl;
}
nxH5::PNeXusDeadTime ndt(nxs, debug);
auto dims = ndt.GetDimensions();
for (unsigned int i=0; i<dims[1]; i++) {
ndt.minimize(i);
}
return ndt.GetDeadTimeEstimated();
}
//-----------------------------------------------------------------------------
void h5nexus_writeData(const nxH5::PNeXus *nxs, const std::string& fln, const std::string& dataOutFln, const int idx, const std::vector<float> dte)
{
std::cout << std::endl << "as35> in h5nexus_writeData: idf version: " << nxs->GetIdfVersion();
std::vector<int> counts;
std::vector<float> dt;
std::vector<long long unsigned int> dims;
float resolution{0.0};
int good_frames{0};
if (nxs->GetIdfVersion() == 1) {
if (nxs->HasDataset("/run/histogram_data_1/counts")) {
std::cout << std::endl << "as35> found counts in idf version 1";
}
} else {
auto dataMap = nxs->GetDataMap();
if (nxs->HasDataset("/raw_data_1/detector_1/counts")) {
std::cout << std::endl << "as35> found counts in idf version 2";
auto counts_data = std::any_cast<nxH5::PNXdata<int>>(dataMap["/raw_data_1/detector_1/counts"]);
counts = counts_data.GetData();
auto dd = counts_data.GetDimensions();
for (auto i=0; i<dd.size(); i++)
dims.push_back(dd[i]);
std::cout << std::endl << "as35> dims: " << dims.size() << ": ";
for (auto i=0; i<dims.size(); i++)
std::cout << dims[i] << ", ";
}
if (idx >= dims[1]) {
std::cerr << std::endl << "**ERROR** idx=" << idx << " is >= number of dataset=" << dims[1] << std::endl;
return;
}
if (nxs->HasDataset("/raw_data_1/detector_1/dead_time")) {
std::cout << std::endl << "as35> found dead_time in idf version 2";
auto dt_data = std::any_cast<nxH5::PNXdata<float>>(dataMap["/raw_data_1/detector_1/dead_time"]);
dt = dt_data.GetData();
}
if (nxs->HasDataset("/raw_data_1/instrument/detector_1/resolution")) {
std::cout << std::endl << "as35> found resolution in idf version 2";
auto r_data = std::any_cast<nxH5::PNXdata<int>>(dataMap["/raw_data_1/instrument/detector_1/resolution"]);
auto rr = r_data.GetData();
resolution = (float)rr[0];
if (r_data.HasAttribute("units")) {
std::string units = std::any_cast<std::string>(r_data.GetAttribute("units"));
if (units == "picoseconds")
resolution *= 1.0e-6;
else if (units == "nanoseconds")
resolution *= 1.0e-3;
}
}
if (nxs->HasDataset("/raw_data_1/good_frames")) {
std::cout << std::endl << "as35> found good_frames in idf version 2";
auto gf_data = std::any_cast<nxH5::PNXdata<int>>(dataMap["/raw_data_1/good_frames"]);
good_frames = gf_data.GetData()[0];
}
}
std::cout << std::endl;
float dtei;
if (dte.size() > idx)
dtei = dte[idx];
// write dataset
std::ofstream fout(dataOutFln);
fout << "# NeXus fln: " << fln << std::endl;
fout << "# idx=" << idx << std::endl;
fout << "# resolution : " << resolution << " (us)" << std::endl;
fout << "# good_frames : " << good_frames << std::endl;
fout << "# dead_time : " << dt[idx] << " (us) : from file" << std::endl;
fout << "# dead_time : " << dtei << " (us) : from estimater" << std::endl;
fout << "# ------" << std::endl;
fout << "# raw counts, dead time corrected counts (file), dead time corrected counts (estimated)" << std::endl;
int cc{0}, dtcc{0}, dtecc{0};
// see https://docs.mantidproject.org/v3.9.0/algorithms/ApplyDeadTimeCorr-v1.html#algm-applydeadtimecorr
for (auto i=0; i<dims[2]; i++) {
cc = counts[i + idx*dims[2]];
dtcc = (int)((float)cc / (1.0 - (float)cc * (dt[idx]/(resolution*(float)good_frames))));
dtecc = (int)((float)cc / (1.0 - (float)cc * (dtei/(resolution*(float)good_frames))));
fout << cc << ", " << dtcc << ", " << dtecc << std::endl;
}
fout.close();
}
//-----------------------------------------------------------------------------
/**
* @brief Write NeXus HDF5 file using the PNXdata approach
*
* Writes all datasets from the PNeXus data map to a new NeXus HDF5 file.
* This function uses the WriteNexusFile() method to create a complete
* NeXus file with all groups, datasets, and attributes.
*
* @param nxs Pointer to the PNeXus object containing the data to write
* @param outFileName Output filename for the NeXus HDF5 file
* @param debug If true, print additional debug information
*
* @note Currently only supports IDF version 2 files
*
* @see nxH5::PNeXus::WriteNexusFile()
*/
void h5nexus_writeTest(const nxH5::PNeXus *nxs, const std::string& outFileName, bool debug)
{
if (debug) {
std::cout << std::endl;
std::cout << "++++++++++++++++++++" << std::endl;
std::cout << "Writing NeXus file" << std::endl;
std::cout << "++++++++++++++++++++" << std::endl;
std::cout << std::endl;
}
if (nxs->GetIdfVersion() == 1) {
std::cerr << "Error: IDF v1 write not yet implemented" << std::endl;
return;
}
// Write using the read object's data
int result = const_cast<nxH5::PNeXus*>(nxs)->WriteNexusFile(outFileName, nxs->GetIdfVersion());
if (result == 0) {
std::cout << "Successfully wrote: " << outFileName << std::endl;
} else {
std::cerr << "Failed to write file: " << outFileName << std::endl;
}
// write data from scratch
std::unique_ptr<nxH5::PNeXus> nxs_out = std::make_unique<nxH5::PNeXus>();
std::vector<int> ival;
std::vector<float> fval;
std::vector<std::string> sval;
H5::StrType strType(H5::PredType::C_S1, H5T_VARIABLE);
// ----------
// raw_data_1
// ----------
// IDF version
ival.push_back(2);
nxs_out->AddDataset<int>("/raw_data_1/IDF_version", ival, {1}, H5::PredType::NATIVE_INT);
ival.clear();
// add group attribute to '/raw_data_1'
nxs_out->AddGroupAttribute("/raw_data_1", "NX_class", std::string("NXentry"));
// beamline
sval.push_back("piE3");
nxs_out->AddDataset<std::string>("/raw_data_1/beamline", sval, {1}, strType);
sval.clear();
// definition
sval.push_back("muonTD");
nxs_out->AddDataset<std::string>("/raw_data_1/definition", sval, {1}, strType);
sval.clear();
// run_number
ival.push_back(1234);
nxs_out->AddDataset<int>("/raw_data_1/run_number", ival, {1}, H5::PredType::NATIVE_INT);
ival.clear();
// title
sval.push_back("this is the run title.");
nxs_out->AddDataset<std::string>("/raw_data_1/title", sval, {1}, strType);
sval.clear();
// start time
sval.push_back("2026-01-01T01:02:03");
nxs_out->AddDataset<std::string>("/raw_data_1/start_time", sval, {1}, strType);
sval.clear();
// end time
sval.push_back("2026-01-01T02:03:42");
nxs_out->AddDataset<std::string>("/raw_data_1/end_time", sval, {1}, strType);
sval.clear();
// experiment_identifier - pgroup for PSI
sval.push_back("p18324");
nxs_out->AddDataset<std::string>("/raw_data_1/experiment_identifier", sval, {1}, strType);
sval.clear();
// -------------------
// detector_1 (NXdata)
// -------------------
// add group attribute to /raw_data_1/instrument
nxs_out->AddGroupAttribute("/raw_data_1/detector_1", "NX_class", std::string("NXdata"));
// counts
std::vector<int> counts(16*66000, 42); // data 16 histos with length 66000
nxs_out->AddDataset<int>("/raw_data_1/detector_1/counts", counts, {1, 16, 66000}, H5::PredType::NATIVE_INT);
// attributes for counts
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "signal", 1);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "axes", std::string("period_index,spectrum_index,raw_time"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "long_name", std::string("positron_counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "t0_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "first_good_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "last_good_bin", 66000);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "units", std::string("counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/detector_1/counts", "target", std::string("/raw_data_1/instrument/detector_1/counts"));
// raw_time
std::vector<float> raw_time(66000, 0.0);
for (unsigned int i=0; i<raw_time.size(); i++)
raw_time[i] = 0.1953125f*1.0e-3*((float)i-2741.0f+0.5f);
nxs_out->AddDataset<float>("/raw_data_1/detector_1/raw_time", raw_time, {66000}, H5::PredType::NATIVE_FLOAT);
// attributes raw_time
nxs_out->AddDatasetAttribute<float>("/raw_data_1/detector_1/raw_time", "units", std::string("microseconds"));
nxs_out->AddDatasetAttribute<float>("/raw_data_1/detector_1/raw_time", "target", std::string("/raw_data_1/instrument/detector_1/raw_time"));
// ----------
// instrument
// ----------
// add group attribute to /raw_data_1/instrument
nxs_out->AddGroupAttribute("/raw_data_1/instrument", "NX_class", std::string("NXinstrument"));
// name
sval.push_back("LEM");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/name", sval, {1}, strType);
sval.clear();
// ------
// source
// ------
// add group attribute to /raw_data_1/instrument/source
nxs_out->AddGroupAttribute("/raw_data_1/instrument/source", "NX_class", std::string("NXsource"));
// name
sval.push_back("PSI");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/source/name", sval, {1}, strType);
sval.clear();
// type
sval.push_back("continuous muon source");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/source/types", sval, {1}, strType);
sval.clear();
// probe
sval.push_back("postive muons");
nxs_out->AddDataset<std::string>("/raw_data_1/instrument/source/probe", sval, {1}, strType);
sval.clear();
// -----------------------
// detector_1 (NXdetector)
// -----------------------
// add group attribute to /raw_data_1/instrument/detector_1
nxs_out->AddGroupAttribute("/raw_data_1/instrument/detector_1", "NX_class", std::string("NXdetector"));
// counts
nxs_out->AddDataset<int>("/raw_data_1/instrument/detector_1/counts", counts, {1, 16, 66000}, H5::PredType::NATIVE_INT);
// attributes for counts
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "signal", 1);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "axes", std::string("period_index,spectrum_index,raw_time"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "long_name", std::string("positron_counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "t0_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "first_good_bin", 2741);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "last_good_bin", 66000);
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "units", std::string("counts"));
nxs_out->AddDatasetAttribute<int>("/raw_data_1/instrument/detector_1/counts", "target", std::string("/raw_data_1/instrument/detector_1/counts"));
// raw_time
nxs_out->AddDataset<float>("/raw_data_1/instrument/detector_1/raw_time", raw_time, {66000}, H5::PredType::NATIVE_FLOAT);
// attributes raw_time
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/raw_time", "units", std::string("microseconds"));
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/raw_time", "target", std::string("/raw_data_1/instrument/detector_1/raw_time"));
// resolution
fval.push_back(195.3125);
nxs_out->AddDataset<float>("/raw_data_1/instrument/detector_1/resolution", fval, {1}, H5::PredType::NATIVE_FLOAT);
fval.clear();
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/resolution",
"units", std::string("picoseconds"));
// spectrum_index
for (unsigned int i=0; i<16; i++)
ival.push_back(i+1);
nxs_out->AddDataset<int>("/raw_data_1/instrument/detector_1/spectrum_index", ival, {16}, H5::PredType::NATIVE_INT);
ival.clear();
// dead_time
std::vector<float> deadTime(16, 0.0);
nxs_out->AddDataset<float>("/raw_data_1/instrument/detector_1/dead_time", deadTime, {16}, H5::PredType::NATIVE_FLOAT);
// attributes dead_time
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/dead_time", "available", 0);
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/dead_time", "units", std::string("microseconds"));
nxs_out->AddDatasetAttribute<float>("/raw_data_1/instrument/detector_1/dead_time", "target", std::string("/raw_data_1/instrument/detector_1/dead_time"));
// add root attributes
// file name
nxs_out->AddRootAttribute("file_name", std::string("_test.nxs"));
// date-time
std::time_t time = std::time({});
char timeString[std::size("yyyy-mm-ddThh:mm:ssZ")];
std::strftime(std::data(timeString), std::size(timeString),
"%FT%TZ", std::gmtime(&time));
nxs_out->AddRootAttribute("file_time", std::string(timeString));
// NeXus version
nxs_out->AddRootAttribute("NeXus_Version", std::string("4.3.0"));
// hdf5 version
nxs_out->AddRootAttribute("HDF5_Version", std::string(nxs->GetHdf5Version()));
// creator
nxs_out->AddRootAttribute("creator", std::string("h5nexus - PSI"));
nxs_out->WriteNexusFile("_test.nxs");
}
//-----------------------------------------------------------------------------
/**
* @brief Main entry point for the h5nexus program
*
* Parses command-line arguments and performs the requested operations:
* - Read and display NeXus HDF5 file information
* - Write NeXus HDF5 files with modified data
* - Calculate dead time corrections
*
* @param argc Number of command-line arguments
* @param argv Array of command-line argument strings
*
* @return 0 on success, non-zero on error
*
* @see h5nexus_syntax() for available command-line options
*/
int main(int argc, char *argv[])
{
std::string fileName{""};
std::string fileNameOut{""};
std::string dataNameOut{""};
int idx{-1};
bool printDebug{false};
bool deadTimeEstimate{false};
if (argc == 1)
h5nexus_syntax();
for (int i=1; i<argc; i++) {
if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
h5nexus_syntax();
} else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) {
#ifdef HAVE_CONFIG_H
#ifdef HAVE_GIT_REV_H
std::cout << std::endl << "h5nexus version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << " (" << BUILD_TYPE << ")" << std::endl << std::endl;
#else
std::cout << std::endl << "h5nexus version: " << PACKAGE_VERSION << " (" << BUILD_TYPE << ")" << std::endl << std::endl;
#endif
#else
#ifdef HAVE_GIT_REV_H
std::cout << std::endl << "h5nexus git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#else
std::cout << std::endl << "h5nexus version: unkown." << std::endl << std::endl;
#endif
#endif
return 0;
} else if (!strcmp(argv[i], "--fn")) {
if (i+1 >= argc) {
std::cout << std::endl << "**ERROR** found --fn without <fln>." << std::endl;
h5nexus_syntax();
}
i++;
fileName = argv[i];
} else if (!strcmp(argv[i], "-dt") || !strcmp(argv[i], "--dead_time_estimate")) {
deadTimeEstimate = true;
} else if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) {
printDebug = true;
} else if (!strcmp(argv[i], "--data")) {
if (i+2 >= argc) {
std::cout << std::endl << "**ERROR** in --data idx <dout>." << std::endl;
h5nexus_syntax();
}
int ii;
try {
ii = std::stoi(argv[i+1]);
} catch (const std::invalid_argument& ia) {
std::cout << std::endl << "**ERROR** couldn't convert idx from arguments given." << std::endl;
h5nexus_syntax();
}
if (ii < 0) {
std::cout << std::endl << "**ERROR** found idx < 0, namely " << ii << std::endl;
h5nexus_syntax();
}
idx = ii;
dataNameOut = argv[i+2];
i += 2;
} else if (!strcmp(argv[i], "--out")) {
if (i+1 >= argc) {
std::cout << std::endl << "**ERROR** found --out without <fout>." << std::endl;
h5nexus_syntax();
}
i++;
fileNameOut = argv[i];
} else {
h5nexus_syntax();
}
}
if (fileName.empty()) {
std::cerr << std::endl;
std::cerr << "**ERROR** <fln> is missing." << std::endl;
std::cerr << std::endl;
h5nexus_syntax();
}
if (printDebug) {
std::cout << std::endl;
std::cout << ">> fln = '" << fileName << "'" << std::endl;
std::cout << ">> fout = '" << fileNameOut << "'" << std::endl;
std::cout << ">> dout = '" << dataNameOut << "', idx=" << idx << std::endl;
std::cout << std::endl;
}
std::unique_ptr<nxH5::PNeXus> nxs = std::make_unique<nxH5::PNeXus>(fileName, printDebug);
nxs->Dump();
std::vector<float> dte;
if (deadTimeEstimate) {
dte = h5nexus_deadTimeEstimate(nxs.get(), printDebug);
}
if (!fileNameOut.empty()) {
h5nexus_writeTest(nxs.get(), fileNameOut, printDebug);
}
if (!dataNameOut.empty()) {
h5nexus_writeData(nxs.get(), fileName, dataNameOut, idx, dte);
}
return 0;
}
Binary file not shown.
+7
View File
@@ -32,6 +32,8 @@
#include <memory>
#include "TString.h"
#include "Minuit2/MnUserParameters.h"
#include "Minuit2/FunctionMinimum.h"
@@ -39,6 +41,7 @@
#include "PMsrHandler.h"
#include "PRunListCollection.h"
#include "PFitterFcn.h"
#include "PFitterFcnDKS.h"
//-------------------------------------------------------------
/**
@@ -292,6 +295,8 @@ class PFitter
private:
// State flags
Bool_t fDKSReady; ///< flag. true: fit via DKS/GPU. false: fit on CPU
Int_t fDKSTag; ///< tag. holding more detailed information about the DKS/CPU/GPU request
Bool_t fIsValid; ///< Overall validity flag: true if fitter initialized successfully
Bool_t fIsScanOnly; ///< Scan mode flag: true if only parameter scans requested (no minimization)
Bool_t fConverged; ///< Convergence flag: true if fit converged to a valid minimum
@@ -312,6 +317,7 @@ class PFitter
PIntPairVector fCmdList; ///< Parsed commands: first=command ID, second=line number
std::unique_ptr<PFitterFcn> fFitterFcn; ///< Objective function for Minuit2 minimization
std::unique_ptr<PFitterFcnDKS> fFitterFcnDKS; ///< Pointer to the DKS fitter function object
ROOT::Minuit2::MnUserParameters fMnUserParams; ///< Minuit2 parameter state (values, errors, limits)
std::unique_ptr<ROOT::Minuit2::FunctionMinimum> fFcnMin; ///< Minuit2 function minimum result
@@ -580,6 +586,7 @@ class PFitter
* @return Rounded parameter values
*/
PDoubleVector ParamRound(const PDoubleVector &par, const PDoubleVector &err, Bool_t &ok);
std::string GetCPUInfo();
};
#endif // _PFITTER_H_
+1
View File
@@ -61,6 +61,7 @@
*
* @see PFitter, PRunListCollection
* @see ROOT::Minuit2::FCNBase in ROOT Minuit2 documentation
>>>>>>> 25024aae (improve the doxygen docu with the help of Claude AI.)
*/
class PFitterFcn : public ROOT::Minuit2::FCNBase
{
+85
View File
@@ -0,0 +1,85 @@
/***************************************************************************
PFitterFcnDKS.h
Author: Andreas Suter
e-mail: andreas.suter@psi.ch
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2026 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef _PFITTERFCNDKS_H_
#define _PFITTERFCNDKS_H_
#include <vector>
#include <string>
#include "Minuit2/FCNBase.h"
#include "DKSBaseMuSR.h"
#include "PRunListCollection.h"
typedef struct {
UInt_t fN0; ///< N0 parameter index
UInt_t fNbkg; ///< Nbkg parameter index
} PNidx;
/**
* <p>This is the minuit2 interface function class providing the function to be optimized (chisq or log max-likelihood).
*/
class PFitterFcnDKS : public ROOT::Minuit2::FCNBase
{
public:
PFitterFcnDKS(PRunListCollection *runList, const Bool_t useChi2, const UInt_t dksTag, const std::string theo);
virtual ~PFitterFcnDKS();
virtual Bool_t IsValid() { return fValid; }
virtual Double_t Up() const { return fUp; }
virtual Double_t operator()(const std::vector<Double_t> &par) const;
virtual UInt_t GetTotalNoOfFittedBins() { return fRunListCollection->GetTotalNoOfBinsFitted(); }
virtual UInt_t GetNoOfFittedBins(const UInt_t idx) { return fRunListCollection->GetNoOfBinsFitted(idx); }
virtual void CalcExpectedChiSquare(const std::vector<Double_t> &par, Double_t &totalExpectedChisq, std::vector<Double_t> &expectedChisqPerRun);
virtual int GetDeviceName(std::string &devName);
private:
Bool_t fValid; ///< flag needed to ensure a valid state
std::string fTheoStr; ///< theory string for DKS compilation
Double_t fUp; ///< for chisq == 1.0, i.e. errors are 1 std. deviation errors. for log max-likelihood == 0.5, i.e. errors are 1 std. deviation errors (for details see the minuit2 user manual).
Bool_t fUseChi2; ///< true = chisq fit, false = log max-likelihood fit
PRunListCollection *fRunListCollection; ///< pre-processed data to be fitted
mutable DKSBaseMuSR fDKS;
std::vector<void *> fMemDataSingleHisto; ///< vector holding the initial addresses of the single histo data sets on the GPU
std::vector<void *> fMemDataSingleHistoErr; ///< vector holding the initial addresses of the single histo error sets on the GPU
std::vector<void *> fMemDataAsymmetry; ///< vector holding the initial addresses of the asymmetry data sets on the GPU
std::vector<void *> fMemDataAsymmetryErr; ///< vector holding the initial addresses of the asymmetry error sets on the GPU
std::vector<void *> fMemDataMuMinus; ///< vector holding the initial addresses of the mu minus data sets on the GPU
std::vector<void *> fMemDataMuMinusErr; ///< vector holding the initial addresses of the mu minus error sets on the GPU
std::vector<PNidx> fNidx; ///< N0 / Nbkg parameter index vector
virtual void InitDKS(const UInt_t dksTag);
virtual void FreeDKS();
};
#endif // _PFITTERFCNDKS_H_
+27 -6
View File
@@ -32,7 +32,16 @@
#include <vector>
#ifndef HAVE_DKS
#include <vector>
#include "fftw3.h"
#else
#include <complex>
#include "DKSBase.h"
#include "DKSFFT.h"
#endif
#include <TH1F.h>
#include <TH1F.h>
@@ -213,7 +222,8 @@ class PFourier
*/
PFourier(TH1F *data, Int_t unitTag,
Double_t startTime = 0.0, Double_t endTime = 0.0,
Bool_t dcCorrected = false, UInt_t zeroPaddingPower = 0);
Bool_t dcCorrected = false, UInt_t zeroPaddingPower = 0,
Bool_t useFFTW = true);
virtual ~PFourier();
@@ -225,7 +235,9 @@ class PFourier
*
* @param apodizationTag Apodization strength (0/1=none, 2=weak, 3=medium, 4=strong)
*/
virtual void Transform(UInt_t apodizationTag = 0);
virtual void Transform(UInt_t apodizationTag = F_APODIZATION_NONE);
virtual void SetUseFFTW(const Bool_t flag);
/// Returns the original data histogram title
/// @return Title string
@@ -301,12 +313,14 @@ class PFourier
/// Returns true if Fourier transform is ready
/// @return Validity status
virtual Bool_t IsValid() { return fValid; }
virtual Bool_t IsUseFFTW() { return fUseFFTW; }
private:
TH1F *fData; ///< data histogram to be Fourier transformed.
Bool_t fValid; ///< true = all boundary conditions fullfilled and hence a Fourier transform can be performed.
Int_t fUnitTag; ///< 1=Field Units (G), 2=Field Units (T), 3=Frequency Units (MHz), 4=Angular Frequency Units (Mc/s)
Bool_t fUseFFTW; ///< true = use FFTW, otherwise use DKS if present
Int_t fApodization; ///< 0=none, 1=weak, 2=medium, 3=strong
@@ -319,11 +333,18 @@ class PFourier
UInt_t fNoOfData; ///< number of bins in the time interval between fStartTime and fStopTime
UInt_t fNoOfBins; ///< number of bins to be Fourier transformed. Might be different to fNoOfData due to zero padding
fftw_plan fFFTwPlan; ///< fftw plan (see FFTW3 User Manual)
fftw_complex *fIn; ///< real part of the Fourier transform
fftw_complex *fOut; ///< imaginary part of the Fourier transform
//as PFTPhaseCorrection *fPhCorrectedReFT;
fftw_plan fFFTwPlan; ///< fftw plan (see FFTW3 User Manual)
fftw_complex *fIn; ///< real part of the Fourier transform
fftw_complex *fOut; ///< imaginary part of the Fourier transform
#ifdef HAVE_DKS
double *fInDKS; ///< real part of the Fourier transform
std::complex<double> *fOutDKS; ///< imaginary part of the Fourier transform
DKSFFT fDks; ///< Dynamic Kernel Scheduler
void *fReal_ptr; ///< real part of the Fourier on accelartor
void *fComp_ptr; ///< imaginary part of the Fourier on the acclerator
#endif
virtual void PrepareFFTwInputData(UInt_t apodizationTag);
virtual void ApodizeData(Int_t apodizationTag);
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+9
View File
@@ -30,6 +30,7 @@
#ifndef _PMSRHANDLER_H_
#define _PMSRHANDLER_H_
#include <string>
#include <memory>
#include <sstream>
#include <string>
@@ -373,6 +374,10 @@ class PMsrHandler
/// @return Error message string
virtual std::string GetLastErrorMsg() { return fLastErrorMsg.str(); }
virtual std::string GetDKSTheoryString();
virtual UInt_t GetDKSTag();
virtual Int_t GetNoOfMaps() { return fNoOfMaps; }
private:
Bool_t fFourierOnly; ///< Flag indicating Fourier transform only mode (for musrFT)
PStartupOptions *fStartupOptions; ///< Pointer to startup options from musrfit_startup.xml
@@ -398,6 +403,8 @@ class PMsrHandler
Bool_t fCopyStatisticsBlock; ///< If true, copy old statistics block (musrt0); if false, write new one (musrfit)
Int_t fNoOfMaps;
std::stringstream fLastErrorMsg; ///< Stream accumulating error messages during parsing
/// Parses FITPARAMETER block entries
@@ -466,6 +473,8 @@ class PMsrHandler
virtual Bool_t CheckRealFFT();
/// Validates maximum likelihood fit settings
virtual void CheckMaxLikelihood();
virtual void HandleTheoryArguments(const TString theo, PStringVector &args);
};
#endif // _PMSRHANDLER_H_
+44 -36
View File
@@ -348,6 +348,13 @@
*/
#define RRF_FREQ_UNDEF 1.0e10
//-------------------------------------------------------------
// DKS related tags
#define DKS_CPU_OPENMP 0
#define DKS_CPU_OPENCL 1
#define DKS_GPU_OPENCL 2
#define DKS_GPU_CUDA 3
//-------------------------------------------------------------
/**
* <p>typedef to make to code more readable. Definition of a bool vector.
@@ -923,44 +930,44 @@ class PRawRunData {
PNonMusrRawRunData fDataNonMusr; ///< keeps all ascii- or db-file info in case of nonMusr fit
private:
TString fVersion{"n/a"}; ///< keeps the version information of the data file
TString fGenericValidatorURL{"n/a"}; ///< keeps the generic validator MusrRoot URL
TString fSpecificValidatorURL{"n/a"}; ///< keeps the instrument specific validator MusrRoot URL
TString fGenerator{"n/a"}; ///< keeps the data file generator name
TString fComment{"n/a"}; ///< keeps the data file comment
TString fFileName{"n/a"}; ///< keeps the name of the original data file
TString fLaboratory{"n/a"}; ///< keeps the name of the laboratory, e.g. PSI, ISIS, TRIUMF, JPARC
TString fBeamline{"n/a"}; ///< keeps the name of the be beamline, e.g. muE4, piM3.1, ...
TString fInstrument{"n/a"}; ///< keeps the name of the instrument, e.g. LEM, GPS, MUSR, EMU, ...
TString fMuonSource{"n/a"}; ///< keeps the type of muon source, e.g. continous surface beam, pulsed beam, low energy muon beam
TString fMuonSpecies{"n/a"}; ///< positive muon or negative muon
Double_t fMuonBeamMomentum{PMUSR_UNDEFINED}; ///< given in MeV/c, for LEM this is the momentum of the secondary beamline and NOT the momentum of the low energy beam
Double_t fMuonSpinAngle{PMUSR_UNDEFINED}; ///< gives the muon spin angle in degrees (reference frame depends on the instrument)
TString fRunName{"n/a"}; ///< name of the run as found in the msr-file
Int_t fRunNumber{-1}; ///< run number
TString fRunTitle{"n/a"}; ///< run title
TString fSetup{"n/a"}; ///< description of the setup of this run
TString fStartTime{"n/a"}; ///< start time of the run
TString fStartDate{"n/a"}; ///< start date of the run
time_t fStartDateTimeSec{0}; ///< start run given as time_t object
TString fStopTime{"n/a"}; ///< stop time of the run
TString fStopDate{"n/a"}; ///< stop date of the run
time_t fStopDateTimeSec{0}; ///< stop run given as time_t object
TString fCryo{"n/a"}; ///< name of the cryo
TString fSample{"n/a"}; ///< description of the sample
TString fOrientation{"n/a"}; ///< description of the orientation
TString fMagnet{"n/a"}; ///< name of the sample magnet
Double_t fField{PMUSR_UNDEFINED}; ///< magnetic field value in (G)
PDoublePairVector fTemp; ///< measured temperatures and standard deviations during the run
Double_t fEnergy{PMUSR_UNDEFINED}; ///< implantation energy of the muon
Double_t fTransport{PMUSR_UNDEFINED}; ///< LEM transport settings (Moderator HV)
PDoubleVector fRingAnode; ///< LEM ring anode HVs (L,R[,T,B])
Double_t fTimeResolution{PMUSR_UNDEFINED}; ///< time resolution of the run in (ns)
PIntVector fRedGreenOffset; ///< keeps the Red/Green offsets
TString fVersion; ///< keeps the version information of the data file
TString fGenericValidatorURL; ///< keeps the generic validator MusrRoot URL
TString fSpecificValidatorURL; ///< keeps the instrument specific validator MusrRoot URL
TString fGenerator; ///< keeps the data file generator name
TString fComment; ///< keeps the data file comment
TString fFileName; ///< keeps the name of the original data file
TString fLaboratory; ///< keeps the name of the laboratory, e.g. PSI, ISIS, TRIUMF, JPARC
TString fBeamline; ///< keeps the name of the be beamline, e.g. muE4, piM3.1, ...
TString fInstrument; ///< keeps the name of the instrument, e.g. LEM, GPS, MUSR, EMU, ...
TString fMuonSource; ///< keeps the type of muon source, e.g. continous surface beam, pulsed beam, low energy muon beam
TString fMuonSpecies; ///< positive muon or negative muon
Double_t fMuonBeamMomentum; ///< given in MeV/c, for LEM this is the momentum of the secondary beamline and NOT the momentum of the low energy beam
Double_t fMuonSpinAngle; ///< gives the muon spin angle in degrees (reference frame depends on the instrument)
TString fRunName; ///< name of the run as found in the msr-file
Int_t fRunNumber; ///< run number
TString fRunTitle; ///< run title
TString fSetup; ///< description of the setup of this run
TString fStartTime; ///< start time of the run
TString fStartDate; ///< start date of the run
time_t fStartDateTimeSec; ///< start run given as time_t object
TString fStopTime; ///< stop time of the run
TString fStopDate; ///< stop date of the run
time_t fStopDateTimeSec; ///< stop run given as time_t object
TString fCryo; ///< name of the cryo
TString fSample; ///< description of the sample
TString fOrientation; ///< description of the orientation
TString fMagnet; ///< name of the sample magnet
Double_t fField; ///< magnetic field value in (G)
PDoublePairVector fTemp; ///< measured temperatures and standard deviations during the run
Double_t fEnergy; ///< implantation energy of the muon
Double_t fTransport; ///< LEM transport settings (Moderator HV)
PDoubleVector fRingAnode; ///< LEM ring anode HVs (L,R[,T,B])
Double_t fTimeResolution; ///< time resolution of the run in (ns)
PIntVector fRedGreenOffset; ///< keeps the Red/Green offsets
std::vector<float> fDeadTimeParam; ///< dead time parameter vector needed for pulsed sources
Int_t fNumberOfGoodFrames{0}; ///< needed to correct dead times at pulsed sources
PRawRunDataVector fData; ///< keeps the histos together with the histo related properties such as T0, first good bin, etc.
PRawRunDataVector fData; ///< keeps the histos together with the histo related properties such as T0, first good bin, etc.
};
//-------------------------------------------------------------
@@ -1222,7 +1229,7 @@ class PMsrRunBlock {
Int_t fFitRangeOffset[2]; ///< if fit range is given in bins it can have the form fit fgb+n0 lgb-n1. This variable holds the n0 and n1.
Double_t fAlpha; ///< estimated alpha value from F/B counts
Int_t fPacking; ///< packing/rebinning
TString fDeadTimeCorrection; ///< tells if deadtime correction (pulsed sources) should be applied. Possible value: 'no' (default), 'file', 'estimate'
TString fDeadTimeCorrection; ///< tells if deadtime correction (pulsed sources) should be applied. Possible value: 'no' (default), 'file', 'estimate'
Int_t fXYDataIndex[2]; ///< used to get the data indices when using db-files (fit type 8)
TString fXYDataLabel[2]; ///< used to get the indices via labels when using db-files (fit type 8)
@@ -1378,6 +1385,7 @@ struct PAny2ManyInfo {
struct PStartupOptions {
Bool_t writeExpectedChisq; ///< if set to true, expected chisq and chisq per block will be written
Bool_t estimateN0; ///< if set to true, for single histogram fits N0 will be estimated
Bool_t useDKS; ///< if set to true, use DKS if present and "sensible" (from xml)
};
//-------------------------------------------------------------
+5 -2
View File
@@ -290,7 +290,8 @@ class PMusrCanvas : public TObject, public TQObject
*/
PMusrCanvas(const Int_t number, const Char_t* title,
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh, const Bool_t batch,
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false);
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false,
const Bool_t useDKS=false);
//----------------------------------------------------------------------
/**
@@ -314,7 +315,8 @@ class PMusrCanvas : public TObject, public TQObject
Int_t wtopx, Int_t wtopy, Int_t ww, Int_t wh,
PMsrFourierStructure fourierDefault,
const PIntVector markerList, const PIntVector colorList, const Bool_t batch,
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false);
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false,
const Bool_t useDKS=false);
/// Destructor - cleans up all histograms, graphs, and ROOT objects
virtual ~PMusrCanvas();
@@ -358,6 +360,7 @@ class PMusrCanvas : public TObject, public TQObject
Bool_t fTheoAsData; ///< flag if true, calculate theory points only at the data points
Bool_t fStartWithFourier; ///< flag if true, the Fourier transform will be presented bypassing the time domain representation
Bool_t fStartWithAvg; ///< flag if true, the averaged data/Fourier will be presented
Bool_t fUseDKS; ///< flag if true, use DKS if it is enabled
Int_t fTimeout; ///< timeout after which the Done signal should be emited. If timeout <= 0, no timeout is taking place
Bool_t fScaleN0AndBkg; ///< true=N0 and background is scaled to (1/ns), otherwise (1/bin) for the single histogram case
Bool_t fBatchMode; ///< musrview in ROOT batch mode
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+4
View File
@@ -221,6 +221,8 @@ class PRunBase
*/
virtual void CalcTheory() = 0;
virtual Double_t GetTimeResolution() { return fTimeResolution; } ///< returns the native raw data time resolution
/**
* \brief Returns the run number (0-based index in MSR file).
* \return Run number corresponding to position in MSR RUN blocks
@@ -241,6 +243,8 @@ class PRunBase
*/
virtual PRunData* GetData() { return &fData; }
virtual PMetaData GetMetaData() { return fMetaData; } ///< returns the meta data
/**
* \brief Cleans up internal data structures.
*
+356 -356
View File
@@ -490,193 +490,193 @@ class PRunDataHandler
template <typename T>
Bool_t PRunDataHandler::ReadNexusFileIdf1(T& nxs_file)
{
PRawRunData runData;
PRawRunDataSet dataSet;
TString str;
std::string sstr;
Int_t ival;
Double_t dval, factor;
bool ok;
PRawRunData runData;
PRawRunDataSet dataSet;
TString str;
std::string sstr;
Int_t ival;
Double_t dval, factor;
bool ok;
// get header information
// get header information
// get/set laboratory
sstr = "n/a";
if (nxs_file->HasDataset("/run/lab"))
sstr = nxs_file->template GetDataset<std::string>("/run/lab").GetData()[0];
runData.SetLaboratory(sstr);
// get/set laboratory
sstr = "n/a";
if (nxs_file->HasDataset("/run/lab"))
sstr = nxs_file->template GetDataset<std::string>("/run/lab").GetData()[0];
runData.SetLaboratory(sstr);
// get/set beamline
sstr = "n/a";
if (nxs_file->HasDataset("/run/beamline"))
sstr = nxs_file->template GetDataset<std::string>("/run/beamline").GetData()[0];
runData.SetBeamline(sstr);
// get/set beamline
sstr = "n/a";
if (nxs_file->HasDataset("/run/beamline"))
sstr = nxs_file->template GetDataset<std::string>("/run/beamline").GetData()[0];
runData.SetBeamline(sstr);
// get/set instrument
sstr = "n/a";
if (nxs_file->HasDataset("/run/instrument/name"))
sstr = nxs_file->template GetDataset<std::string>("/run/instrument/name").GetData()[0];
runData.SetInstrument(sstr);
// get/set instrument
sstr = "n/a";
if (nxs_file->HasDataset("/run/instrument/name"))
sstr = nxs_file->template GetDataset<std::string>("/run/instrument/name").GetData()[0];
runData.SetInstrument(sstr);
// get/set run title
str = "n/a";
if (nxs_file->HasDataset("/run/title"))
sstr = nxs_file->template GetDataset<std::string>("/run/title").GetData()[0];
runData.SetRunTitle(sstr);
// get/set run title
str = "n/a";
if (nxs_file->HasDataset("/run/title"))
sstr = nxs_file->template GetDataset<std::string>("/run/title").GetData()[0];
runData.SetRunTitle(sstr);
// get/set run number
ival = -1;
if (nxs_file->HasDataset("/run/number"))
ival = nxs_file->template GetDataset<int>("/run/number").GetData()[0];
runData.SetRunNumber(ival);
// get/set run number
ival = -1;
if (nxs_file->HasDataset("/run/number"))
ival = nxs_file->template GetDataset<int>("/run/number").GetData()[0];
runData.SetRunNumber(ival);
// get/set temperature
dval = PMUSR_UNDEFINED;
sstr = "n/a";
if (nxs_file->HasDataset("/run/sample/temperature")) {
auto tmp_ds = nxs_file->template GetDataset<float>("/run/sample/temperature");
dval = tmp_ds.GetData()[0];
if (tmp_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(tmp_ds.GetAttribute("units"));
if (sstr == "Celcius")
dval += 273.16;
}
runData.SetTemperature(0, dval, 0.0);
// get/set field
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/run/sample/magnetic_field")) {
auto mag_ds = nxs_file->template GetDataset<float>("/run/sample/magnetic_field");
dval = mag_ds.GetData()[0];
if (mag_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(mag_ds.GetAttribute("units"));
if (sstr == "Tesla")
factor = 1.0e4;
}
runData.SetField(dval*factor);
// get/set implantation energy
runData.SetEnergy(PMUSR_UNDEFINED);
// get/set moderator HV
runData.SetTransport(PMUSR_UNDEFINED);
// get/set RA HV's (LEM specific)
for (UInt_t i=0; i<4; i++)
runData.SetRingAnode(i, PMUSR_UNDEFINED);
// get/set setup
sstr = "n/a";
if (nxs_file->HasDataset("/run/notes"))
sstr = nxs_file->template GetDataset<std::string>("/run/notes").GetData()[0];
runData.SetSetup(sstr);
// get/set sample
sstr = "n/a";
if (nxs_file->HasDataset("/run/sample/name"))
sstr = nxs_file->template GetDataset<std::string>("/run/sample/name").GetData()[0];
runData.SetSample(sstr);
// get/set orientation
runData.SetOrientation("??");
// get/set time resolution (ns)
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/run/histogram_data_1/resolution")) {
auto res_ds = nxs_file->template GetDataset<int>("/run/histogram_data_1/resolution");
dval = res_ds.GetData()[0];
if (res_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(res_ds.GetAttribute("units"));
if ((sstr == "picoseconds") || (sstr == "pico.seconds"))
factor = 1.0e-3; // ps -> ns
}
runData.SetTimeResolution(dval*factor);
// get/set start/stop time
sstr = "n/a";
TString date{"n/a"}, time{"n/a"};
if (nxs_file->HasDataset("/run/start_time"))
sstr = nxs_file->template GetDataset<std::string>("/run/start_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStartTime(time);
runData.SetStartDate(date);
}
sstr = "n/a";
date = "n/a";
time = "n/a";
if (nxs_file->HasDataset("/run/stop_time"))
sstr = nxs_file->template GetDataset<std::string>("/run/stop_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStopTime(time);
runData.SetStopDate(date);
}
// get/set deadtime relevant parameters
if (nxs_file->HasDataset("/run/instrument/detector/deadtimes")) {
std::vector<float> dt;
dt = nxs_file->template GetDataset<float>("/run/instrument/detector/deadtimes").GetData();
runData.SetDeadTimeParam(dt);
}
if (nxs_file->HasDataset("/run/instrument/beam/frames_good")) {
ival = nxs_file->template GetDataset<float>("/run/instrument/beam/frames_good").GetData()[0];
runData.SetNumberOfGoodFrames(ival);
}
// data with its metadata
if (nxs_file->HasDataset("/run/histogram_data_1/counts")) {
int t0_bin{-1}, fgb{-1}, lgb{-1}, noOfHistos{-1}, histoLength{-1};
auto count_ds = nxs_file->template GetDataset<int>("/run/histogram_data_1/counts");
auto count = count_ds.GetData();
// get all necessary attributes
if (count_ds.HasAttribute("t0_bin"))
t0_bin = std::any_cast<int>(count_ds.GetAttribute("t0_bin"));
if (count_ds.HasAttribute("first_good_bin"))
fgb = std::any_cast<int>(count_ds.GetAttribute("first_good_bin"));
if (count_ds.HasAttribute("last_good_bin"))
lgb = std::any_cast<int>(count_ds.GetAttribute("last_good_bin"));
if (count_ds.HasAttribute("number"))
noOfHistos = std::any_cast<int>(count_ds.GetAttribute("number"));
if (count_ds.HasAttribute("length"))
histoLength = std::any_cast<int>(count_ds.GetAttribute("length"));
if (static_cast<int>(count.size()) != noOfHistos*histoLength) {
std::cerr << std::endl << "**ERROR** PNeXus data size error! count.size()=" << count.size() << ", #histos=" << noOfHistos << ", length=" << histoLength << "." << std::endl;
return false;
// get/set temperature
dval = PMUSR_UNDEFINED;
sstr = "n/a";
if (nxs_file->HasDataset("/run/sample/temperature")) {
auto tmp_ds = nxs_file->template GetDataset<float>("/run/sample/temperature");
dval = tmp_ds.GetData()[0];
if (tmp_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(tmp_ds.GetAttribute("units"));
if (sstr == "Celcius")
dval += 273.16;
}
// fill dataSet
PDoubleVector data;
for (int i=0; i<noOfHistos; i++) {
dataSet.Clear();
dataSet.SetHistoNo(i+1); // i.e. histo numbers start with 1
dataSet.SetTimeZeroBin(t0_bin);
dataSet.SetFirstGoodBin(fgb);
dataSet.SetLastGoodBin(lgb);
for (int j=0; j<histoLength; j++)
data.push_back(count[i*histoLength+j]);
dataSet.SetData(data);
runData.SetDataSet(dataSet);
data.clear();
runData.SetTemperature(0, dval, 0.0);
// get/set field
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/run/sample/magnetic_field")) {
auto mag_ds = nxs_file->template GetDataset<float>("/run/sample/magnetic_field");
dval = mag_ds.GetData()[0];
if (mag_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(mag_ds.GetAttribute("units"));
if (sstr == "Tesla")
factor = 1.0e4;
}
runData.SetField(dval*factor);
// get/set implantation energy
runData.SetEnergy(PMUSR_UNDEFINED);
// get/set moderator HV
runData.SetTransport(PMUSR_UNDEFINED);
// get/set RA HV's (LEM specific)
for (UInt_t i=0; i<4; i++)
runData.SetRingAnode(i, PMUSR_UNDEFINED);
// get/set setup
sstr = "n/a";
if (nxs_file->HasDataset("/run/notes"))
sstr = nxs_file->template GetDataset<std::string>("/run/notes").GetData()[0];
runData.SetSetup(sstr);
// get/set sample
sstr = "n/a";
if (nxs_file->HasDataset("/run/sample/name"))
sstr = nxs_file->template GetDataset<std::string>("/run/sample/name").GetData()[0];
runData.SetSample(sstr);
// get/set orientation
runData.SetOrientation("??");
// get/set time resolution (ns)
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/run/histogram_data_1/resolution")) {
auto res_ds = nxs_file->template GetDataset<int>("/run/histogram_data_1/resolution");
dval = res_ds.GetData()[0];
if (res_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(res_ds.GetAttribute("units"));
if ((sstr == "picoseconds") || (sstr == "pico.seconds"))
factor = 1.0e-3; // ps -> ns
}
runData.SetTimeResolution(dval*factor);
// get/set start/stop time
sstr = "n/a";
TString date{"n/a"}, time{"n/a"};
if (nxs_file->HasDataset("/run/start_time"))
sstr = nxs_file->template GetDataset<std::string>("/run/start_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStartTime(time);
runData.SetStartDate(date);
}
// keep run name from the msr-file
runData.SetRunName(fRunName);
sstr = "n/a";
date = "n/a";
time = "n/a";
if (nxs_file->HasDataset("/run/stop_time"))
sstr = nxs_file->template GetDataset<std::string>("/run/stop_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStopTime(time);
runData.SetStopDate(date);
}
// keep the information
fData.push_back(runData);
} else { // no data found
std::cerr << std::endl << "**ERROR** PNeXus couldn't obtain data: '/run/histogram_data_1/counts' is missing." << std::endl;
return false;
}
// get/set deadtime relevant parameters
if (nxs_file->HasDataset("/run/instrument/detector/deadtimes")) {
std::vector<float> dt;
dt = nxs_file->template GetDataset<float>("/run/instrument/detector/deadtimes").GetData();
runData.SetDeadTimeParam(dt);
}
if (nxs_file->HasDataset("/run/instrument/beam/frames_good")) {
ival = nxs_file->template GetDataset<float>("/run/instrument/beam/frames_good").GetData()[0];
runData.SetNumberOfGoodFrames(ival);
}
return true;
// data with its metadata
if (nxs_file->HasDataset("/run/histogram_data_1/counts")) {
int t0_bin{-1}, fgb{-1}, lgb{-1}, noOfHistos{-1}, histoLength{-1};
auto count_ds = nxs_file->template GetDataset<int>("/run/histogram_data_1/counts");
auto count = count_ds.GetData();
// get all necessary attributes
if (count_ds.HasAttribute("t0_bin"))
t0_bin = std::any_cast<int>(count_ds.GetAttribute("t0_bin"));
if (count_ds.HasAttribute("first_good_bin"))
fgb = std::any_cast<int>(count_ds.GetAttribute("first_good_bin"));
if (count_ds.HasAttribute("last_good_bin"))
lgb = std::any_cast<int>(count_ds.GetAttribute("last_good_bin"));
if (count_ds.HasAttribute("number"))
noOfHistos = std::any_cast<int>(count_ds.GetAttribute("number"));
if (count_ds.HasAttribute("length"))
histoLength = std::any_cast<int>(count_ds.GetAttribute("length"));
if (static_cast<int>(count.size()) != noOfHistos*histoLength) {
std::cerr << std::endl << "**ERROR** PNeXus data size error! count.size()=" << count.size() << ", #histos=" << noOfHistos << ", length=" << histoLength << "." << std::endl;
return false;
}
// fill dataSet
PDoubleVector data;
for (int i=0; i<noOfHistos; i++) {
dataSet.Clear();
dataSet.SetHistoNo(i+1); // i.e. histo numbers start with 1
dataSet.SetTimeZeroBin(t0_bin);
dataSet.SetFirstGoodBin(fgb);
dataSet.SetLastGoodBin(lgb);
for (int j=0; j<histoLength; j++)
data.push_back(count[i*histoLength+j]);
dataSet.SetData(data);
runData.SetDataSet(dataSet);
data.clear();
}
// keep run name from the msr-file
runData.SetRunName(fRunName);
// keep the information
fData.push_back(runData);
} else { // no data found
std::cerr << std::endl << "**ERROR** PNeXus couldn't obtain data: '/run/histogram_data_1/counts' is missing." << std::endl;
return false;
}
return true;
}
//--------------------------------------------------------------------------
@@ -685,202 +685,202 @@ Bool_t PRunDataHandler::ReadNexusFileIdf1(T& nxs_file)
template <typename T>
Bool_t PRunDataHandler::ReadNexusFileIdf2(T& nxs_file)
{
PRawRunData runData;
PRawRunDataSet dataSet;
TString str;
std::string sstr;
Int_t ival;
Double_t dval, factor;
bool ok;
PRawRunData runData;
PRawRunDataSet dataSet;
TString str;
std::string sstr;
Int_t ival;
Double_t dval, factor;
bool ok;
// get header information
// get header information
// get/set laboratory
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/source/name"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/source/name").GetData()[0];
runData.SetLaboratory(sstr);
// get/set laboratory
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/source/name"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/source/name").GetData()[0];
runData.SetLaboratory(sstr);
// get/set beamline
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/name"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/name").GetData()[0];
runData.SetBeamline(sstr);
runData.SetBeamline(sstr);
// get/set beamline
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/name"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/name").GetData()[0];
runData.SetBeamline(sstr);
runData.SetBeamline(sstr);
// get/set muon source
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/source/type"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/source/type").GetData()[0];
runData.SetMuonSource(sstr);
// get/set muon source
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/source/type"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/source/type").GetData()[0];
runData.SetMuonSource(sstr);
// get/set muon species
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/source/probe"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/source/probe").GetData()[0];
runData.SetMuonSpecies(sstr);
// get/set muon species
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/instrument/source/probe"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/instrument/source/probe").GetData()[0];
runData.SetMuonSpecies(sstr);
// get/set run title
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/title"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/title").GetData()[0];
runData.SetRunTitle(sstr);
// get/set run title
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/title"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/title").GetData()[0];
runData.SetRunTitle(sstr);
// get/set run number
ival = -1;
if (nxs_file->HasDataset("/raw_data_1/run_number"))
ival = nxs_file->template GetDataset<int>("/raw_data_1/run_number").GetData()[0];
runData.SetRunNumber(ival);
// get/set run number
ival = -1;
if (nxs_file->HasDataset("/raw_data_1/run_number"))
ival = nxs_file->template GetDataset<int>("/raw_data_1/run_number").GetData()[0];
runData.SetRunNumber(ival);
// get/set temperature
dval = PMUSR_UNDEFINED;
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/sample/temperature")) {
auto tmp_ds = nxs_file->template GetDataset<float>("/raw_data_1/sample/temperature");
dval = tmp_ds.GetData()[0];
if (tmp_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(tmp_ds.GetAttribute("units"));
if (sstr == "Celcius")
dval += 273.16;
}
runData.SetTemperature(0, dval, 0.0);
// get/set field
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/raw_data_1/sample/magnetic_field")) {
auto mag_ds = nxs_file->template GetDataset<float>("/raw_data_1/sample/magnetic_field");
dval = mag_ds.GetData()[0];
if (mag_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(mag_ds.GetAttribute("units"));
if (sstr == "Tesla")
factor = 1.0e4;
}
runData.SetField(dval*factor);
// get/set implantation energy
runData.SetEnergy(PMUSR_UNDEFINED);
// get/set implantation energy
runData.SetEnergy(PMUSR_UNDEFINED);
// get/set moderator HV
runData.SetTransport(PMUSR_UNDEFINED);
// get/set RA HV's (LEM specific)
for (UInt_t i=0; i<4; i++)
runData.SetRingAnode(i, PMUSR_UNDEFINED);
// get/set setup
sstr = "n/a";
runData.SetSetup(str);
// get/set sample
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/sample/name"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/sample/name").GetData()[0];
runData.SetSample(sstr);
// get/set orientation
runData.SetOrientation("n/a");
// get/set time resolution (ns)
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/raw_data_1/instrument/detector_1/resolution")) {
auto res_ds = nxs_file->template GetDataset<int>("/raw_data_1/instrument/detector_1/resolution");
dval = res_ds.GetData()[0];
if (res_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(res_ds.GetAttribute("units"));
if ((sstr == "picoseconds") || (sstr == "pico.seconds"))
factor = 1.0e-3; // ps -> ns
}
runData.SetTimeResolution(dval*factor);
// get/set start/stop time
sstr = "n/a";
TString date{"n/a"}, time{"n/a"};
if (nxs_file->HasDataset("/raw_data_1/start_time"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/start_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStartTime(time);
runData.SetStartDate(date);
}
sstr = "n/a";
date = "n/a";
time = "n/a";
if (nxs_file->HasDataset("/raw_data_1/end_time"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/end_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStopTime(time);
runData.SetStopDate(date);
}
// get/set deadtime relevant parameters
if (nxs_file->HasDataset("/raw_data_1/instrument/detector_1/dead_time")) {
std::vector<float> dt;
dt = nxs_file->template GetDataset<float>("/raw_data_1/instrument/detector_1/dead_time").GetData();
runData.SetDeadTimeParam(dt);
}
if (nxs_file->HasDataset("/raw_data_1/good_frames")) {
ival = nxs_file->template GetDataset<int>("/raw_data_1/good_frames").GetData()[0];
runData.SetNumberOfGoodFrames(ival);
}
// data with its metadata
if (nxs_file->HasDataset("/raw_data_1/instrument/detector_1/counts")) {
int t0_bin{-1}, fgb{-1}, lgb{-1}, noOfHistos{-1}, histoLength{-1};
auto count_ds = nxs_file->template GetDataset<int>("/raw_data_1/instrument/detector_1/counts");
auto count = count_ds.GetData();
auto dims = count_ds.GetDimensions();
if (dims.size() < 3) {
std::cerr << std::endl << "**ERROR** PNeXus data dimension error! dims.size()=" << dims.size() << ", expecting == 3." << std::endl;
return false;
// get/set temperature
dval = PMUSR_UNDEFINED;
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/sample/temperature")) {
auto tmp_ds = nxs_file->template GetDataset<float>("/raw_data_1/sample/temperature");
dval = tmp_ds.GetData()[0];
if (tmp_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(tmp_ds.GetAttribute("units"));
if (sstr == "Celcius")
dval += 273.16;
}
noOfHistos = dims[1];
histoLength = dims[2];
// get all necessary attributes
if (count_ds.HasAttribute("t0_bin"))
t0_bin = std::any_cast<int>(count_ds.GetAttribute("t0_bin"));
if (count_ds.HasAttribute("first_good_bin"))
fgb = std::any_cast<int>(count_ds.GetAttribute("first_good_bin"));
if (count_ds.HasAttribute("last_good_bin"))
lgb = std::any_cast<int>(count_ds.GetAttribute("last_good_bin"));
if (static_cast<int>(count.size()) != noOfHistos*histoLength) {
std::cerr << std::endl << "**ERROR** PNeXus data size error! count.size()=" << count.size() << ", #histos=" << noOfHistos << ", length=" << histoLength << "." << std::endl;
return false;
runData.SetTemperature(0, dval, 0.0);
// get/set field
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/raw_data_1/sample/magnetic_field")) {
auto mag_ds = nxs_file->template GetDataset<float>("/raw_data_1/sample/magnetic_field");
dval = mag_ds.GetData()[0];
if (mag_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(mag_ds.GetAttribute("units"));
if (sstr == "Tesla")
factor = 1.0e4;
}
runData.SetField(dval*factor);
// get/set implantation energy
runData.SetEnergy(PMUSR_UNDEFINED);
// get/set implantation energy
runData.SetEnergy(PMUSR_UNDEFINED);
// get/set moderator HV
runData.SetTransport(PMUSR_UNDEFINED);
// get/set RA HV's (LEM specific)
for (UInt_t i=0; i<4; i++)
runData.SetRingAnode(i, PMUSR_UNDEFINED);
// get/set setup
sstr = "n/a";
runData.SetSetup(str);
// get/set sample
sstr = "n/a";
if (nxs_file->HasDataset("/raw_data_1/sample/name"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/sample/name").GetData()[0];
runData.SetSample(sstr);
// get/set orientation
runData.SetOrientation("n/a");
// get/set time resolution (ns)
dval = PMUSR_UNDEFINED;
sstr = "n/a";
factor = 1.0;
if (nxs_file->HasDataset("/raw_data_1/instrument/detector_1/resolution")) {
auto res_ds = nxs_file->template GetDataset<int>("/raw_data_1/instrument/detector_1/resolution");
dval = res_ds.GetData()[0];
if (res_ds.HasAttribute("units"))
sstr = std::any_cast<std::string>(res_ds.GetAttribute("units"));
if ((sstr == "picoseconds") || (sstr == "pico.seconds"))
factor = 1.0e-3; // ps -> ns
}
runData.SetTimeResolution(dval*factor);
// get/set start/stop time
sstr = "n/a";
TString date{"n/a"}, time{"n/a"};
if (nxs_file->HasDataset("/raw_data_1/start_time"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/start_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStartTime(time);
runData.SetStartDate(date);
}
// fill dataSet
PDoubleVector data;
for (int i=0; i<noOfHistos; i++) {
dataSet.Clear();
dataSet.SetHistoNo(i+1); // i.e. histo numbers start with 1
dataSet.SetTimeZeroBin(t0_bin);
dataSet.SetFirstGoodBin(fgb);
dataSet.SetLastGoodBin(lgb);
for (int j=0; j<histoLength; j++)
data.push_back(count[i*histoLength+j]);
dataSet.SetData(data);
runData.SetDataSet(dataSet);
data.clear();
sstr = "n/a";
date = "n/a";
time = "n/a";
if (nxs_file->HasDataset("/raw_data_1/end_time"))
sstr = nxs_file->template GetDataset<std::string>("/raw_data_1/end_time").GetData()[0];
str = sstr;
SplitTimeDate(str, time, date, ok);
if (ok) {
runData.SetStopTime(time);
runData.SetStopDate(date);
}
// keep run name from the msr-file
runData.SetRunName(fRunName);
// get/set deadtime relevant parameters
if (nxs_file->HasDataset("/raw_data_1/instrument/detector_1/dead_time")) {
std::vector<float> dt;
dt = nxs_file->template GetDataset<float>("/raw_data_1/instrument/detector_1/dead_time").GetData();
runData.SetDeadTimeParam(dt);
}
if (nxs_file->HasDataset("/raw_data_1/good_frames")) {
ival = nxs_file->template GetDataset<int>("/raw_data_1/good_frames").GetData()[0];
runData.SetNumberOfGoodFrames(ival);
}
// keep the information
fData.push_back(runData);
}
// data with its metadata
if (nxs_file->HasDataset("/raw_data_1/instrument/detector_1/counts")) {
int t0_bin{-1}, fgb{-1}, lgb{-1}, noOfHistos{-1}, histoLength{-1};
auto count_ds = nxs_file->template GetDataset<int>("/raw_data_1/instrument/detector_1/counts");
auto count = count_ds.GetData();
auto dims = count_ds.GetDimensions();
if (dims.size() < 3) {
std::cerr << std::endl << "**ERROR** PNeXus data dimension error! dims.size()=" << dims.size() << ", expecting == 3." << std::endl;
return false;
}
noOfHistos = dims[1];
histoLength = dims[2];
// get all necessary attributes
if (count_ds.HasAttribute("t0_bin"))
t0_bin = std::any_cast<int>(count_ds.GetAttribute("t0_bin"));
if (count_ds.HasAttribute("first_good_bin"))
fgb = std::any_cast<int>(count_ds.GetAttribute("first_good_bin"));
if (count_ds.HasAttribute("last_good_bin"))
lgb = std::any_cast<int>(count_ds.GetAttribute("last_good_bin"));
if (static_cast<int>(count.size()) != noOfHistos*histoLength) {
std::cerr << std::endl << "**ERROR** PNeXus data size error! count.size()=" << count.size() << ", #histos=" << noOfHistos << ", length=" << histoLength << "." << std::endl;
return false;
}
return true;
// fill dataSet
PDoubleVector data;
for (int i=0; i<noOfHistos; i++) {
dataSet.Clear();
dataSet.SetHistoNo(i+1); // i.e. histo numbers start with 1
dataSet.SetTimeZeroBin(t0_bin);
dataSet.SetFirstGoodBin(fgb);
dataSet.SetLastGoodBin(lgb);
for (int j=0; j<histoLength; j++)
data.push_back(count[i*histoLength+j]);
dataSet.SetData(data);
runData.SetDataSet(dataSet);
data.clear();
}
// keep run name from the msr-file
runData.SetRunName(fRunName);
// keep the information
fData.push_back(runData);
}
return true;
}
#endif // _PRUNDATAHANDLER_H_
+31
View File
@@ -43,6 +43,25 @@
#include "PRunMuMinus.h"
#include "PRunNonMusr.h"
//----------------------------------------------------------------------------------------------------------------
/**
*
*/
typedef struct {
Bool_t fScaleN0AndBkg;
Double_t fN0;
Double_t fNbkg;
Double_t fTau;
Double_t fAlpha;
Double_t fBeta;
Double_t fPackedTimeResolution;
Double_t fStartTime;
Int_t fNoOfFitBins;
PDoubleVector fFun;
PIntVector fMap;
} PDKSParams;
//----------------------------------------------------------------------------------------------------------------
/**
* \brief Manager class for all processed μSR run data during fitting.
*
@@ -680,6 +699,15 @@ class PRunListCollection
virtual const Char_t* GetYAxisTitle(const TString &runName, const UInt_t idx) const;
//@}
virtual Int_t GetNoOfParameters() { return fMsrInfo->GetNoOfParams(); }
virtual Int_t GetNoOfFunctions() { return fMsrInfo->GetNoOfFuncs(); }
virtual Int_t GetNoOfMaps() { return fMsrInfo->GetNoOfMaps(); }
virtual Int_t GetStartTimeBin(Int_t fitType, UInt_t idx);
virtual Int_t GetEndTimeBin(Int_t fitType, UInt_t idx);
virtual Int_t GetSingleHistoParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp);
virtual Int_t GetAsymmetryParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp);
virtual Int_t GetMuMinusParams(UInt_t idx, const std::vector<Double_t>& par, PDKSParams &dksp);
private:
/**
* \brief Theory calculation mode flag.
@@ -785,6 +813,9 @@ class PRunListCollection
* \see PRunNonMusr for generic time-series fit implementation
*/
std::vector<PRunNonMusr*> fRunNonMusrList;
virtual void InitDKSParams(PDKSParams &param);
virtual Double_t GetBackground(Int_t idx);
};
#endif // _PRUNLISTCOLLECTION_H_
+4
View File
@@ -261,6 +261,8 @@ class PStartupHandler : public TObject, public TQObject
*/
virtual void CheckLists();
virtual PStartupOptions* GetStartupOptions() { return &fStartupOptions; } ///< returns the startup options
/**
* \brief Returns Fourier transform default settings.
* \return PMsrFourierStructure containing units, apodization, plot type, phase settings
@@ -304,6 +306,7 @@ class PStartupHandler : public TObject, public TQObject
eDataPath, ///< Inside \<data_path\> element
eRunNameTemplate, ///< Inside \<run_name_template\> element
eOptions, ///< Inside \<options\> element (reserved)
eUseDKS, ///< Inside \<use_dks\> element
eFourierSettings, ///< Inside \<fourier_settings\> container
eUnits, ///< Inside \<units\> element (Gauss/Tesla/MHz/Mc/s)
eFourierPower, ///< Inside \<fourier_power\> element (0-20)
@@ -327,6 +330,7 @@ class PStartupHandler : public TObject, public TQObject
PRunNameTemplateList fRunNameTemplate; ///< List of instrument-specific run name patterns
PIntVector fMarkerList; ///< List of ROOT TMarker style codes for plotting
PIntVector fColorList; ///< List of ROOT TColor codes (from RGB) for plotting
PStartupOptions fStartupOptions; ///< collects all startup options which will be requested by PMsrFileHandler
/**
* \brief Checks if a file exists at the specified path.
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+1 -1
View File
@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CINT__
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
+37
View File
@@ -57,6 +57,10 @@
#include "PFourier.h"
#include "PFourierCanvas.h"
#define MFT_UNDEF -1
#define MFT_DKS 0
#define MFT_FFTW 1
//----------------------------------------------------------------------------
/**
* <p>Structure keeping the command line options.
@@ -84,6 +88,7 @@ typedef struct {
Int_t packing; ///< packing for rebinning the time histograms before Fourier transform.
TString title; ///< title to be shown for the Fourier plot.
Double_t lifetimecorrection; ///< is == 0.0 for NO life time correction, otherwise it holds the fudge factor
Int_t useDKS; ///< use DKS tag, -1 = undefined, 0 = used DKS, 1 = use FFTW
Int_t timeout; ///< timeout in (sec) after which musrFT will terminate. if <= 0, no automatic termination will take place.
} musrFT_startup_param;
@@ -151,6 +156,7 @@ void musrFT_syntax()
std::cout << std::endl << " provided. This will help on the way to a full fitting model.";
std::cout << std::endl << " -lc, --lifetimecorrection <fudge>: try to eliminate muon life time decay. Only makes sense for low";
std::cout << std::endl << " transverse fields. <fudge> is a tweaking factor and should be kept around 1.0.";
std::cout << std::endl << " --useDKS <flag> : if <flag> is true, DKS will be used, otherwise FFTW. Default: false, i.e. FFTW will be used.";
std::cout << std::endl << " --timeout <timeout> : <timeout> given in seconds after which musrFT terminates.";
std::cout << std::endl << " If <timeout> <= 0, no timeout will take place. Default <timeout> is 3600.";
std::cout << std::endl << std::endl;
@@ -183,6 +189,7 @@ void musrFT_init(musrFT_startup_param &startupParam)
startupParam.packing = 1;
startupParam.title = TString("");
startupParam.lifetimecorrection = 0.0;
startupParam.useDKS = MFT_UNDEF;
startupParam.timeout = 3600;
}
@@ -531,6 +538,21 @@ Int_t musrFT_parse_options(Int_t argc, Char_t *argv[], musrFT_startup_param &sta
return 2;
}
startupParam.lifetimecorrection = fudge.Atof();
} else if (tstr.BeginsWith("--useDKS")) {
if (i+1 >= argc) { // something is wrong since there needs to be an argument here
std::cerr << std::endl << ">> musrFT **ERROR** found option --useDKS without argument!" << std::endl;
return 2;
}
++i;
TString tt(argv[i]);
if (tt.CompareTo("yes", TString::kIgnoreCase) && tt.CompareTo("no", TString::kIgnoreCase)) {
std::cerr << std::endl << ">> musrFT **ERROR** found option --useDKS with a <flag> which is not yes/no '" << tt << "'." << std::endl;
return 2;
}
if (!tt.CompareTo("yes", TString::kIgnoreCase))
startupParam.useDKS = MFT_DKS;
else if (!tt.CompareTo("no", TString::kIgnoreCase))
startupParam.useDKS = MFT_FFTW;
} else if (tstr.BeginsWith("--timeout")) {
if (i+1 >= argc) { // something is wrong since there needs to be an argument here
std::cerr << std::endl << ">> musrFT **ERROR** found option --timeout without argument!" << std::endl;
@@ -1050,6 +1072,14 @@ Int_t main(Int_t argc, Char_t *argv[])
}
}
// filter out the use_dks flag
if (startupParam.useDKS == MFT_UNDEF) {
if (startupHandler->GetStartupOptions()->useDKS)
startupParam.useDKS = MFT_DKS;
else
startupParam.useDKS = MFT_FFTW;
}
// defines the raw time-domain data vector
PPrepFourier data(startupParam.packing, startupParam.bkg_range, startupParam.bkg);
@@ -1416,6 +1446,13 @@ Int_t main(Int_t argc, Char_t *argv[])
std::vector<PFourier*> fourier;
fourier.resize(histo.size());
Bool_t fftw_flag = true;
if (startupParam.useDKS == MFT_DKS)
fftw_flag = false;
if (fftw_flag)
std::cout << "info> will use FFTW" << std::endl;
else
std::cout << "info> will use DKS" << std::endl;
for (UInt_t i=0; i<fourier.size(); i++) {
fourier[i] = new PFourier(histo[i], unitTag, 0.0, 0.0, true, startupParam.fourierPower);
if (fourier[i] == nullptr) {
+149
View File
@@ -0,0 +1,149 @@
TEMPLATE = app
TARGET = musredit
# install path for musredit
count( PREFIX, 1 ) {
MUSREDIT_INSTALL_PATH = $${PREFIX}/bin
}
isEmpty( MUSREDIT_INSTALL_PATH ) {
MUSR_FIT_PATH = $$(MUSRFITPATH)
count( MUSR_FIT_PATH, 1 ) {
MUSREDIT_INSTALL_PATH = $$(MUSRFITPATH)
}
}
isEmpty( MUSREDIT_INSTALL_PATH ) {
ROOT_SYS_PATH = $$(ROOTSYS)
count( ROOT_SYS_PATH, 1 ) {
MUSREDIT_INSTALL_PATH = $$(ROOTSYS)/bin
}
}
isEmpty( MUSREDIT_INSTALL_PATH ) {
MUSREDIT_INSTALL_PATH = /usr/local/bin
}
unix {
message( "Determined installation path: $${MUSREDIT_INSTALL_PATH}" )
}
unix:target.path = $${MUSREDIT_INSTALL_PATH}
macx:target.path = /Applications
win32:target.path = c:/musrfit/bin
INSTALLS += target
# This is only needed for SL5.1
exists ( /opt/fontconfig-2.8.0/lib/libfontconfig.so ) {
unix:LIBS += -L/opt/fontconfig-2.8.0/lib/ -lfontconfig
}
exists( /usr/bin/cygwin1.dll ) {
QMAKE_CXXFLAGS += -D_WIN32GCC
QMAKE_LFLAGS_APP = -Wl,--enable-auto-import
}
isEmpty( CC ) {
CC = gcc
}
isEmpty( CXX ) {
CXX = g++
}
QMAKE_CC = $${CC}
QMAKE_CXX = $${CXX}
QMAKE_LINK = $${CXX}
# set proper permission for Mac OSX
macx {
QMAKE_INSTALL_FILE = install -m 6755 -p -o $$(USER) -g staff
QMAKE_INSTALL_PROGRAM = install -m 6755 -p -o root -g admin
}
# install path for the XML configuration file
unix:xml.path = $$(HOME)/.musrfit/musredit
macx:xml.path = $$(HOME)/.musrfit/musredit
win32:xml.path = c:/musrfit/bin
CONFIG += qt \
warn_on \
release
QT += xml
QT += webkit
QT += network
INCLUDEPATH += "../include"
HEADERS = musredit.h \
musrfit-info.h \
PHelp.h \
PTextEdit.h \
PSubTextEdit.h \
PAdmin.h \
PFindDialog.h \
PReplaceDialog.h \
PReplaceConfirmationDialog.h \
PFitOutputHandler.h \
PDumpOutputHandler.h \
PPrefsDialog.h \
PGetMusrFTOptionsDialog.h \
PGetDefaultDialog.h \
PGetTitleBlockDialog.h \
PGetParameterBlockDialog.h \
PGetTheoryBlockDialog.h \
PGetFunctionsBlockDialog.h \
PGetAsymmetryRunBlockDialog.h \
PGetSingleHistoRunBlockDialog.h \
PGetNonMusrRunBlockDialog.h \
PGetFourierBlockDialog.h \
PGetPlotBlockDialog.h \
PMsr2DataDialog.h \
PMusrEditAbout.h \
../include/git-revision.h
SOURCES = PHelp.cpp \
PTextEdit.cpp \
PSubTextEdit.cpp \
PAdmin.cpp \
PFindDialog.cpp \
PReplaceDialog.cpp \
PReplaceConfirmationDialog.cpp \
PFitOutputHandler.cpp \
PDumpOutputHandler.cpp \
PPrefsDialog.cpp \
PGetMusrFTOptionsDialog.cpp \
PGetDefaultDialog.cpp \
PGetTitleBlockDialog.cpp \
PGetParameterBlockDialog.cpp \
PGetTheoryBlockDialog.cpp \
PGetFunctionsBlockDialog.cpp \
PGetAsymmetryRunBlockDialog.cpp \
PGetSingleHistoRunBlockDialog.cpp \
PGetNonMusrRunBlockDialog.cpp \
PGetFourierBlockDialog.cpp \
PGetPlotBlockDialog.cpp \
PMsr2DataDialog.cpp \
PMusrEditAbout.cpp \
main.cpp
FORMS = forms/PFindDialog.ui \
forms/PReplaceDialog.ui \
forms/PReplaceConfirmationDialog.ui \
forms/PGetDefaultDialog.ui \
forms/PMusrEditAbout.ui \
forms/PPrefsDialog.ui \
forms/PGetMusrFTOptionsDialog.ui \
forms/PGetTitleBlockDialog.ui \
forms/PGetParameterBlockDialog.ui \
forms/PGetTheoryBlockDialog.ui \
forms/PGetFunctionsBlockDialog.ui \
forms/PGetAsymmetryRunBlockDialog.ui \
forms/PGetSingleHistoRunBlockDialog.ui \
forms/PGetNonMusrRunBlockDialog.ui \
forms/PGetFourierBlockDialog.ui \
forms/PGetPlotBlockDialog.ui \
forms/PMsr2DataDialog.ui
RESOURCES = musredit.qrc
macx:ICON = images/musredit.icns

Some files were not shown because too many files have changed in this diff Show More