767 Commits

Author SHA1 Message Date
5304f276d8 adds installation of musredit as a unix app 2026-03-13 15:20:31 +01:00
9083561e20 added PyScripts/nexus_muon_validator.py to nexus.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 21s
2026-03-07 14:50:57 +01:00
14d2648fc4 remove obsolate test/nexus
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 29s
2026-03-07 13:38:53 +01:00
f91bc12709 suppress warning missing deadtime correction if not relevant.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 29s
2026-03-03 08:52:19 +01:00
3174b320b2 fix linker errors: add HDF5 C++ lib and FFTW3 include paths
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 22s
- 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-01 11:21:01 +01:00
c062e0f4e9 add musrfitConfig.cmake, etc. for musrfit.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 30s
2026-03-01 09:35:34 +01:00
ed2451d657 adopted after deadtime correction offset fix.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 21s
2026-02-23 13:17:00 +01:00
a005e5750f fixed an index by one offset issue.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 21s
2026-02-23 13:02:46 +01:00
b29c7247e7 make sure that the requested pointer is not a nullptr.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 21s
2026-02-23 12:52:26 +01:00
92008a4e49 fix Boost_INCLUDE_DIR -> Boost_INCLUDE_DIRS
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 21s
2026-02-21 17:38:11 +01:00
49e355f58a updated the local user-docu.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 29s
2026-02-21 16:04:48 +01:00
901fda9298 adopted ChangeLog. Fixed a minor issue in PTextEdit. Adopted ctests for the new NeXus handling.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 29s
2026-02-21 15:32:03 +01:00
7115c0027c Merge branch 'nxs' into root6 2026-02-21 12:37:21 +01:00
7d5aaf6429 increased the version number of musrfit and libPMusr. 2026-02-21 07:45:25 +01:00
79b05cced7 adopted the PNeXus lib such that the class naming scheme is self-consistent. 2026-02-21 07:44:20 +01:00
08350a2fde warning that deadtime correction estimate is not yet implemented. I am not even sure this would be a good feature. 2026-02-21 07:19:42 +01:00
22b1ad7f2f full implementation of the deadtime correction from file for PRunAsymmetryRRF. 2026-02-21 07:15:44 +01:00
bb8bdafddd full implementation of the deadtime correction from file. 2026-02-21 07:10:48 +01:00
d5e305411f added a warning if deadtime correction cannot be carried out (missing parameters, etc.) 2026-02-21 07:09:36 +01:00
50187b0c65 add DeadTimeCorrection to PRunAsymmetry - no ADDRUN handling yet. 2026-02-20 19:47:21 +01:00
d7908573b8 PRunSingleHistoRRF: add DeadTimeCorrection, and improve ADDRUN readability 2026-02-20 19:01:33 +01:00
9aae350c13 move DeadTimeCorrection to PRunBase. Make ADDRUN part in PrepareData more readable. 2026-02-20 18:17:05 +01:00
390b9770ca add an ADDRUN example. 2026-02-20 16:14:13 +01:00
ba939574a4 added musrview png ref test via ctest
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 27s
2026-02-18 17:07:20 +01:00
c50e4a3a06 add ctest integration tests for musrfit maxLH/chisq validation
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 28s
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-02-17 18:05:24 +01:00
f00f188f0b filter out '\r' and '\n' from command string (macOS issue). 2026-02-13 12:56:50 +01:00
5a2f45c083 filter out '\r' and '\n' from command string (macOS issue).
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 27s
2026-02-13 12:46:16 +01:00
4136806847 better hdf4/5 include handling. 2026-02-11 16:05:02 +01:00
6a41458310 start working on the deadtime correction. 2026-02-08 15:34:22 +01:00
d70fd34345 improved NeXus docu. 2026-02-08 09:11:36 +01:00
3858cc723a improved docu for HDF4/5. 2026-02-07 21:43:34 +01:00
a6f5b956bf adopt HDF4 support for proper hierarchical writing of the data. 2026-02-07 21:26:35 +01:00
86ecfc84af fixed a copy/paste error. 2026-02-07 21:24:14 +01:00
8cb4fc7221 clean up HDF4 in PNeXus. First implementation for HDF4 IDF1/2 write. Compiles, but still some issues. 2026-02-07 20:54:09 +01:00
95d087164d first full mandatory HDF5 IDF V2 writer. 2026-02-07 20:17:23 +01:00
8f3ad0c61d PNeXus now handles std::vector<> attributes new correctly. HDF4/5 now is using int. 2026-02-07 20:00:27 +01:00
49d42c93ba more work on HDF5 IDF V2. 2026-02-07 19:34:26 +01:00
df379b834e first full version for HDF5 IDF V1 write. 2026-02-07 17:25:52 +01:00
3bb004ea2d more work on the NeXus write routines. 2026-02-07 11:31:11 +01:00
fc478d27c7 make sure that the config.h is accessible for the PMusr lib. 2026-02-07 11:29:48 +01:00
c690965025 add a function in the NeXus lib which gives the time in ISO8601. 2026-02-07 11:28:38 +01:00
300c9200df start implementing the NeXus write routines, needed by any2many. 2026-02-07 08:05:42 +01:00
4dcef1a835 add HDF4/HDF5 library version information, needed for writing. 2026-02-07 08:05:09 +01:00
4519a0b76e add more complete dump info for NeXus. 2026-02-06 18:08:37 +01:00
3aecdbf0a8 added the missing sample information when reading NeXus IDF V2. 2026-02-06 15:15:10 +01:00
dfa8852cfe removed debug tag. 2026-02-06 15:14:25 +01:00
29fbb4a62b replace the NeXus IDF 2 example. 2026-02-06 14:03:55 +01:00
de8b02b94d more complete doxygen docu. 2026-02-06 12:43:55 +01:00
dd2f743b3a added docu by Claude for PNeXus. 2026-02-06 08:45:58 +01:00
d5dbc12175 NeXus HDF4/HDF5 IDF V1: read 'frames_good' 2026-02-05 13:29:27 +01:00
643be9738f fixed wrong path in NeXus IDF V2. 2026-02-05 12:59:10 +01:00
88b5e492dd NeXus IDF V2 detector_1 -> instrument/detector_1 where possible. 2026-02-05 12:08:40 +01:00
810306cb2a first full IDF V2 implementation. 2026-02-05 10:59:15 +01:00
43cb8b2460 start with the implementation of NeXus IDF V2. 2026-02-04 19:48:38 +01:00
ceb9673330 read deadtime parameters for IDF V1. 2026-02-04 17:57:48 +01:00
da0b356e3b more work on the deadtime correction on the msr-file side. 2026-02-04 13:29:07 +01:00
b262ee33c5 start implementing with the deadtime correction, if present 2026-02-04 13:20:10 +01:00
12888be4c9 add deadtime correction related params. 2026-02-04 11:06:56 +01:00
867ac4895b switched to HDF4/HDF5 template loading in order to simplify the code. 2026-02-04 09:26:49 +01:00
a6c9120d06 check for IDF 1/2. 2026-02-03 17:38:56 +01:00
417901e271 HDF4 handling completed. 2026-02-03 16:17:06 +01:00
8d1dcef2de add more HDF4 header info: counts. 2026-02-03 08:03:13 +01:00
30fbd8eb67 fixed typo, and added file pointer checks. 2026-02-02 19:14:14 +01:00
76dbd757e3 dump_header can now handle HDF4/HDF5 NeXus files, without the NeXus library. 2026-02-02 19:08:12 +01:00
c894c21bf3 add more HDF4 header info. 2026-02-02 08:02:41 +01:00
008ca7210a add more HDF4 header info. 2026-02-01 19:49:55 +01:00
60f11dfc0e add more HDF4 header info. 2026-02-01 18:55:49 +01:00
3aaca28c87 start populating HDF4 header info. 2026-02-01 17:54:02 +01:00
d4f0855b19 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-01-29 19:59:47 +01:00
9d173203ff fix git-revision.h generation: output to build tree and add missing dependencies
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
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-01-29 19:52:16 +01:00
00c980af68 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-01-29 19:40:33 +01:00
fb9d6e917c proper TDirectory handling for the histos. 2026-01-29 19:40:20 +01:00
2eb0cf28d5 fixed missing TDirectory handling of RunSummary in dump_header.cpp 2026-01-29 19:40:10 +01:00
8b054b77b9 generate git-revision.h at build time instead of configure time
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
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-01-29 19:35:20 +01:00
4e29ad6898 proper TDirectory handling for the histos.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2026-01-26 20:32:34 +01:00
4ac7a7d01c fixed missing TDirectory handling of RunSummary in dump_header.cpp
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2026-01-26 19:52:41 +01:00
65efb389c3 first test to read hdf4/hdf5 directly. 2026-01-25 16:20:10 +01:00
83c8f6630c 2nd spot for cmake version check for policy setting. 2026-01-25 14:50:23 +01:00
227bfb7419 2nd spot for cmake version check for policy setting.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2026-01-25 14:49:38 +01:00
70eb0397df cmake version check for policy setting. 2026-01-25 14:45:46 +01:00
3c02c6073a cmake version check for policy setting. 2026-01-25 14:43:49 +01:00
b3e4d247f0 add HDF4/HDF5 example programs. 2026-01-25 14:07:36 +01:00
6aaed94adf add doxygen file comment. 2026-01-25 12:05:04 +01:00
c3e9c03920 added HDF5 ISIS NeXus class handling. 2026-01-25 11:15:49 +01:00
909fa6519d added HDF4 ISIS NeXus class handling. 2026-01-25 10:51:23 +01:00
3eea73f07a stub for new NeXus file handling. Not much is working yet. 2026-01-25 08:26:43 +01:00
f66c832d56 updated the copyright info. 2026-01-25 07:45:44 +01:00
4de660788d updated the copyright info.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 26s
2026-01-25 07:42:29 +01:00
990e280c8f set cmake Boost find policy. Removed NeXus library find from cmake, since it will not be used anymore. 2026-01-25 07:28:47 +01:00
af3c8832fe set cmake Boost find policy.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 28s
2026-01-25 07:26:25 +01:00
7615e791d3 version update of the doxygen config file. 2026-01-24 18:30:18 +01:00
394ea01d37 further playing with the Prefs dialog. 2026-01-24 18:30:06 +01:00
d19d7b59c8 further playing with the Prefs dialog. 2026-01-24 18:29:46 +01:00
7dc0a237dc further playing with the Prefs dialog. 2026-01-24 18:29:37 +01:00
1b4b9cc238 increased size of prefs dialog, since it seems too small for the newest qt6 version, especially on macOS. 2026-01-24 18:29:28 +01:00
123acec405 version update of the doxygen config file.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 30s
2026-01-22 15:15:42 +01:00
eaa2ba8faf further playing with the Prefs dialog.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2026-01-21 12:19:34 +01:00
8b9ac6e5b1 further playing with the Prefs dialog.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 26s
2026-01-21 12:16:27 +01:00
2601e80c8a further playing with the Prefs dialog.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2026-01-21 11:20:08 +01:00
1b91d8b281 increased size of prefs dialog, since it seems too small for the newest qt6 version, especially on macOS.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 27s
2026-01-21 11:11:17 +01:00
db54db3394 more detailed NeXus support message.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2026-01-16 18:00:39 +01:00
84bb6e3a72 spirit classic/qi -> x3. Increase musrfit and library version to 1.9.10/1.7.0.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2026-01-16 09:24:09 +01:00
ce1bc1583b for tests/spirit: replace 'nil' by 'leer' since 'nil' leads to conflict with macOS. 2026-01-01 09:53:12 +01:00
4adf66cb26 replace 'nil' by 'leer' since 'nil' leads to conflict with macOS. 2025-12-30 14:34:26 +01:00
8a86351674 add missing header files for install for cmake. 2025-12-30 13:59:00 +01:00
418ca6b0a1 add missing header file PFunctionsAst.h 2025-12-30 13:56:50 +01:00
73aff4ec69 modernize musrfit function handling using spirit x3 instead of spirit classic now. 2025-12-30 13:31:18 +01:00
7ce0926fd9 migrated spirit qi grammar to x3 of mupp variable handling. 2025-12-30 11:02:46 +01:00
e4ff8ca7d5 added doxygen docu to spirit X3 under tests.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-12-27 13:57:14 +01:00
5d3981d8b2 test spirit parser moved from classic to X3.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-12-27 12:32:01 +01:00
3442ca7b62 adopted from AFS to NFS.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-12-24 14:03:44 +01:00
a023a4b090 perform Fourier phase checks only if a Fourier block is present and not set to power spectra.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-12-22 16:09:32 +01:00
642f878833 improve comment in comment.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-12-21 16:09:01 +01:00
8852cf21cf add missing #include<cmath> to make some compilers happy (qt5 part).
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-11-27 16:16:04 +01:00
89f695d6ce adopt PFitter to ROOT v6-38-00 and make sure it is backwards compatible.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-11-27 15:32:16 +01:00
975f48f3fa add missing #include<cmath> to make some compilers happy. 2025-11-27 15:30:45 +01:00
93f6bccaef improve the doxygen docu of the BMWtools.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-11-25 18:51:57 +01:00
1a922125bb improve the doxygen documentation of the plotter-part of mupp. 2025-11-25 18:33:31 +01:00
322aa58fbc improve the doxygen documentation of the var-part of mupp. 2025-11-25 17:56:04 +01:00
4cbf625b84 improve the doxygen docu of PVarDialog.* (musredit_qt6). 2025-11-25 17:36:13 +01:00
1b0cddc0ee improve the doxygen docu of PmuppScript.* (musredit_qt6).
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-11-25 12:30:59 +01:00
4f52ff7b9b improve the doxygen docu of PmuppGui.* (musredit_qt6). 2025-11-25 12:23:33 +01:00
0cb9b20738 improve the doxygen docu of PmuppAdmin.* (musredit_qt6).
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-11-25 12:18:18 +01:00
20d5955977 improve the doxygen docu of mupp.* Pmupp.* (musredit_qt6). 2025-11-25 09:27:59 +01:00
ab14747460 improve the doxygen docu of PTextEdit.* (musredit_qt6). 2025-11-25 09:16:43 +01:00
6c87889f5c improve the doxygen docu of PSubTextEdit.* (musredit_qt6). 2025-11-25 08:52:43 +01:00
c434993763 improve the doxygen docu of PReplaceDialog.* (musredit_qt6). 2025-11-25 08:44:41 +01:00
9fa970a53e improve the doxygen docu of PReplaceConfirmationDialog.* (musredit_qt6). 2025-11-25 08:39:44 +01:00
87fcf91593 improve the doxygen docu of PPrefsDialog.* (musredit_qt6). 2025-11-25 08:36:54 +01:00
02ddc3889d improve the doxygen docu of PMusrEditAbout.* (musredit_qt6). 2025-11-25 08:32:59 +01:00
2fd0248e37 deal with Boost 1.89 not having system as component anymore. 2025-11-25 08:29:45 +01:00
b658b8b9de improve the doxygen docu of PMsr2DataDialog.* (musredit_qt6). 2025-11-25 07:58:47 +01:00
948ac57be6 improve the doxygen docu of PGetTitleBlockDialog.* (musredit_qt6). 2025-11-25 07:52:10 +01:00
4802a7a016 improve the doxygen docu of PGetTheoryBlockDialog.* (musredit_qt6). 2025-11-25 07:49:24 +01:00
244baa4dd4 add PSI/VMS to dump_header.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2025-11-24 19:25:45 +01:00
e1f2941d7f add PSI/VMS to the musrfit_startup.xml.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2025-11-24 19:12:12 +01:00
98ee6a3983 add musrStep and musrWiz to the workflow.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 20s
2025-11-24 18:23:45 +01:00
3f50462ce4 make the technical docu more complete by adding musrStep and musrWiz.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 17s
2025-11-24 18:18:58 +01:00
4c5a009305 Update .gitea/workflows/deploy-pages.yml
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
switch Qt docu from Qt5 to Qt6
2025-11-24 17:32:00 +01:00
7e415e636c improve the doxygen docu of PGetSingleHistoRunBlockDialog.* (musredit_qt6).
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-11-24 13:51:35 +01:00
b3bffd6a51 improve the doxygen docu of PGetPlotBlockDialog.* (musredit_qt6). 2025-11-24 13:44:21 +01:00
cbd6bb984e improve the doxygen docu of PGetParameterBlockDialog.* (musredit_qt6). 2025-11-24 13:40:15 +01:00
1aec75d5ad improve the doxygen docu of PGetNonMusrRunBlockDialog.* (musredit_qt6). 2025-11-24 13:35:54 +01:00
8b631e026c improve the doxygen docu of PGetMusrFTOptionsDialog.* (musredit_qt6). 2025-11-24 13:30:27 +01:00
456bc2adb4 improve the doxygen docu of PGetFunctionBlockDialog.* (musredit_qt6). 2025-11-24 13:24:35 +01:00
8b42254cbb improve the doxygen docu of PGetFourierBlockDialog.* (musredit_qt6). 2025-11-24 12:25:29 +01:00
06ccceb810 improve the doxygen docu of PGetAsymmetryRunBlockDialog.* (musredit_qt6). 2025-11-24 11:15:21 +01:00
6ca0461f9b improve the doxygen docu of PFitOutputHandler.* (musredit_qt6). 2025-11-24 11:08:03 +01:00
9cbcec63be improve the doxygen docu of PFindDialog.* (musredit_qt6). 2025-11-24 10:53:43 +01:00
b714c8d170 improve the doxygen docu of PDumpOutputHandler.* (musredit_qt6). 2025-11-24 10:48:14 +01:00
eb807ade7b improve the doxygen docu of PChangeDefaultPathDialog.* (musredit_qt6). 2025-11-24 10:42:16 +01:00
1f7ce9f88a improve the doxygen docu of PAdmin.* (musredit_qt6). 2025-11-24 10:34:58 +01:00
be24a3aa73 improve the doxygen docu of main.cpp and musredit.h (musredit_qt6). 2025-11-24 10:24:36 +01:00
aaa609b3e2 improve the doxygen docu of musrWiz.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2025-11-23 18:41:03 +01:00
a0e6a3a83d improve the doxygen docu of musrStep. 2025-11-23 18:25:48 +01:00
0db498284f improve the doxygen docu of PUserFcn.* and PUserFcnBase.*
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2025-11-23 17:58:07 +01:00
d8ae606a55 improve the doxygen docu of PTheory.* 2025-11-23 17:47:46 +01:00
e940ad09b4 improve the doxygen docu of PStartupHandler.* 2025-11-23 17:35:31 +01:00
633f63b104 improve the doxygen docu of PRunSingleHistoRRF.* 2025-11-23 17:25:45 +01:00
db4b6395ef fixed a AI glich in the docu. 2025-11-23 17:08:43 +01:00
fa1d496cf5 improve the doxygen docu of PRunSingleHisto.*
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-11-15 21:31:09 +01:00
310713da0e improve the doxygen docu of PRunNonMusr.* 2025-11-15 08:42:21 +01:00
3e545f1d50 improve the doxygen docu of PRunMuMinus.* 2025-11-15 08:35:24 +01:00
278fd47e52 improve the doxygen docu of PRunListCollection.* 2025-11-15 08:27:51 +01:00
26b87e0659 improve the doxygen docu of PRunDataHandler.h 2025-11-15 08:16:15 +01:00
38decd8b58 improve the doxygen docu of PRunBase.* 2025-11-15 08:02:11 +01:00
a05b4fe867 improve the doxygen docu of PRunAsymmetryRRF.* 2025-11-15 07:54:12 +01:00
7b82b2c2c8 improve the doxygen docu of PRunAsymmetry.*. 2025-11-15 07:43:49 +01:00
4d5ad0a00c improve doxygen documentation of PRunAsymmetryBNMR.*
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 17s
2025-11-14 10:21:07 +01:00
c5d5038b4d improve doxygen documentation of PRgeHandler.* 2025-11-14 10:05:36 +01:00
be8161bac1 improve doxygen documentation of PPrepFourier.* 2025-11-14 09:57:18 +01:00
cdd248d116 improve doxygen documentation of PMusrT0.* 2025-11-14 09:48:35 +01:00
26d55bc048 improve doxygen documentation of PMusrCanvas.* 2025-11-14 09:36:18 +01:00
218e2125e3 improve doxygen documentation of PMsrHandler.* 2025-11-14 09:22:24 +01:00
5f1b4fa5f5 improve doxygen documentation of PMsr2Data.* 2025-11-14 09:11:28 +01:00
a40c431396 improve doxygen documentation of PMsgBox.* 2025-11-14 07:57:06 +01:00
40a797c0da improve doxygen documentation of PFunction.* and PFunctionGrammar.h
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2025-11-14 07:50:50 +01:00
f8a2d646dc improve the doxygen docu.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-11-13 08:36:42 +01:00
224f7a15d0 improve the doxygen docu. 2025-11-13 07:59:10 +01:00
25024aae6b improve the doxygen docu with the help of Claude AI.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 17s
2025-11-12 20:32:20 +01:00
4ab01f4faf added some more sanity checks for dump_header.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-11-12 17:56:33 +01:00
5ae66a0614 added some more sanity checks for any2many. 2025-11-12 13:13:40 +01:00
d38fb078f9 added some more sanity checks for addRun. 2025-11-12 12:21:08 +01:00
f1587af451 added some more sanity checks for musrview. 2025-11-12 11:05:56 +01:00
ddf434f595 added some more sanity checks for musrt0. 2025-11-12 10:48:36 +01:00
22112e47b2 added paranoia pointer checks.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 17s
2025-11-12 08:09:03 +01:00
9363bafec4 make sure that the comment content is not confused with end of comment. 2025-11-12 08:06:38 +01:00
3d07894b2d use Claude ai to generate doxygen documentation.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 17s
2025-11-10 15:14:08 +01:00
262b5a36aa Update README.md - updated the docu web-page link.
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 16s
2025-11-06 14:25:13 +01:00
7745fe6e65 Update README.md
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 16s
updated the docu web-page link
2025-11-06 14:13:08 +01:00
189f95cb04 Update ChangeLog
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 18s
2025-10-15 08:00:50 +02:00
f3250ededc Update INSTALL
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 19s
2025-10-15 07:58:50 +02:00
9820c5dba7 Update .gitea/workflows/deploy-pages.yml
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 17s
2025-10-13 16:10:07 +02:00
7b9a473296 Update .gitea/workflows/deploy-pages.yml
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 13s
2025-10-13 15:40:41 +02:00
23e68c1c4f Update .gitea/workflows/deploy-pages.yml
Some checks failed
Build and Deploy Documentation / build-and-deploy (push) Failing after 17s
test
2025-10-13 15:36:51 +02:00
c9414f7f08 Update .gitea/workflows/deploy-pages.yml
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 11s
2025-10-13 15:31:08 +02:00
bac6202a73 Update .gitea/workflows/deploy-pages.yml
Some checks failed
Build and Deploy Documentation / build-and-deploy (push) Failing after 17s
change action trigger to default branch name
2025-10-13 15:16:12 +02:00
b5447aef32 Update .gitea/workflows/deploy-pages.yml
changed build image
2025-10-13 15:13:06 +02:00
1e9b82f1c2 add TDirectory option to any2many. 2025-10-03 15:42:44 +02:00
fbfce99790 better handling of values=n/a when dumping the header info. 2025-10-01 12:36:01 +02:00
32b49e7ac8 fixed char* comparison bug. 2025-10-01 09:38:17 +02:00
df7b8433e1 adopted PRunDataHandler::ReadRootFile such that it can handle TDirectory in addition to the deprecated TFolder. 2025-09-30 14:32:47 +02:00
10117abeff dump_header can now handle TMusrRoot with TFolder as well as TDirectory. 2025-09-30 12:30:45 +02:00
675ed39739 update of the in-source MusrRoot docu. 2025-09-29 16:41:17 +02:00
7f911cd3ab make musrRootValidation TDirectory compatible. 2025-09-29 14:28:53 +02:00
288c4c644b updated the docu and removed unused DrawHeader. 2025-09-29 12:45:24 +02:00
ea646e012b increase the MusrRoot version to 2.0. 2025-09-29 12:43:21 +02:00
d8d1eb1838 added necessary FOURIER block. 2025-09-29 11:43:30 +02:00
4917e5c7ae added the reader part for MusrRoot if written with TDirectory rather than TFolder. 2025-09-29 10:47:58 +02:00
7e28402e25 start implementing TDirectory infrastructure. 2025-09-28 16:45:49 +02:00
db71346ebb Update .gitea/workflows/deploy-pages.yml
added graphiz for the collaboration diagrams
2025-09-17 14:03:50 +02:00
4fbd678a88 split argv parsing between root (un)related parts. 2025-09-15 13:25:21 +02:00
376b4f59ba add the errno information onto the IPC, in case of a failure. 2025-09-07 18:15:12 +02:00
a61a09bddd added musredit.dox in the doc directory. 2025-09-02 09:14:41 +02:00
475bb6a9f7 changed copy path for pages. 2025-09-02 09:10:35 +02:00
a6153a0eb7 add first technical docu pages pipeline. 2025-09-02 09:07:00 +02:00
7405a95c6e removed qmake leftovers. Only cmake is used for the future. Reorganized the technical docu, for better gitea-pages integration. 2025-09-02 08:55:00 +02:00
ed6e392a53 prevent crash if no tab is present. 2025-08-19 18:09:29 +02:00
ef4c6d75e5 make sure that index states in proper range for PRunAsymmetryRRF. 2025-08-05 10:30:41 +02:00
392a0b089d added more histo length versus fgb, lgb checks. 2025-07-11 13:05:49 +02:00
06a509a420 improved reload of msr-files in musredit after a msr2data command. 2025-07-07 10:02:14 +02:00
2e951d92f1 error feed fStep rather than fPosError for expected chisq. Tweaked the param rounding for expected chisq. 2025-07-04 16:29:33 +02:00
d9016d82a8 better exp estimate for precision. 2025-07-04 08:31:52 +02:00
25bcdd25e5 add err==0.0 handling for rounding. 2025-07-03 10:22:11 +02:00
781a2e7dbd also apply the parameter rounding onto the per run block estimate. 2025-07-03 09:50:48 +02:00
1aa7e6941f 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:38:34 +02:00
7491a2c331 now all error messages from musrview can be sent to PMsgBox. 2025-06-29 09:12:11 +02:00
832a74e0b5 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 09:04:45 +02:00
0b1c9e53c6 (i) make most internal checking functions in the msr handler private. (ii) improved checking of real Fourier for consistency. 2025-06-23 16:02:07 +02:00
18bf65a231 changed theory functionc abbriviation 'if' to 'ifld'. 2025-06-10 13:23:03 +02:00
0cde84d756 updated of the offline docu. 2025-06-09 09:10:49 +02:00
0943f1f061 increase libPMusr version to 1.5.0. 2025-06-08 10:58:40 +02:00
769a828a76 new version 1.9.9. Adopted ChangeLog and CMakeLists.txt. 2025-06-08 10:48:12 +02:00
ecec59c8a3 1st full Gauss/Lorentz LF. Still room for optimization, and further testing. 2025-06-06 10:21:09 +02:00
66af890157 add new functions to musredit select. 2025-06-05 11:19:48 +02:00
eb98c9727c add simple F-mu-F to the standard theory functions. 2025-06-05 10:41:12 +02:00
079baa3edf start adding more standard theory functions. Not all ready yet. 2025-06-04 17:39:02 +02:00
7df47a05f3 create src dir if not present. Needed for git-revision.h 2025-06-03 12:58:00 +02:00
15c5b02c8b more docu. 2025-05-28 13:48:57 +02:00
37f099542a stripped CMakeLists.txt to the bare minimum. 2025-05-28 13:48:05 +02:00
c2fb166d3b add necessary docu for the Gaussian Lorentzian approach. 2025-05-28 12:47:20 +02:00
e8806c3e72 changed the integral approximation approach for Gaussian/Lorentzian. 2025-05-28 12:46:37 +02:00
91a45cad90 added ZF, LF geometry, dynamic approximation width/hopp << 1. 2025-05-27 15:59:58 +02:00
d1f025a8c2 improved GL integration. 2025-05-27 15:59:08 +02:00
e525abe614 simplify git-revision.h generation. 2025-05-19 13:29:54 +02:00
005b33c379 added missing MACOSX_BUNDLE_GUI_IDENTIFIER for mupp. 2025-05-14 18:10:51 +02:00
3bcc382679 allow to define Tmax from the cmd line. 2025-05-13 16:08:23 +02:00
249d6ff97c add missing header. 2025-05-12 20:25:40 +02:00
69ab03d5ae first LGKT_LF. Might need to slightly improve Simpson. 2025-05-12 16:36:37 +02:00
819d209863 proper class for GKT LF. 2025-05-12 10:58:53 +02:00
bcc1597e30 add LF Gaussian/Lorentzian testing code. 2025-05-09 16:02:04 +02:00
9fa90c24fb start populating nfs4 path rather than afs in the musrfit_startup.xml. 2025-05-06 15:33:13 +02:00
236a702d36 needed to add an additional header (stdbool.h, libCuba) to make clang happy. 2025-05-03 15:13:26 +02:00
09f9782a31 comment outdated typedef in libCuba. 2025-05-02 19:18:43 +02:00
f99f71a8db slight improvement on mud.h needed that it doesn't crash on macos15.4 m3pro. 2025-04-09 17:11:14 +02:00
6e60013037 updated mud.h (thanks to Donald Arseneau). Makes modern compiler happy again. 2025-04-08 17:00:04 +02:00
e38fa47961 add skeleton for MusrRoot which will handle TDirectoryFile rather than TFolder. 2025-04-04 18:37:42 +02:00
764cdf4e51 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-04-04 16:58:57 +02:00
e5ff0fa743 switched from raw to QScopedPointer pointer in mupp.cpp. 2025-04-01 14:10:59 +02:00
e26fa4eea2 removed my quick and dirty fix. It doesn't work for all compilers. Reported bug to triumf and wait for a fix. 2025-03-31 07:54:25 +02:00
5648757389 back ported some qt6 recent file handling. 2025-03-30 18:14:04 +02:00
Andreas Suter
c3b4c7c3b1 improved recent file handling for macos. 2025-03-30 17:09:04 +02:00
e233c860d1 slight improvement in handling of the recent msr-files. 2025-03-30 15:30:46 +02:00
c230bfb1bc updated the icon switching by adding the missing View2Dat. 2025-03-29 22:36:48 +01:00
5119b1cd13 fixed typo and added necessary update for the theme flags. 2025-03-29 21:48:23 +01:00
d937324885 improved dark theme handling on mupp for qt5. 2025-03-29 20:54:03 +01:00
f7e5c53879 improved dark theme handling on mupp for qt6. 2025-03-29 20:17:28 +01:00
3796925e93 needed to adopt mud.h to make it gcc15.0.1 ready. 2025-03-26 17:05:16 +01:00
d5343a0073 activate the status bar. 2025-03-25 15:35:10 +01:00
bb99482461 add a user interface option to export data from a msr-file view (single- or multiple files) - qt6. 2025-03-24 20:28:57 +01:00
f0869935d1 add a user interface option to export data from a msr-file view (single- or multiple files). 2025-03-24 20:10:01 +01:00
0f95551200 add necessary increment for unique cropped name for PSI-BIN. 2025-03-19 16:24:56 +01:00
b8ce741534 make sure that for PSI-BIN export the 4 char detector names are unique. 2025-03-19 09:45:16 +01:00
4b6654ca2a add title to PRawRunDataSet. 2025-03-19 09:44:13 +01:00
38d4ec1806 read 'Sample Orientation' from ROOT file, since it might be needed by any2many. 2025-03-18 12:51:40 +01:00
4231d26604 make sure that the 'selected' object is present. 2025-02-24 20:22:20 +01:00
a28650f017 this is a workaround which should prevent that the key event is executed if a text/latex is written into the canvas. 2025-02-17 17:53:39 +01:00
9a23c4f241 fix of a copy/paste error. 2025-02-15 10:41:02 +01:00
5f7f79e46d header of exported data adopted for easier read in with pandas. 2025-02-14 09:06:55 +01:00
4a20d805dd updated the copyright info. 2025-01-30 11:15:42 +01:00
10cfe3f863 Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2025-01-29 08:05:29 +01:00
0828d1b8d4 proper handling of comments and descriptions in the RUN block. 2025-01-29 08:04:48 +01:00
75785d2c0e add switch to enable/disable HDF4 support for NeXus. 2025-01-28 21:40:58 +01:00
e4b84b12df make sure that 'ASCII', 'DAT', and 'DB' is rejected from musrFT. 2025-01-27 18:00:32 +01:00
124a31386c add a new tag PMUSR_UNSUPPORTED_FEATURE 2025-01-27 17:58:42 +01:00
ebdb0feb7f path-run-name in RUN block of the msr-file can now handle spaces. 2025-01-18 13:35:08 +01:00
e67d92fc05 Merged in mnstrategy (pull request #19)
Explicit passing of MnStrategy during minimizer initialization

Approved-by: Suter Andreas
2025-01-10 10:00:30 +00:00
ead1674b13 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-09 11:38:33 -08:00
fd22884ce8 slightly re-ordered the default files for mupp in the open dialog. 2024-12-16 07:41:24 +01:00
20dd08fbef changed default ROOT color kGreen to kGreen+2. 2024-12-14 14:54:17 +01:00
3e66760c26 adopted for custom button handling qt5. 2024-12-11 14:06:32 +01:00
d6bcdf52b8 adopted for custom button handling. 2024-12-11 13:58:11 +01:00
30bd2b2876 added missing enum tag. 2024-12-11 09:36:57 +01:00
9f8f89db6d make the theme handling in musredit more flexible. At the same time adopted some part to more modern c++. 2024-12-11 09:25:28 +01:00
458913ca31 update of the ChangeLog 2024-12-03 18:13:02 +01:00
5c3accc6ed added jump to block feature. 2024-12-02 20:05:50 +01:00
6f8b0a2341 center edit widget for find. This gives a better user experience. 2024-12-02 17:06:02 +01:00
4febdb42b4 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 12:22:25 +02:00
ae95a5dc1c implemented unary operator for metaData in functions. 2024-10-11 16:34:49 +02:00
c3f531e0d5 fixed a bug for out-of-repo build to generate git-info. 2024-10-11 08:19:54 +02:00
0b61130e28 adopted OpenMP handling for libZFRelaxation. 2024-09-23 09:41:20 +02:00
d1cd63dcb0 fixed a bug in the mupp gui refresh of a collection. 2024-09-21 13:02:31 +02:00
7838901fbe make sure that the run template number has at least 4 digits before proceeding. 2024-09-17 16:27:04 +02:00
00b012d0dd Merge https://bitbucket.org/muonspin/musrfit into root6 2024-09-12 09:29:03 +02:00
d2984d8923 Merged in avg (pull request #18)
fix batch mode averaged output

Approved-by: Andreas Suter
2024-09-12 07:28:15 +00:00
58889614e5 fix batch mode averaged output
closes issue #63
2024-09-10 13:52:30 -07:00
c9fc373862 improved dat-file reading for mupp. 2024-07-02 09:26:44 +02:00
ebefcf7af9 updated the docu. 2024-06-24 09:44:07 +02:00
64d3b6192b 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 11:16:15 +02:00
6bcb26f9d5 Merge branch 'root6' of https://bitbucket.org/muonspin/musrfit into root6 2024-06-18 08:19:01 +02:00
6b865efd3b Merged in ignore (pull request #17)
ignore all files generated from an in-repo build

Approved-by: Andreas Suter
2024-06-18 06:18:56 +00:00
caccfb175a Merged in yaml (pull request #16)
write the fit results to an easy-to-read/parse yaml file

Approved-by: Andreas Suter
2024-06-18 06:18:31 +00:00
1845b5c176 Merged in segfault (pull request #15)
fix segfault

Approved-by: Andreas Suter
2024-06-18 06:18:14 +00:00
8821112927 ignore all files generated from an in-repo build 2024-06-17 13:07:06 -03:00
833171c712 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-17 12:51:04 -03:00
61749b91c4 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 542b98b2cc/core/base/src/TApplication.cxx (L179-L180)).
2024-06-17 10:52:14 -03:00
3d92e2eefb add CPU info to the configure process. 2024-06-09 17:45:02 +02:00
b71dce9291 remove more accidently added file. 2024-06-08 16:39:57 +02:00
1aa4ce0a99 remove accidentely added file. 2024-06-08 16:36:54 +02:00
425ed02e22 update of the docu. 2024-06-08 09:23:36 +02:00
a36abfc461 updated version info, due to the macOS OpenMP support. 2024-06-08 09:17:05 +02:00
ccaba41868 modernize the way how to check/deal with OpenMP. This helps also on the macOS side. 2024-06-07 12:44:59 +02:00
418adfde67 propagate only necessary root flags to TApplication. 2024-06-06 10:06:50 +02:00
66df43c663 moved mupp examples form the mupp source destination to doc/examples. 2024-04-26 15:54:44 +02:00
4a6885f55b update of the documentation. 2024-04-23 10:50:11 +02:00
92b1aac7a6 got rid off some double brackets. 2024-04-20 18:13:09 +02:00
26e25ce10b fixed a fruther bracket bug. 2024-04-20 17:39:18 +02:00
cedaabeb98 improved bracket handling in function string generation. 2024-04-20 09:40:04 +02:00
032510fbcb update of the ChangeLog. 2024-04-19 12:44:43 +02:00
8cfd0bcc4a increased musrfit patch number. 2024-04-19 12:40:50 +02:00
7198521f60 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-19 12:39:01 +02:00
834884f3a4 improved variable description. 2024-04-19 12:36:24 +02:00
80591f6f13 fixed an error in DumpHeader when dumping a TDoubleVector. 2024-03-16 15:59:17 +01:00
44456c49e9 fixed a typo: Atoi() instead of Atof(). 2024-03-16 15:34:00 +01:00
495f02c3c6 for macos: add /usr/local/lib to DYLD_LIBRARY_PATH for qt5. This is needed to find the nexus lib. 2024-03-07 12:31:32 +01:00
ad2e84581f revert back to boost ellint_1, since on many compilers the c++17 std::comp_ellint_1 is not yet implemented. 2024-03-05 18:29:34 +01:00
59dbae4a1e use the QProcess startDetached method and not the static one. 2024-02-14 09:30:17 +01:00
4d176c395c use the QProcess startDetached method and not the static one. 2024-02-14 09:26:27 +01:00
74978025fb start musrview as detached process: simplifies things. 2024-02-13 10:12:50 +01:00
deeee783f5 add /usr/local/lib to default DYLD_LIBRARY_PATH for macOS. 2024-02-08 14:00:06 +01:00
cadd28b9fe Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2024-02-03 20:01:01 +01:00
79c8be54bf update of the copyright info. 2024-02-03 19:58:11 +01:00
3cf89c6571 added some missing qutation marks musrfit_startup.xml. 2023-11-29 12:47:24 +01:00
673a742631 added some more default search path to default musrfit_startup.xml. 2023-11-29 12:44:58 +01:00
f68775dd64 Merge branch 'root6' of https://gitlab.psi.ch/nemu/musrfit into root6 2023-11-15 16:07:37 +01:00
23bf2ec2fc added proper rpath handling. 2023-11-15 16:04:21 +01:00
23ac67a443 add an option to musrfit which allows to replace to musrfit_startup.xml by the default one. 2023-11-11 18:26:25 +01:00
d6a3767040 adopted default path/file-name scheme to the current state. 2023-11-10 15:05:38 +01:00
75d0c9e01a adopted the technical doxygen files to the current state. 2023-11-10 08:26:52 +01:00
ecd9e4a953 improved the nonlocal field dump, by allowing a custom range. 2023-11-08 12:57:16 +01:00
3c2b0322c0 mupp: got rid of some left over raw pointers by replacing them through smartpointers. 2023-11-03 07:54:52 +01:00
4747fbc77d make sure that singleRunMsrFile is a legal pointer before proceeding. 2023-11-01 14:38:21 +01:00
b1b808ad7b switched TGapIntegrals from raw -> smart pointers. 2023-11-01 08:54:24 +01:00
2d1875ebfe remove unused code. 2023-11-01 08:27:48 +01:00
d221ef1ed0 more work in switching raw -> smart pointer. 2023-11-01 08:27:04 +01:00
f7c45f46ff switched TLondon1D from raw -> smart pointers. 2023-11-01 08:00:47 +01:00
5b093208eb fixed stupid copy/paste error when switching to smart pointers in PMusrWiz. 2023-10-31 18:08:31 +01:00
7a1f60d00f adopted MusrRootDefinition doc to smart pointer use. Updated MusrRootDefinition.pdf 2023-10-31 08:18:01 +01:00
de2d8394d3 adopted MusrRootDefinition doc to smart pointer use. 2023-10-31 08:00:22 +01:00
af13e78c52 more work on Raw -> Smart Pointers for external libs. 2023-10-27 23:23:19 +02:00
7691ef2815 Raw -> Smart Pointers in TMusrRunHeader. 2023-10-25 17:59:05 +02:00
8f4a7c6b68 Raw -> Smart Pointers in PNeXus. 2023-10-25 17:52:24 +02:00
1cb0cfd3e7 Nonlocal: Raw -> Smart Pointers. Improved config of standalone dump_nonlocal_field. 2023-10-25 17:40:56 +02:00
344a5c8ba0 print for debug: the ostream need explicit string not char[]. 2023-10-25 13:47:00 +02:00
6f521668c0 increased main version to 1.9.2, libPMusr to 1.4.0, and mupp to 1.1.0. 2023-10-25 08:46:02 +02:00
02a1cb7a0c added check for mupp script in case the data collection is not readable. 2023-10-25 08:32:13 +02:00
fdeed5dec4 (i) fix of missing status init. (ii) changed vector copy evaluation. 2023-10-24 21:09:35 +02:00
e676d3c045 Raw -> Smart Pointers for mupp_plotter, qt5/qt6. 2023-10-24 16:07:56 +02:00
9911d88889 Raw -> Smart Pointers for PVarDialog, mupp, qt5/qt6. 2023-10-24 13:08:30 +02:00
51520868f1 Raw -> Smart Pointers for mupp, qt5/qt6. 2023-10-24 12:55:26 +02:00
3d149dc6ab Raw -> Smart Pointers for musrWiz, qt5. 2023-10-24 12:15:20 +02:00
e79322b348 Raw -> Smart Pointers for musrStep, qt5. 2023-10-24 10:17:16 +02:00
62e86f42b7 Raw -> Smart Pointers in PSubTextEdit, musredit, qt5. 2023-10-24 09:38:37 +02:00
c18ed68aa8 Raw -> Smart Pointers in PPrefsDialog, musredit, qt5. 2023-10-24 09:30:00 +02:00
e376e9a2e6 Raw -> Smart Pointers for musredit qt5. 2023-10-24 09:22:42 +02:00
a90af4c342 start replacing raw to smart pointers for mupp. 2023-10-23 20:32:01 +02:00
1c7556a73d add missing include. 2023-10-22 19:06:56 +02:00
eb234b7de5 work on smart pointer transition of musrWiz. 2023-10-22 18:03:31 +02:00
3d7d86d657 more work on smart pointer transition of musrStep. 2023-10-22 11:00:24 +02:00
7743eaee09 more work on smart pointer transition of PTextEdit. 2023-10-22 09:31:22 +02:00
9c2e981e2a more work on smart pointer transition of PTextEdit. 2023-10-22 09:23:07 +02:00
f9b1ef9dcc more work on smart pointer transition of PTextEdit. 2023-10-22 09:17:42 +02:00
89146f3cee raw -> smart pointer for musredit where it makes sence. 2023-10-21 22:33:19 +02:00
be29e55834 switched PRunSingleHistoRRF where possible to smart pointers. 2023-10-21 19:19:04 +02:00
8e7fda92e1 switched PRunDataHandler where possible to smart pointers. 2023-10-21 19:11:01 +02:00
890d48a95c switched PRunBase where possible to smart pointers. 2023-10-21 18:46:24 +02:00
823ef087c9 switched PRgeHandler where possible to smart pointers. 2023-10-21 18:40:35 +02:00
05c06a071e switched PMusrT0 where possible to smart pointers. 2023-10-21 18:34:55 +02:00
dbfadc4e42 switched PMusrCanvas where possible to smart pointers. 2023-10-21 17:47:32 +02:00
93754a9fc2 replaced some raw pointer by smart pointer in PFitter. 2023-10-21 17:45:49 +02:00
0bff931af9 switch to smart pointers in PMsr2Data where possible. 2023-10-21 13:32:44 +02:00
1a72d67be9 switched PFitter to smart pointers. 2023-10-21 11:39:16 +02:00
7e17af0256 switched PMsrHandler where possible to smart pointers. 2023-10-21 11:21:27 +02:00
5d731611cf remove one check for Fourier only. 2023-10-18 14:22:06 +02:00
4b561b1f15 get rid of raw pointers for PFourierCanvas where it makes sense. 2023-10-18 14:21:15 +02:00
69305f8b1d removed obsolate clean up. 2023-10-17 16:42:27 +02:00
88b3ab8a01 Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2023-10-17 16:40:22 +02:00
ca742a064f more work to get rid of raw pointers. 2023-10-17 16:35:54 +02:00
b5a391e355 replaced raw pointers by smart pointers for musrt0.cpp. 2023-10-13 22:46:21 +02:00
1feed7116a replaced raw pointers by smart pointers for musrFT.cpp. 2023-10-13 22:46:01 +02:00
ff9245fd28 replaced raw pointers by smart pointers for msr2data.cpp. 2023-10-13 12:47:33 +02:00
98026c725d replaced raw pointers by smart pointers for dump_header.cpp. 2023-10-13 12:33:47 +02:00
5972391ff4 replaced raw pointers by smart pointers for any2many.cpp. 2023-10-13 12:23:32 +02:00
c5f6eb04b4 replaced raw pointers by smart pointers for addRun.cpp. 2023-10-13 12:19:58 +02:00
2a2e2b40d5 replaced raw pointers by smart pointers for musrview.cpp. 2023-10-13 12:10:06 +02:00
c2a2051d29 replaced raw pointers by smart pointers for musrfit.cpp. 2023-10-13 11:56:52 +02:00
Zaher Salman
578dc900c2 Merged in master (pull request #14)
Master

Approved-by: Andreas Suter
2023-09-28 11:25:29 +00:00
cf44df21ed Fixed compatibility with C++17 2023-09-28 13:16:19 +02:00
Zaher Salman
ef641de033 Merged muonspin/musrfit:root6 into master 2023-09-02 14:19:02 +02:00
4c62ae547f updated the docu. Newly added: brief description of the supported file formats. 2023-09-02 13:15:07 +02:00
Zaher Salman
91d6a4bc99 Merged muonspin/musrfit:root6 into master 2023-09-01 11:51:52 +02:00
c6ebaf3675 more potential musr-data-file paths added. 2023-08-31 10:30:04 +02:00
1df6643bfa more robust handling of positron detector entries. 2023-08-31 10:17:40 +02:00
4d1c7c10c8 make sure that exported MusrRoot files have proper stats in the histo objects. 2023-08-31 08:22:37 +02:00
0b3fc43123 handle dump of RunSummary with and without '\n' and/or '\r' properly. 2023-08-31 07:47:47 +02:00
1f32698b5f try to improve the reload issue of musrT0 called via musredit - Issue #61 on bitbucket. 2023-08-30 15:41:34 +02:00
22178f7869 improved search run, allowing to look for a specific file format in case the run is saved in multiple different file formats. 2023-08-30 15:05:56 +02:00
2e6e5ecb97 added the flame instrument. 2023-08-30 14:09:19 +02:00
Zaher Salman
56a8730252 Merged muonspin/musrfit:root6 into master 2023-05-22 09:18:22 +02:00
40e15218a3 add flag -c for dump_header via musredit. 2023-05-19 12:04:16 +02:00
39a54d7f63 dump_header can dump #counts for each detector now also for mud and nexus. 2023-05-17 17:22:47 +02:00
Zaher Salman
d664f5d877 Merged muonspin/musrfit:root6 into master 2023-05-17 10:00:49 +02:00
420b301ac5 dump_header can dump #counts for each detector. Currently only for MusrRoot. 2023-05-16 14:21:33 +02:00
5d9eb0dcec allow more flexible dealing with LEM run numbers > 9999. 2023-05-16 08:27:52 +02:00
905dfde5c7 Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2023-05-14 16:58:58 +02:00
05a732c9ec add 5-digit run name template for lem, needed for addRun and dump_header. 2023-05-14 16:57:08 +02:00
bace23b97e add hint for potential flatpak. 2023-04-14 10:50:58 +02:00
Zaher Salman
8765ac9192 Merged muonspin/musrfit:root6 into master 2023-03-10 15:52:28 +01:00
f7620445dc fixed c++ streaming output flag error. 2023-03-07 12:28:01 +01:00
Zaher Salman
f1b7ca226a Merged muonspin/musrfit:root6 into master 2023-02-20 10:15:20 +01:00
3457ff9d25 make sure that dictionary generation works. 2023-02-19 11:29:55 +01:00
Zaher Salman
30d124ab51 Merged muonspin/musrfit:root6 into master 2023-02-17 18:19:37 +01:00
da6eea271d updated docu. 2023-02-17 15:09:35 +01:00
abe47395cd changed to more meaningful labelling. 2023-02-17 15:02:28 +01:00
Zaher Salman
feb33b24ae Merged muonspin/musrfit:root6 into master 2023-02-17 09:46:39 +01:00
a9140ecd74 changed from energy_list to energy_vect in depth_profile_startup.xml. 2023-02-17 09:35:04 +01:00
1d40e74869 tweak needed for rootcling dictionary generation. 2023-02-17 08:33:36 +01:00
832450d183 updated ChangeLog. 2023-02-17 08:32:41 +01:00
f2b71c071e add musrfit version info on the config output. 2023-02-17 08:32:07 +01:00
9e88ddb989 Merge remote-tracking branch 'origin/depthProf' into root6 2023-02-17 07:39:17 +01:00
6c8c8d6706 add a full example to the test folder. 2023-02-16 16:00:48 +01:00
c2c4d0f3c5 cleanup and cosmetics. 2023-02-16 15:56:14 +01:00
2a5f9182ef removed build directory which should not have gone to the git. 2023-02-16 07:29:17 +01:00
Maria Martins
d37cb4add1 example files for depthProfile 2023-02-15 13:41:27 +01:00
Zaher Salman
c6cf124ee3 Merged muonspin/musrfit:root6 into master 2023-01-30 09:31:34 +01:00
7f3cc5a18f fixed wrong function declaration in the docu, not the code. 2023-01-30 09:21:23 +01:00
af3f282652 fixed typo. 2023-01-30 09:02:54 +01:00
Zaher Salman
401ff9ead6 Merged muonspin/musrfit:root6 into master 2023-01-10 16:39:45 +01:00
26d4fbda11 fix of an old copy/paste error! 2023-01-10 15:33:44 +01:00
2db15b2551 add OS tag for packages. 2023-01-09 10:46:55 +01:00
Zaher Salman
5fa84c74ec Merged muonspin/musrfit:root6 into master 2023-01-05 13:50:12 +01:00
84eb7c8ec3 updated the copyright info. 2023-01-05 11:05:54 +01:00
fe32046c21 updated the copyright info. 2023-01-05 10:24:31 +01:00
0f7e22f363 updated the ChangeLog. 2023-01-05 09:31:38 +01:00
db358591e9 provide some more info in the README for PDepthProfile. 2023-01-05 09:21:59 +01:00
7d2abffc47 update of the copyright info. 2023-01-05 09:18:38 +01:00
47bee12d3e improvement on: allow to draw theory only at the data points for PRunNonMusr. 2023-01-05 08:12:11 +01:00
8a6e4dca6f allow to draw theory only at the data points for PRunNonMusr. 2023-01-05 07:59:15 +01:00
a3276dd352 Merge branch 'root6' of ssh://git.psi.ch/nemu/musrfit into root6 2022-12-21 15:09:25 +01:00
39cf9854db improved dat file read routine for mupp for the case columns are added after RUN. 2022-12-21 15:07:52 +01:00
7ab9892b96 some first bug-fixing and cleanup of the code. 2022-12-21 13:15:58 +01:00
7c8548ef70 first implementation of a more efficient DepthProfile user function. Not yet tested! 2022-12-21 10:20:06 +01:00
7e63d22cb5 fixed formatting issue. 2022-12-21 10:17:42 +01:00
3b40c21226 remove obsolate file. 2022-12-21 08:05:49 +01:00
3123a3f84a remove .idea from PDepthProfile. 2022-12-21 08:03:44 +01:00
348f02b217 start to work on a more efficient version of MM PDepthProfile user function. 2022-12-21 07:55:33 +01:00
7bf2cfd8c1 moved depth_profile_startup.xml to test directory, which still needs to be populated. 2022-12-21 07:53:49 +01:00
a31da8df70 add new inline function GetNoOfRgeDataSets(). 2022-12-21 07:51:40 +01:00
41c90ef936 define tag energy_vec with attributes start, stop, step to define rge energy vector in a compact way in startup.xml files. 2022-12-21 07:49:57 +01:00
Zaher Salman
7b0492f499 Merged muonspin/musrfit:root6 into master 2022-12-14 14:36:34 +01:00
1c447c8a92 make them OpenMP aware for macOS. 2022-12-13 12:11:59 +01:00
Zaher Salman
da2705aa0e Merged muonspin/musrfit:root6 into master 2022-12-12 22:31:29 +01:00
f22b16876f update of the docu. 2022-12-12 16:28:13 +01:00
Zaher Salman
dd733164d1 Merged muonspin/musrfit:root6 into master 2022-12-04 19:33:25 +01:00
72dd9dea65 add feature that mupp_plotter can show/hide lines between the data points. 2022-12-03 11:02:20 +01:00
6b31c0a35d Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2022-11-30 13:00:54 +01:00
2f712cc2c7 added some more technical docu to PMsr2Data. 2022-11-30 13:00:28 +01:00
Zaher Salman
5658c06afd Merged muonspin/musrfit:root6 into master 2022-11-26 17:07:19 +01:00
19b9375d88 added cumulative frequency output. 2022-11-26 15:44:05 +01:00
9761666513 add a rgeHandler tester which allows quickly to test rge-file related handling. 2022-11-09 13:11:30 +01:00
b9d81668a7 add energy_vect tag which allows a more compact startup xml-file if the rge-files are equally spaced in energy. 2022-11-09 13:09:31 +01:00
1e51d2a007 squeeze out version information of the used libs. 2022-11-09 09:15:30 +01:00
Zaher Salman
b8622fefa8 Merged muonspin/musrfit:root6 into master 2022-11-07 15:44:01 +01:00
bface6bf1e adopted to the newer Qt versions. 2022-11-07 09:48:19 +01:00
e3c2149847 adopted to the newer boost versions. 2022-11-07 09:47:50 +01:00
Zaher Salman
382fd8ad99 Merged muonspin/musrfit:root6 into master 2022-11-06 12:21:54 +01:00
f3414f687c replaced sprintf -> snprintf throughout. 2022-11-05 20:16:44 +01:00
Zaher Salman
96ac7f68a2 Merged muonspin/musrfit:root6 into master 2022-09-07 10:55:54 +02:00
44aacfca50 adopted from qt5 to qt6. 2022-09-06 20:50:59 +02:00
Zaher Salman
02f7c459c5 Merged muonspin/musrfit:root6 into master 2022-09-05 15:23:27 +02:00
173d20f05e improved export parameter list behavior. Allow multiple deliminators: ',', ';', ' ' 2022-09-02 14:40:12 +02:00
ccc1dda352 fixed typo. 2022-09-02 14:38:54 +02:00
b4c7780ff5 improved msr<->mlog swap dialog. 2022-09-02 13:53:34 +02:00
2ba6e8a230 make sure that the minimum height of musrStep is not larger than the available screen resolution height. 2022-09-02 13:29:45 +02:00
8fed497adc implementation of depth step fits 2022-08-19 17:50:25 +02:00
Zaher Salman
bb9942e34b Merged muonspin/musrfit:root6 into master 2022-08-09 10:10:11 +02:00
43b4566870 fixed bug in msr2data global+ according to issue #33 reported on bitbucket. 2022-08-08 18:16:48 +02:00
Zaher Salman
8245728f82 Merged muonspin/musrfit:root6 into master 2022-07-06 16:26:04 +02:00
b1ffba391a lift cmake requirement to 3.17. 2022-07-06 13:48:59 +02:00
804c56fd1f removed obsolete filed. 2022-07-06 13:48:07 +02:00
ae7f1a2168 more work towards a modern cmake. As a first example reworked FFTW3 binding. 2022-07-01 16:18:24 +02:00
Zaher Salman
3c607768b9 Merged muonspin/musrfit:root6 into master 2022-06-21 17:34:53 +02:00
3f2e96303a improvement dealing with rpath on macOS. 2022-06-20 15:53:57 +02:00
Zaher Salman
b47c735a1c Merged muonspin/musrfit:root6 into master 2022-06-01 13:47:28 +02:00
1b190830e9 fixed typo. 2022-06-01 13:43:01 +02:00
7b19ba8b36 use PFindRun facility now. Cleaned up various little things. 2022-06-01 13:08:07 +02:00
Zaher Salman
c585fedb63 Merged muonspin/musrfit:root6 into master 2022-06-01 09:37:18 +02:00
137a3f17c9 move on to modernize towards modern c++. 2022-05-31 12:32:58 +02:00
Zaher Salman
374367bee8 Merged muonspin/musrfit:root6 into master 2022-05-29 19:02:39 +02:00
7e830a0c12 update of the docu. 2022-05-29 12:52:13 +02:00
e0ec00deab update ChangeLog 2022-05-29 11:31:41 +02:00
06d20d4086 adopted to new PSI-BIN lib. Added facility for finding runs via musrfit_startup.xml templates. 2022-05-28 14:10:15 +02:00
56820e498f refactor PSI-BIN lib. Fix a couple of bugs and start to adopt to more modern c++. 2022-05-28 14:08:04 +02:00
eefc49bd25 add search facility for runs via musrfit_startup.xml template entries. 2022-05-28 14:05:55 +02:00
0625bc008f fixed a typo, and tell the user if the file format info is not provided MusrRoot is assumed. 2022-05-27 13:14:30 +02:00
Zaher Salman
e1c9a61251 Merged muonspin/musrfit:root6 into master 2022-04-29 10:43:35 +02:00
Andreas Suter
f47fdf7e54 use proper return value (int) rather than bool. 2022-04-29 07:56:38 +02:00
Zaher Salman
6e9d8b3e35 Merged muonspin/musrfit:root6 into master 2022-04-28 09:50:19 +02:00
4aa903b879 replace the run-list handling through the already existing handler class PStringNumberList. 2022-04-27 16:45:33 +02:00
Zaher Salman
e37dede866 Merged muonspin/musrfit:root6 into master 2022-04-27 10:46:43 +02:00
57596ca441 fixed several copy/paste errors which prevented sometimes averaging and instead crashed. 2022-04-25 15:32:15 +02:00
Zaher Salman
0b93a08108 Merged muonspin/musrfit:root6 into master 2022-04-12 16:25:25 +02:00
5361727583 NeXus: replaced deprecated NXgetnextattr by NXgetnextattra. 2022-04-12 15:01:59 +02:00
9a92ec2d8e improved formated string handling to make compilers happy. 2022-04-11 16:18:36 +02:00
17a31dfcc4 do not ignore the return value of system(cmd) anymore. 2022-04-11 16:10:00 +02:00
9cc1957b2d added necessary include directory info for boost, for PRgeHandler. 2022-04-11 13:28:18 +02:00
26c1f49554 added depth profiler skeleton for MM. 2022-03-17 13:07:00 +01:00
fc08b12769 fixed wrong description (copy/paste error). 2022-03-17 12:17:38 +01:00
c8c2df5eb8 add reading routine for the dat-files as generate from msr2data. Use case: special 'non muSR fit' type. 2022-03-15 15:47:37 +01:00
2d85d10b2f start adding CSV like data reading routine with the FileFormat label DAT. 2022-03-14 20:59:37 +01:00
Zaher Salman
326b3bea17 Merged muonspin/musrfit:root6 into master 2022-03-04 14:46:21 +01:00
faffaec6ac fixed a typo. 2022-03-04 11:25:28 +01:00
Zaher Salman
aeaa698be2 Merged muonspin/musrfit:root6 into master 2022-01-11 14:34:03 +01:00
3cc36bcb6d Merged in constants (pull request #12)
update the physical constants pertaining to the muon

Approved-by: Andreas Suter
2022-01-11 10:41:59 +00:00
a3bcbefebe use the Particle Data Group's recommended value for the muon lifetime 2022-01-11 11:34:29 +01:00
Zaher Salman
5bcc460cce Merged muonspin/musrfit:root6 into master 2022-01-11 11:05:00 +01:00
a13ee27b9a Merged in skewedgauss (pull request #13)
improvements to PTheory::SkewedGauss

Approved-by: Andreas Suter
2022-01-11 07:23:12 +00:00
27fe3ff5fd 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-10 17:13:11 +01:00
fdc9ac8e7e 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-10 14:20:08 +01:00
c85a12b61e update the physical constants pertaining to the muon
- use the most recent/precise measurement of the muon's lifetime (MuLan experiment at PSI).
- define the gyromagnetic ratio in terms of the latest values for the fundamental physical constants (CODATA 2018).
2022-01-10 13:14:19 +01:00
Zaher Salman
6e4e9ab55e Merged muonspin/musrfit:root6 into master 2021-12-06 18:40:18 +01:00
06389416a6 replace deprecated QFontDatabase by the new static functions. 2021-12-05 16:45:53 +01:00
Zaher Salman
c4da2c4ec0 Merged muonspin/musrfit:root6 into master 2021-12-02 13:09:00 +01:00
3a1247e3ec modernized the cmake <-> Qt handling. 2021-12-01 15:25:38 +01:00
c5e5bddd10 try re-create musredit_startup.xml in case it is corrupted. 2021-11-29 16:11:14 +01:00
c44ae75e15 get rid of deprecated dialogs and make them more uniform. 2021-11-29 15:39:34 +01:00
d682004467 remove obsolate qt6 musredit dialog. 2021-11-29 15:20:18 +01:00
Zaher Salman
edbbb8fc45 Merged muonspin/musrfit:root6 into master 2021-11-05 15:01:19 +01:00
7486637998 revision of ChangeLog. 2021-11-05 14:24:38 +01:00
c75427513f adopted the the new dyld on macOS Monterey. 2021-11-05 14:06:20 +01:00
Zaher Salman
3e6d55f0e8 Merged muonspin/musrfit:root6 into master 2021-11-01 08:22:44 +01:00
a34e9fe535 add a default y-range to the range option in the PLOT block. 2021-10-30 09:58:49 +02:00
01ff382972 fixed a copy/paste error. 2021-10-30 09:56:15 +02:00
7ff3391d61 fixed a copy/paste error. 2021-10-30 09:53:09 +02:00
Zaher Salman
d9b29388d0 Merged muonspin/musrfit:root6 into master 2021-10-12 16:13:36 +02:00
c6602fb541 improved the error messages slightly. 2021-10-03 15:04:39 +02:00
8274fb9d54 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-02 19:41:45 +02:00
4f0590fe10 allow to inspect how many cores are available for OpenMP. 2021-10-02 10:11:44 +02:00
4f2041c141 allow to set the default size of musredit via the musredit_startup.xml. 2021-10-02 09:26:13 +02:00
Zaher Salman
f94c43ccdf Merged muonspin/musrfit:root6 into master 2021-09-28 13:28:28 +02:00
df03277c4c removed debug info from phase detection. 2021-09-22 09:54:25 +02:00
76f4e6846a increase version number from 1.7.4 -> 1.7.5 2021-09-22 08:09:46 +02:00
00398c7fa9 fix phases to +-360 degree. 2021-09-22 08:09:18 +02:00
Zaher Salman
30d2275b86 Merged muonspin/musrfit:root6 into master 2021-09-21 12:25:32 +02:00
d357b9ad2f add missing include directory path in cmake. Thank's to Akihiro Koda for reporting the bug and proposing the fix. 2021-09-21 07:52:58 +02:00
Zaher Salman
7d6d8e279f Merged muonspin/musrfit:root6 into master 2021-08-19 08:57:08 +02:00
4cc1dbecd1 increased the PippardFitter version number. 2021-08-19 07:53:11 +02:00
5f4125bca9 added some necessary include paths. 2021-08-19 07:52:22 +02:00
ef4fae3ef7 adopt for proper git-info handling. 2021-08-18 19:17:57 +02:00
d332bffd29 added some docu. 2021-08-18 19:17:18 +02:00
4a2d865282 add the option to dump the nonlocal field values for the ASlibs via the programm dump_nonlocal_field. 2021-08-18 16:57:29 +02:00
Zaher Salman
f3388a7d17 Merged muonspin/musrfit:root6 into master 2021-07-28 14:24:05 +02:00
c6c7deec9c make PSI bulk MusrRoot files accessible if the file name is generated from the run-number, year, etc. 2021-07-28 13:22:42 +02:00
341fa9f77c Removed MuTransistion from tests directory. 2021-07-20 10:51:10 +02:00
Zaher Salman
2d65bc4574 Merged muonspin/musrfit:root6 into master 2021-07-12 19:09:24 +02:00
ef1f323f07 fixed another git-revision.h which was forgotten. 2021-07-12 16:30:31 +02:00
47e7ba2c70 some fixes on the qt5 side for a none-git project source. 2021-07-12 16:23:33 +02:00
8faa501db7 more work on the none git source version. 2021-07-12 16:00:19 +02:00
2f11d131c7 some more work on the none git source version. 2021-07-12 15:49:01 +02:00
daa2ea1347 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 15:34:07 +02:00
Zaher Salman
51e4482945 Merged muonspin/musrfit:root6 into master 2021-07-05 19:40:34 +02:00
f41c633bfe add mupp plotter export function. 2021-07-05 17:43:32 +02:00
Zaher Salman
5235935f85 Merged muonspin/musrfit:root6 into master 2021-06-17 10:39:07 +02:00
5bebe4062d adopted version info for the docu. 2021-06-17 10:28:16 +02:00
Zaher Salman
76c2a98f5a Merged muonspin/musrfit:root6 into master 2021-06-17 10:03:09 +02:00
a0dd51e1b7 updated the ChangeLog. 2021-06-16 19:57:00 +02:00
dd08eeae12 increased version number. 2021-06-16 19:56:30 +02:00
66fee6a1b3 lift #forward == #backward restriction. 2021-06-16 19:55:43 +02:00
ab29dedb77 lift #forward == #backward restriction. 2021-06-16 17:58:40 +02:00
b2bb863e9d remove obsolete test. 2021-06-16 17:57:28 +02:00
Zaher Salman
b488ed60a0 Merged muonspin/musrfit:root6 into master 2021-06-07 19:58:56 +02:00
927f2e83c2 improve the readability of the time with packing in the code. 2021-06-07 18:34:36 +02:00
Zaher Salman
b9e3ceea5c Merged muonspin/musrfit:root6 into master 2021-06-06 22:49:19 +02:00
5bd5c08f39 adopted to the not quite standard ISIS NeXus files. 2021-06-05 10:51:19 +02:00
Zaher Salman
e0ecad2f3a Merged muonspin/musrfit:root6 into master 2021-06-02 14:14:56 +02:00
f4232057b8 perform a more robust casting. 2021-06-02 12:29:00 +02:00
90725dbf58 removed unnecessary check. 2021-06-02 12:28:24 +02:00
Zaher Salman
97400255a0 Merged muonspin/musrfit:root6 into master 2021-06-01 17:53:04 +02:00
3b24d512be increased the version number. 2021-06-01 17:31:37 +02:00
eae35a750d updated mud to the newest version and made it Apple Silicon M1 ready. 2021-06-01 17:09:37 +02:00
Zaher Salman
16a1629ab6 Merged muonspin/musrfit:root6 into master 2021-05-21 15:57:51 +02:00
8cce005fd5 add info on how musrfit is compiled Debug or Release. 2021-05-21 07:44:50 +02:00
Zaher Salman
939d4fb7b5 Merged muonspin/musrfit:root6 into master 2021-04-19 16:25:53 +02:00
Zaher Salman
c638456afe Merged muonspin/musrfit:root6 into master 2021-04-19 15:20:12 +02:00
86459e586d changed MuSR_td_PSI_bin in order to read old data. Not yet tested. 2021-04-19 11:58:24 +02:00
32c892cad4 add README files for the DummyUsrFcn with an example. 2021-04-19 08:09:53 +02:00
93c537ba22 update of ChangeLog. Increase version number. 2021-04-16 20:53:56 +02:00
5eed60937a 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-16 18:32:30 +02:00
Zaher Salman
29b603e124 Merged muonspin/musrfit:root6 into master 2021-04-13 15:33:36 +02:00
f775ef3545 Fix out-of-bound bug pointed out by Ryan McFadden. 2021-04-13 07:33:14 +02:00
fb85d025bb add missing Qt6 flag for the case the user wants to choose himself. 2021-04-13 07:31:01 +02:00
Zaher Salman
9c438b580b Merged muonspin/musrfit:root6 into master 2021-04-12 14:37:43 +02:00
8271192f63 make sure that group has indeed any elements. 2021-04-12 07:50:37 +02:00
Zaher Salman
65ee70c52e Merged muonspin/musrfit:root6 into master 2021-04-11 11:47:31 +02:00
cac1415c3e update of the docu. 2021-04-09 15:41:52 +02:00
692e7e44db propagate ROOT_GRTEQ_24 properly to the compile options. 2021-04-09 11:08:35 +02:00
911c31fb1e applies already for 6.24-rc which is 6.23.99, hence the odd adaptation. 2021-04-09 11:07:14 +02:00
c06f510aff changes needed since upcoming ROOT6.24 (minuit2) will break the backward compatibility. 2021-04-09 10:03:34 +02:00
38b289b99f add ROOT version information for better diagnostics. 2021-04-09 09:33:08 +02:00
Zaher Salman
6b32dcaa38 Merged muonspin/musrfit:root6 into master 2021-04-06 15:28:19 +02:00
7089e4b3d6 switched libPhotoMeissner to the new centralized PRgeHandler. 2021-04-01 20:41:00 +02:00
7de55705d2 slightly more modern c++ init style. 2021-04-01 20:38:32 +02:00
56f094dad0 slightly improved the rge handler. 2021-04-01 20:37:08 +02:00
cab8703f85 fix an error number of theory points for the view data. 2021-04-01 20:30:53 +02:00
72c085a0a8 make PRgeHandler to a shared libs. Adopted Nonlocal and PMagProximity accordingly. 2021-04-01 14:26:26 +02:00
113996aa4e changed the user function for nonlocal fitting to the new rge-handler. This breaks the backwards compatibility! 2021-03-30 15:48:51 +02:00
cb0e8d2e65 update of the ChangeLog. 2021-03-30 15:43:26 +02:00
0dc1c4d975 add some boost component checks. Increase the musrfit version number. 2021-03-30 15:41:38 +02:00
21213a45eb add a central rge-handler which can be used by all user function classes. 2021-03-30 15:39:45 +02:00
Zaher Salman
7f2d8f6625 Merged muonspin/musrfit:root6 into master 2021-03-29 17:34:02 +02:00
e6e951e8f4 update the copyright info. 2021-03-29 08:22:38 +02:00
Zaher Salman
4dea80c6b6 Merged muonspin/musrfit:root6 into master 2021-03-09 11:51:10 +01:00
551fa4e4a6 refresh of the setup docu. 2021-03-01 15:40:10 +01:00
Zaher Salman
8afc51f497 Merged muonspin/musrfit:root6 into master 2021-03-01 09:35:16 +01:00
6d61cfd4d9 modernized the msr input file. 2021-02-26 15:18:12 +01:00
cc8ac60713 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-02-26 15:17:41 +01:00
1372a8b782 xml schema more flexible about the order of 'histos' and 'RunHeader' 2021-02-18 14:59:35 +01:00
27607a2fa1 fix of a typo. 2021-02-18 11:56:39 +01:00
88b4e7600d fixed wrong casting originating from a copy/paste error. 2021-02-18 11:55:34 +01:00
Zaher Salman
acd149a159 Merged muonspin/musrfit:root6 into master 2021-02-17 14:10:02 +01:00
01ce90e97e better version for icons under macosx. 2021-02-16 20:46:52 +01:00
457adc7e7e add macOS BigSur icon to musredit. 2021-02-14 22:13:40 +01:00
Zaher Salman
c87906efd6 Merged muonspin/musrfit:root6 into master 2021-02-08 10:36:49 +01:00
90fb81f16a add new method GetTypeOfPath to TMusrRunHeader. It allows deduce the type of a given path-name. 2021-02-06 19:05:40 +01:00
bfd7229252 Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2021-01-26 10:33:13 +01:00
f9581ae9d5 fix typo. Increase minimal root version from rpm. 2021-01-26 10:21:06 +01:00
Zaher Salman
21dedba8fa Merged muonspin/musrfit:root6 into master 2021-01-25 09:01:24 +01:00
cd785b8e5d update of the docu. 2021-01-23 15:58:04 +01:00
9cc9792054 some bug fixing in the cmake chain concerning the new Qt6 stuff. 2021-01-23 10:21:55 +01:00
ad9cf0abf9 remove comment. 2021-01-22 22:25:43 +01:00
5dcc962351 add first Qt6 version of musredit, mupp, etc. 2021-01-22 22:04:11 +01:00
Zaher Salman
7279de07ff Merged muonspin/musrfit:root6 into master 2021-01-03 11:44:35 +01:00
386217b1fe add proper p-wave (line,point) superfluid density calculation. 2020-12-28 15:13:45 +01:00
12c2e5f7a4 fix minor '=' vs '==' bug. 2020-12-26 11:59:52 +01:00
daef50e35a adjust to Qt 5.14.x; remove compiler warnings. 2020-12-22 22:36:07 +01:00
04fff97704 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-22 17:31:42 +01:00
20d9794db2 replaced 3D description. The previous was just wrong! 2020-11-19 10:42:12 +01:00
ba7665c85f increment libGapIntegrals version number 2020-11-04 15:10:02 +01:00
32cf3221d9 BMWlibs: add two p-wave gap funtions which can be used to evaluate the superfluid density. 2020-11-04 15:03:58 +01:00
Zaher Salman
693b99755d Merged muonspin/musrfit:root6 into master 2020-09-11 10:22:39 +02:00
6ef53c6b6a remove redundant check from musredit/fileSaveAs 2020-09-10 15:23:27 +02:00
18424fe149 musredit: if save cannot write file, popup an error message dialog. 2020-09-10 15:04:19 +02:00
Zaher Salman
0069ef02c8 Merged muonspin/musrfit:root6 into master 2020-09-01 16:15:43 +02:00
6747e5c1ca added a missing check in Fourier difference handling. 2020-09-01 15:06:33 +02:00
Zaher Salman
45de42bc5b Merged muonspin/musrfit:root6 into master 2020-08-30 15:08:05 +02:00
66f3b48e2a musrview gets the new feature: calculate theory points only at data points. 2020-08-29 11:15:02 +02:00
Zaher Salman
7d1cb313f2 Merged muonspin/musrfit:root6 into master 2020-07-28 09:33:30 +02:00
33fe4ee5fb moved fTriggerColor toggle state to the proper position. 2020-07-28 08:50:59 +02:00
0e2d880249 A single asymmetry plot allows to toggle the color of the theory function line by the key 't'. 2020-07-27 18:36:27 +02:00
Zaher Salman
6a8ec77037 Merged muonspin/musrfit:root6 into master 2020-07-14 19:43:52 +02:00
be8689853b musredit: check if system variables ROOTSYS and MUSRFITPATH are set, and if not popup a warning. 2020-07-12 11:24:57 +02:00
a81515cb95 add another startup check which makes sure that musrfit is found by musredit. 2020-07-11 19:55:11 +02:00
Zaher Salman
85359817f9 Merged muonspin/musrfit:root6 into master 2020-06-21 17:46:24 +02:00
a09d6878f2 make more function available to mupp (sinh, .., asin, .., and sqrt) 2020-06-20 09:44:14 +02:00
Zaher Salman
268772e953 Merged muonspin/musrfit:root6 into master 2020-06-19 09:10:47 +02:00
5ec1228ea6 replaced obsolete QXmlDefaultHandler by QXmlStreamReader in musrWiz. 2020-06-18 22:35:29 +02:00
8ecac5fd57 replaced obsolete QXmlDefaultHandler by QXmlStreamReader in PChangeDefaultPathsDialog. 2020-06-18 20:44:08 +02:00
Zaher Salman
260c2c19e7 Merged muonspin/musrfit:root6 into master 2020-06-18 20:40:21 +02:00
35760525bb replaced obsolete QXmlDefaultHandler by QXmlStreamReader in mupp 2020-06-18 20:24:31 +02:00
c42bbd16f3 replaced obsolete QXmlDefaultHandler by QXmlStreamReader in musredit. 2020-06-18 18:46:03 +02:00
Zaher Salman
c8e863617a Merged muonspin/musrfit:root6 into master 2020-06-18 09:45:43 +02:00
4661dee936 update of the docu - describe meta info access in functions. 2020-06-17 20:22:42 +02:00
7b6180a688 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-17 19:31:31 +02:00
602a5a4e6c 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-13 16:13:44 +02:00
Zaher Salman
8da82ee6cc Merged muonspin/musrfit:root6 into master 2020-06-09 10:46:31 +02:00
f03b918840 add minimum size to musredit help. 2020-06-08 18:35:19 +02:00
Zaher Salman
a7e1477f7f Merged muonspin/musrfit:root6 into master 2020-05-27 09:18:18 +02:00
07a3de1ed4 fixed double newline with alpha and beta, accidentally introduced. 2020-05-26 16:06:46 +02:00
Zaher Salman
cbdef9b7b9 README.md edited online with Bitbucket 2020-05-26 07:22:22 +00:00
Zaher Salman
5cc8722a95 Merged muonspin/musrfit:root6 into master 2020-05-25 21:59:55 +02:00
58461bf013 updated the docu and adopted the ChangLog 2020-05-25 16:27:18 +02:00
c930298972 allow alpha, beta in the RUN block being expressed via a function. 2020-05-25 16:21:16 +02:00
Zaher Salman
56337cf7a5 Merged muonspin/musrfit:root6 into master 2020-05-19 17:20:03 +02:00
9af6b1fb8e make some cmake/boost/compiler combinations happy. 2020-05-19 15:44:37 +02:00
815ca7162f fixed some doxygen bugs in the technical docu. 2020-05-19 15:33:21 +02:00
5ee3b17953 updated the technical documentation. 2020-05-19 14:17:18 +02:00
Zaher Salman
a2855bba19 Merged muonspin/musrfit:root6 into master 2020-05-17 18:06:43 +02:00
f2a598f512 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:07:52 +02:00
Zaher Salman
263554dd37 Merged muonspin/musrfit:root6 into master 2020-05-16 14:22:13 +02:00
48d531f90f update of the docu. 2020-05-15 21:46:12 +02:00
cf0ab74ba7 release new version 1.6.0 2020-05-15 21:19:26 +02:00
eac9a8adc9 update of the docu for version 1.6.0 2020-05-15 21:17:32 +02:00
a200c184cb add more comments to the mupp script. 2020-05-14 20:34:05 +02:00
48a2ff632e fixed a typo. 2020-05-14 20:33:11 +02:00
29428ec1bf removed obsolete debug information/comments. 2020-05-14 15:50:50 +02:00
68ce56c7db add FindHDF4.cmake to musrfit since in more modern linux systems it is not available anymore. 2020-05-14 15:49:18 +02:00
5779a24b3e add missing varEdit icons. 2020-05-14 11:20:18 +02:00
651e24721f made the PmuppGui class ready for interactive variable handling. 2020-05-14 11:10:36 +02:00
df88345c55 fixed a signal emit error. Automatically select the first collection at startup. This way at least one collection is already selected. 2020-05-14 11:09:29 +02:00
1a2853e548 mupp: worked on the doxygen docu. 2020-05-11 20:20:23 +02:00
f19a94651b work an interactive variable definition in mupp. Up to checking it is already working. Add variable still missing. 2020-05-11 16:09:13 +02:00
867246874b make the version information more coherent. 2020-05-02 17:05:04 +02:00
a91002f807 remove accidental left-over debug info. 2020-05-02 14:47:13 +02:00
884e0270a1 lift the mupp version to 1.0 2020-05-02 14:29:37 +02:00
40fcc228fa 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-02 14:29:04 +02:00
6d0666f285 add empty constructor. 2020-04-30 17:37:52 +02:00
5755331273 add missing files. 2020-04-30 17:20:38 +02:00
d81a10e450 first full mupp version allowing variables on scripting level, interactively still missing. 2020-04-30 17:11:57 +02:00
f4ac06cb20 add another mupp example. 2020-04-29 17:11:49 +02:00
74cfa3ecbf more work on var handling. Inject collection variables. 2020-04-29 17:10:24 +02:00
29064c44be add skeleton for variable handling. 2020-04-29 14:13:23 +02:00
10271dab9a update of the copyright info. 2020-04-29 09:05:40 +02:00
41b4b61f1b update of the copyright info. 2020-04-29 08:51:03 +02:00
cce7a6bcd0 improved syntax messages. 2020-04-28 16:25:48 +02:00
a4eb96a4a9 changed to explicit std namespace. 2020-04-28 12:08:21 +02:00
572e0f96a5 changed to explicit std namespace. 2020-04-28 12:07:10 +02:00
4ebb5bb377 allow to remove x/y entries from the command line. 2020-04-28 10:17:38 +02:00
32ed8d4df2 work on the scripting part of mupp. Preparing for the step of parameter transformation. 2020-04-23 16:35:55 +02:00
Zaher Salman
a701a7a336 Merged muonspin/musrfit:root6 into master 2020-04-13 17:33:16 +02:00
83c4bff123 improved error messages for NeXus file reading. Especially for the case of HDF4/HDF5 <-> NeXus version issues. 2020-04-11 21:21:33 +02:00
Zaher Salman
a30ac29032 Merged muonspin/musrfit:root6 into master 2020-04-10 12:04:50 +02:00
90db9144fe fixes issue #24 reported on bitbucket. 2020-04-10 11:30:34 +02:00
e705ba5d9a remove unused variable. 2020-04-10 11:27:42 +02:00
Zaher Salman
479e81cc68 Merged muonspin/musrfit:root6 into master 2020-04-07 11:03:10 +02:00
38ffcb3104 allow to plot normalize data in mupp 2020-04-05 08:28:35 +02:00
54fee067df little extension which allows to normalize plots. Only dialogs added so far, no functionality yet. 2020-04-04 20:26:29 +02:00
2035ae5ede Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6 2020-02-16 17:20:23 +01:00
520ff84941 vortex film GL test: starting point. 2020-02-16 17:18:42 +01:00
de04b3f036 eventHandler test cleanup. Furthermore move make -> cmake. 2020-02-15 16:31:41 +01:00
Zaher Salman
896540bee6 Merged muonspin/musrfit:root6 into master 2020-02-10 10:36:16 +01:00
785b32e945 proper cleanup. 2020-02-10 08:57:35 +01:00
5232349ad1 updated to the new musrfit and doxygen version. 2020-02-05 15:03:47 +01:00
Zaher Salman
2f5259d6e5 Merged muonspin/musrfit:root6 into master 2020-02-05 09:42:37 +01:00
c3e3af0311 update of the docu including the SECTOR cmd. 2020-02-04 19:37:31 +01:00
e9247ed3d5 increment version. 2020-02-03 21:03:45 +01:00
fe7a1b7920 first full implementation of the sector command. 2020-02-03 20:54:23 +01:00
1fb1753d82 more work on the SECTOR command. CalcNoOfFitBins() needed to be changed from protected to public. 2020-02-02 17:12:08 +01:00
ed0bfd516b started to implement a chisq/maxLH sector command. Currently only the skeleton is in place. 2020-01-31 16:39:52 +01:00
Zaher Salman
8742d9651b Merged muonspin/musrfit:root6 into master 2020-01-31 09:49:29 +01:00
513144997e updated docu 2020-01-31 07:50:50 +01:00
Zaher Salman
63f73427b1 Merged muonspin/musrfit:root6 into master 2019-12-04 11:02:45 +01:00
55b681acc1 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:15:09 +01:00
Zaher Salman
2afc21becc Merged muonspin/musrfit:root6 into master 2019-11-11 13:10:01 +01:00
c71fc92cf0 fixed some minor typos in the docu. 2019-11-11 12:57:06 +01:00
Zaher Salman
63a1b1c1f3 Merged muonspin/musrfit:root6 into master 2019-11-11 09:29:40 +01:00
af5a6e37d1 slightly improved call-up of mupp from musredit. If cancelling the db-dialog mupp will quit, but only at startup. 2019-11-09 09:27:42 +01:00
ca5bbbe1e0 Added explicitly CMP0075 policy in order to get rid of an unnessary warning. 2019-11-08 20:25:49 +01:00
Zaher Salman
b916b0f6da Merged muonspin/musrfit:root6 into master 2019-11-08 16:20:35 +01:00
921b8bbab4 fixed a bug in the global+ option of msr2data if a global section is present. 2019-11-08 12:23:27 +01:00
Zaher Salman
4ef4316b97 Merged muonspin/musrfit:root6 into master 2019-10-28 09:21:05 +01:00
503336e685 also allow to add an offset. 2019-10-24 13:02:34 +02:00
2650c7d12b allow to change the power N for 2^N elements. 2019-10-24 12:39:11 +02:00
Zaher Salman
357b225d53 Merged muonspin/musrfit:root6 into master 2019-10-24 09:16:57 +02:00
b3d9345def Merge https://gitlab.psi.ch/nemu/musrfit into root6 2019-10-24 07:49:13 +02:00
b29d85dd4c fix for the case that a global section is present. 2019-09-23 13:53:19 +02:00
Zaher Salman
5fff38d36b Merged muonspin/musrfit:root6 into master 2019-09-12 15:03:14 +02:00
Zaher Salman
d00752b196 Merged muonspin/musrfit:root6 into master 2019-09-02 10:07:32 +02:00
155 changed files with 13536 additions and 6274 deletions

View File

@@ -0,0 +1,45 @@
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

View File

@@ -1,4 +1,4 @@
# - musrfit --- DKS -----------------------------------------------------------
# - musrfit
cmake_minimum_required(VERSION 3.17)
# cmake: use BoostConfig.cmake instead of FindBoost
@@ -9,7 +9,6 @@ endif ()
project(musrfit VERSION 1.10.0 LANGUAGES C CXX)
#--- 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)
@@ -77,7 +76,7 @@ find_package(PkgConfig REQUIRED)
find_package(Git REQUIRED)
#--- check for ROOT -----------------------------------------------------------
find_package(ROOT 6.16 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
find_package(ROOT 6.18 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
if (ROOT_mathmore_FOUND)
execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR)
string(STRIP ${ROOT_BINDIR} ROOT_BINDIR)
@@ -131,42 +130,6 @@ 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
@@ -256,7 +219,7 @@ if (nexus)
# Find HDF4 manually (pkg-config often doesn't have hdf4)
find_path(HDF4_INCLUDE_DIR
NAMES mfhdf.h
PATHS /usr/include /usr/include/hdf /usr/local/include
PATHS /usr/include /usr/local/include
PATH_SUFFIXES hdf
)
@@ -374,7 +337,6 @@ 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}")
@@ -382,21 +344,6 @@ 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("")

View File

@@ -243,7 +243,6 @@ 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.
@@ -251,7 +250,6 @@ 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
===================================

View File

@@ -17,7 +17,7 @@ set (CPACK_RESOURCE_FILE_LICENSE "@PROJECT_SOURCE_DIR@/COPYING")
set (CPACK_RESOURCE_FILE_README "@PROJECT_SOURCE_DIR@/README.md")
set (CPACK_RESOURCE_FILE_WELCOME "@PROJECT_SOURCE_DIR@/cmake/welcome.txt")
set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "@CMAKE_INSTALL_PREFIX@;@CMAKE_INSTALL_PREFIX@/bin;@CMAKE_INSTALL_PREFIX@/include;@CMAKE_INSTALL_PREFIX@/share;@CMAKE_INSTALL_PREFIX@/lib64;@CMAKE_INSTALL_PREFIX@/lib;@CMAKE_INSTALL_PREFIX@/pkgconfig")
set (CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "@CMAKE_INSTALL_PREFIX@;@CMAKE_INSTALL_PREFIX@/bin;@CMAKE_INSTALL_PREFIX@/include;@CMAKE_INSTALL_PREFIX@/share;@CMAKE_INSTALL_PREFIX@/lib64;@CMAKE_INSTALL_PREFIX@/lib;@CMAKE_INSTALL_PREFIX@/pkgconfig;@CMAKE_INSTALL_PREFIX@/share/applications;@CMAKE_INSTALL_PREFIX@/share/icons;@CMAKE_INSTALL_PREFIX@/share/icons/hicolor;@CMAKE_INSTALL_PREFIX@/share/icons/hicolor/48x48;@CMAKE_INSTALL_PREFIX@/share/icons/hicolor/48x48/apps")
# we do not have any absolute paths, so do not need DESTDIR
set (CPACK_SET_DESTDIR "OFF")

View File

@@ -1,97 +0,0 @@
## 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})

View File

@@ -1,34 +0,0 @@
# - 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)

View File

@@ -1,45 +0,0 @@
# - 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)

13
cmake/musredit.desktop Normal file
View File

@@ -0,0 +1,13 @@
[Desktop Entry]
Name=MuSRedit
Comment=editor and launcher for the musrfit data analysis
GenericName=musrfit editor
Exec=musredit %F
Icon=musredit
Terminal=false
Type=Application
StartupWMClass=MuSRedit
Categories=Science;DataEditing;
MimeType=text/plain;
Keywords=muSR;fitting;musrfit;physics;muon;
StartupNotify=true

View File

@@ -91,6 +91,8 @@ rm -rf $RPM_BUILD_ROOT
%_prefix/lib64/*
%license COPYING
%doc %_prefix/share/doc/musrfit
%{_datadir}/applications/musredit.desktop
%{_datadir}/icons/hicolor/48x48/apps/musredit.png

View File

@@ -10,3 +10,10 @@ then
fi
/sbin/ldconfig
#update .desktop and icons
if command -v update-desktop-database &>/dev/null; then
update-desktop-database -q /usr/share/applications || true
fi
if command -v gtk-update-icon-cache &>/dev/null; then
gtk-update-icon-cache -q -t /usr/share/icons/hicolor || true
fi

View File

@@ -3,3 +3,11 @@
echo " >> musrfit post uninstall script started ..."
/sbin/ldconfig
#update .desktop and icons
if command -v update-desktop-database &>/dev/null; then
update-desktop-database -q /usr/share/applications || true
fi
if command -v gtk-update-icon-cache &>/dev/null; then
gtk-update-icon-cache -q -t /usr/share/icons/hicolor || true
fi

View File

@@ -11,7 +11,7 @@ FITPARAMETER
###############################################################
THEORY
asymmetry 1
userFcn libGapIntegrals TGapPointPWave 2 3
userFcn libGapIntegrals TGapDWave 2 3 4 5
###############################################################
RUN data/libGapIntegrals-test PIM3 PSI ASCII (name beamline institute data-file-format)

View File

@@ -6,30 +6,6 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
<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>
<energy_vect start="1000" stop="22000" step="1000"/>
</trim_sp>
</depthProf>

View File

@@ -6,30 +6,6 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
<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>
<energy_vect start="1000" stop="22000" step="1000"/>
</trim_sp>
</depthProf>

View File

@@ -6,30 +6,6 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>Si10_2.0_E</rge_fln_pre>
<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>
<energy_vect start="1000" stop="22000" step="1000"/>
</trim_sp>
</depthProf>

View File

@@ -6,30 +6,6 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiO2_70nm2.0_30nm2.2_SiC_E</rge_fln_pre>
<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>
<energy_vect start="1000" stop="22000" step="1000"/>
</trim_sp>
</depthProf>

View File

@@ -4,7 +4,7 @@
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
@@ -12,4 +12,4 @@
#pragma link C++ class PUserFcn+;
#endif //__CLING__
#endif //__CINT__

View File

@@ -48,5 +48,5 @@ runs 1
range 0 8 0 0.25
###############################################################
STATISTIC --- 2026-01-21 12:33:58
STATISTIC --- 2017-02-08 07:07:39
chisq = 134.0, NDF = 99, chisq/NDF = 1.353150

View File

@@ -2,106 +2,106 @@ MnSi, FLC68.2, 50 K
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
###############################################################
THEORY
@@ -257,12 +257,9 @@ t0 20039.0
###############################################################
COMMANDS
#OpenCL-GPU
CUDA
MAX_LIKELIHOOD
#PRINT_LEVEL 2
PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
@@ -281,5 +278,5 @@ phase par(7, 5, 16)
range 7.1 7.5
###############################################################
STATISTIC --- 2026-01-19 16:46:24
maxLH = 1286509.8, NDF = 1246064, maxLH/NDF = 1.032459
STATISTIC --- 2018-10-15 15:55:36
maxLH = 1286508.7, NDF = 1246064, maxLH/NDF = 1.032458

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.05052 -0.00071 0.00072 0 0.33
1 AsymT 0.05053 -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.921 -0.048 0.048
8 BkgL 6.920 -0.048 0.048
9 RelPhaseR 178.8 -1.9 1.9 150 210
10 NormR 419.47 -0.40 0.40
10 NormR 419.46 -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.467 -0.049 0.050
14 BkgT 7.466 -0.049 0.049
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 * (par7 + map1))
fun4 = par4 * cos(pi / 180.0 * (par7 + map1))
###############################################################
GLOBAL
@@ -96,5 +96,5 @@ range 0 9 -0.15 0.15
view_packing 500
###############################################################
STATISTIC --- 2026-02-13 14:07:06
maxLH = 3971.7, NDF = 4001, maxLH/NDF = 0.992678
STATISTIC --- 2018-11-13 07:58:56
maxLH = 3971.7, NDF = 4001, maxLH/NDF = 0.992668

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.00052 0 0.3
3 asym 0.23440 -0.00051 0.00051 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,6 +38,7 @@ 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
@@ -69,8 +70,5 @@ range 0 20 -0.35 0.35
view_packing 10
###############################################################
STATISTIC --- 2026-03-02 13:44:22
STATISTIC --- 2026-02-23 13:09:55
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)

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.8 -1.0 1.0
7 N0_R 1159.7 -1.0 1.0
8 Bkg_L 54.47 -0.20 0.20
9 Bkg_R 46.71 -0.19 0.19
9 Bkg_R 46.70 -0.19 0.19
###############################################################
THEORY
@@ -47,7 +47,6 @@ t0 202.0
###############################################################
COMMANDS
CUDA
SCALE_N0_BKG TRUE
MINIMIZE
MINOS
@@ -64,11 +63,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, PHASE_OPT_REAL
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase 8.5
#range_for_phase_correction 50.0 70.0
range 0 200
range 0.0 200.0
###############################################################
STATISTIC --- 2024-06-07 15:33:49
chisq = 663.9, NDF = 515, chisq/NDF = 1.289084
STATISTIC --- 2015-01-05 14:09:47
chisq = 663.9, NDF = 515, chisq/NDF = 1.289169

View File

@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: fae482e1a3134e03efb428cbbe21a254
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a49a5e0b750ed752f738f66d3ddeadd4
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@@ -733,9 +733,10 @@ 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
@@ -755,7 +756,7 @@ INPUT_ENCODING = UTF-8
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
FILE_PATTERNS = *.dox *.cpp *.h *.hpp
FILE_PATTERNS = mupp.dox *.cpp *.h *.hpp
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -1532,7 +1533,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 = YES
GENERATE_LATEX = NO
# 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

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 = "musredit"
PROJECT_NAME = "mupp"
# 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.0.0
PROJECT_NUMBER = 1.1.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/musredit
OUTPUT_DIRECTORY = ./technical/html/mupp
# 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,7 +733,10 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
INPUT =../src/musredit_qt5/musredit
INPUT = ./ \
../src/musredit_qt6/mupp \
../src/musredit_qt6/mupp/var/include \
../src/musredit_qt6/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
@@ -753,7 +756,7 @@ INPUT_ENCODING = UTF-8
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
# *.qsf, *.as and *.js.
FILE_PATTERNS = *.dox *.cpp *.h
FILE_PATTERNS = mupp.dox *.cpp *.h *.hpp
# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
@@ -1530,7 +1533,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 = YES
GENERATE_LATEX = NO
# 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
@@ -1969,7 +1972,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/musredit.tag
GENERATE_TAGFILE = dox-tags/mupp.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.

2567
doc/musredit_qt5_dox.cfg Normal file

File diff suppressed because it is too large Load Diff

2567
doc/musredit_qt6_dox.cfg Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -16,18 +16,18 @@
<p>People merely interested in the handling of the programs should check this link:
\htmlonly
<a href="http://lmu.web.psi.ch/musrfit/user/html/index.html">musrfit user manual</a>
<a href="https://lmu.pages.psi.ch/musrfit-docu/">musrfit user manual</a>
\endhtmlonly
\latexonly
musrfit user manual: \texttt{http://lmu.web.psi.ch/musrfit/user/html/index.html}
musrfit user manual: \texttt{https://lmu.pages.psi.ch/musrfit-docu/user-manual.html}
\endlatexonly
<p>People which would like to know how to install the musrfit framework, please check this link:
\htmlonly
<a href="http://lmu.web.psi.ch/musrfit/user/html/setup-standard.html">How to setup musrfit on different platforms</a>
<a href="https://lmu.pages.psi.ch/musrfit-docu/setup-standard.html">How to setup musrfit on different platforms</a>
\endhtmlonly
\latexonly
How to setup musrfit on different platforms: \texttt{http://lmu.web.psi.ch/musrfit/user/html/setup-standard.html}
How to setup musrfit on different platforms: \texttt{https://lmu.pages.psi.ch/musrfit-docu/setup-standard.html}
\endlatexonly
//****************************************************************************************************
@@ -47,12 +47,7 @@ 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
@@ -60,8 +55,7 @@ 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
- **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.
- **addRun**: allows to add runs from the command line
- **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.
@@ -85,7 +79,11 @@ 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
bitbkucket \verbatim https://bitbucket.org/muonspin/musrfit/issues \endverbatim.
<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
*/

File diff suppressed because it is too large Load Diff

View File

@@ -81,7 +81,6 @@ 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>

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_INC})
include_directories(${FFTW3_INCLUDE})
root_generate_dictionary(
PFourierCanvasDict
@@ -95,7 +95,6 @@ add_library(PMusr SHARED
PFindRun.cpp
PFitter.cpp
PFitterFcn.cpp
PFitterFcnDKS.cpp
PFourier.cpp
PFourierCanvas.cpp
PFourierCanvasDict.cxx
@@ -130,7 +129,6 @@ 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}>
@@ -186,14 +184,6 @@ 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_LIBARIES})
#set(DependOnLibs ${DependOnLibs} ${FFTW3_LIBRARY})
@@ -211,13 +201,6 @@ 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_LIBRARIES} ${ROOT_LIBRARIES})

View File

@@ -31,9 +31,6 @@
#include "config.h"
#endif
#include <sys/time.h>
#include <sys/utsname.h>
#ifdef HAVE_GOMP
#include <omp.h>
#endif
@@ -41,7 +38,6 @@
#include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <limits>
#include <cmath>
@@ -295,7 +291,6 @@ 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
@@ -341,36 +336,8 @@ PFitter::PFitter(PMsrHandler *runInfo, PRunListCollection *runListCollection, Bo
// create phase bool array
GetPhaseParams();
// 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;
}
}
// create fit function object
fFitterFcn = std::make_unique<PFitterFcn>(runListCollection, fUseChi2);
}
//--------------------------------------------------------------------------
@@ -691,24 +658,13 @@ Bool_t PFitter::DoFit()
if (error[i] != 0.0)
usedParams++;
}
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);
}
UInt_t ndf = static_cast<int>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
Double_t val = (*fFitterFcn)(param);
if (fUseChi2) {
// calculate expected chisq
Double_t totalExpectedChisq = 0.0;
PDoubleVector expectedChisqPerRun;
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
// calculate chisq per run
std::vector<Double_t> chisqPerRun;
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -721,21 +677,14 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
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 << ")";
}
@@ -753,20 +702,13 @@ Bool_t PFitter::DoFit()
secFitRange[0].first = fSector[k].GetTimeRangeFirst(0);
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// 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 chisq
val = (*fFitterFcn)(param);
// calculate NDF
ndf = static_cast<UInt_t>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
// calculate expected chisq
totalExpectedChisq = 0.0;
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
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));
@@ -781,20 +723,14 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
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 << ")";
}
@@ -808,10 +744,7 @@ Bool_t PFitter::DoFit()
// calculate expected maxLH
Double_t totalExpectedMaxLH = 0.0;
std::vector<Double_t> expectedMaxLHPerRun;
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
// calculate maxLH per run
std::vector<Double_t> maxLHPerRun;
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -824,12 +757,9 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/maxLH.chisq/maxLH.chisq_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.maxLH/red.maxLH_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
}
}
@@ -845,20 +775,13 @@ Bool_t PFitter::DoFit()
secFitRange[0].first = fSector[k].GetTimeRangeFirst(0);
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// 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 maxLH
val = (*fFitterFcn)(param);
// calculate NDF
ndf = static_cast<int>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
// calculate expected maxLH
totalExpectedMaxLH = 0.0;
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
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));
@@ -873,12 +796,9 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0)
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/maxLH.chisq/maxLH.chisq_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
std::cout << std::endl << ">> run block " << i+1 << ": (NDF/red.maxLH/red.maxLH_e) = (" << ndf_run << "/" << maxLHPerRun[i]/ndf_run << "/" << expectedMaxLHPerRun[i]/ndf_run << ")";
}
}
@@ -1057,15 +977,7 @@ Bool_t PFitter::CheckCommands()
if (line.Contains("COMMANDS", TString::kIgnoreCase)) {
continue;
} 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
} else if (line.Contains("SET BATCH", TString::kIgnoreCase)) { // needed for backward compatibility
continue;
} else if (line.Contains("END RETURN", TString::kIgnoreCase)) { // needed for backward compatibility
continue;
@@ -1791,13 +1703,7 @@ Bool_t PFitter::ExecuteContours()
return false;
}
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnContours contours((*fcn), *fFcnMin);
ROOT::Minuit2::MnContours contours((*fFitterFcn), *fFcnMin);
fScanData = contours(fScanParameter[0], fScanParameter[1], fScanNoPoints);
@@ -1935,13 +1841,8 @@ 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((*fcn), fMnUserParams, maxfcn);
ROOT::Minuit2::MnUserParameterState mnState = hesse((*fFitterFcn), 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);
@@ -1952,8 +1853,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;
}
@@ -1983,12 +1884,7 @@ Bool_t PFitter::ExecuteMigrad()
// create migrad object
// strategy is by default = 'default'
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnMigrad migrad((*fcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
ROOT::Minuit2::MnMigrad migrad((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
// minimize
// maxfcn is MINUIT2 Default maxfcn
@@ -2031,11 +1927,7 @@ Bool_t PFitter::ExecuteMigrad()
// handle statistics
Double_t minVal = min.Fval();
UInt_t ndf = 0.0;
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins();
else
ndf = fFitterFcn->GetTotalNoOfFittedBins();
UInt_t 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())
@@ -2068,12 +1960,7 @@ Bool_t PFitter::ExecuteMinimize()
// create minimizer object
// strategy is by default = 'default'
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnMinimize minimize((*fcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
ROOT::Minuit2::MnMinimize minimize((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
// minimize
// maxfcn is MINUIT2 Default maxfcn
@@ -2117,11 +2004,7 @@ Bool_t PFitter::ExecuteMinimize()
// handle statistics
Double_t minVal = min.Fval();
UInt_t ndf = 0.0;
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins();
else
ndf = fFitterFcn->GetTotalNoOfFittedBins();
UInt_t 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())
@@ -2168,13 +2051,8 @@ 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((*fcn), (*fFcnMin));
ROOT::Minuit2::MnMinos minos((*fFitterFcn), (*fFcnMin));
for (UInt_t i=0; i<fParams.size(); i++) {
// only try to call minos if the parameter is not fixed!!
@@ -2368,12 +2246,7 @@ Bool_t PFitter::ExecuteScan()
{
std::cout << ">> PFitter::ExecuteScan(): will call scan ..." << std::endl;
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnScan scan((*fcn), fMnUserParams);
ROOT::Minuit2::MnScan scan((*fFitterFcn), fMnUserParams);
if (fScanAll) { // not clear at the moment what to be done here
// TO BE IMPLEMENTED
@@ -2431,13 +2304,9 @@ 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;
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(par_r, totalExpectedChisq, expectedchisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(par_r, totalExpectedChisq, expectedchisqPerRun);
fFitterFcn->CalcExpectedChiSquare(par_r, totalExpectedChisq, expectedchisqPerRun);
// calculate chisq per run
std::vector<Double_t> chisqPerRun;
@@ -2452,10 +2321,7 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndfPerHisto.push_back(ndf_run);
}
@@ -2470,12 +2336,16 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
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
@@ -2516,43 +2386,6 @@ 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++) {
@@ -2951,12 +2784,7 @@ Bool_t PFitter::ExecuteSimplex()
// create minimizer object
// strategy is by default = 'default'
ROOT::Minuit2::FCNBase *fcn = nullptr;
if (fDKSReady)
fcn = fFitterFcnDKS.get();
else
fcn = fFitterFcn.get();
ROOT::Minuit2::MnSimplex simplex((*fcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
ROOT::Minuit2::MnSimplex simplex((*fFitterFcn), fMnUserParams, ROOT::Minuit2::MnStrategy{fStrategy});
// minimize
// maxfcn is 10*MINUIT2 Default maxfcn
@@ -2999,11 +2827,7 @@ Bool_t PFitter::ExecuteSimplex()
// handle statistics
Double_t minVal = min.Fval();
UInt_t ndf = 0.0;
if (fDKSReady)
fFitterFcnDKS->GetTotalNoOfFittedBins();
else
fFitterFcn->GetTotalNoOfFittedBins();
UInt_t 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())
@@ -3055,23 +2879,14 @@ void PFitter::PrepareSector(PDoubleVector &param, PDoubleVector &error)
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// calculate chisq
if (fDKSReady)
val = (*fFitterFcnDKS)(param);
else
val = (*fFitterFcn)(param);
val = (*fFitterFcn)(param);
fSector[k].SetChisq(val);
// calculate NDF
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
else
ndf = fFitterFcn->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
ndf = static_cast<UInt_t>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
fSector[k].SetNDF(ndf);
// calculate expected chisq
totalExpectedChisq = 0.0;
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedChisq, expectedChisqPerRun);
fSector[k].SetExpectedChisq(totalExpectedChisq);
// calculate chisq per run
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -3083,10 +2898,7 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0) {
fSector[k].SetNDF(ndf_run, i);
}
@@ -3094,10 +2906,7 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0) {
fSector[k].SetNDF(ndf_run, i);
}
@@ -3117,23 +2926,14 @@ void PFitter::PrepareSector(PDoubleVector &param, PDoubleVector &error)
secFitRange[0].second = fSector[k].GetTimeRangeLast();
fRunListCollection->SetFitRange(secFitRange);
// calculate maxLH
if (fDKSReady)
val = (*fFitterFcnDKS)(param);
else
val = (*fFitterFcn)(param);
val = (*fFitterFcn)(param);
fSector[k].SetChisq(val);
// calculate NDF
if (fDKSReady)
ndf = fFitterFcnDKS->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
else
ndf = fFitterFcn->GetTotalNoOfFittedBins() - static_cast<UInt_t>(usedParams);
ndf = static_cast<UInt_t>(fFitterFcn->GetTotalNoOfFittedBins()) - usedParams;
fSector[k].SetNDF(ndf);
// calculate expected maxLH
totalExpectedMaxLH = 0.0;
if (fDKSReady)
fFitterFcnDKS->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
else
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
fFitterFcn->CalcExpectedChiSquare(param, totalExpectedMaxLH, expectedMaxLHPerRun);
fSector[k].SetExpectedChisq(totalExpectedMaxLH);
// calculate maxLH per run
for (UInt_t i=0; i<fRunInfo->GetMsrRunList()->size(); i++) {
@@ -3145,10 +2945,7 @@ 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++) {
if (fDKSReady)
ndf_run = fFitterFcnDKS->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
else
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
ndf_run = fFitterFcn->GetNoOfFittedBins(i) - fRunInfo->GetNoOfFitParameters(i);
if (ndf_run > 0) {
fSector[k].SetNDF(ndf_run, i);
}
@@ -3235,59 +3032,6 @@ 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)
//--------------------------------------------------------------------------
@@ -3327,10 +3071,11 @@ PDoubleVector PFitter::ParamRound(const PDoubleVector &par, const PDoubleVector
par_r[i] = par[i];
}
}
return par_r;
}
//-------------------------------------------------------------------------------------------------
// end
//-------------------------------------------------------------------------------------------------

View File

@@ -38,14 +38,16 @@
* \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) :
fUseChi2(useChi2),
fRunListCollection(runList)
PFitterFcn::PFitterFcn(PRunListCollection *runList, Bool_t useChi2)
{
fUseChi2 = useChi2;
if (fUseChi2)
fUp = 1.0;
else
fUp = 0.5;
fRunListCollection = runList;
}
//--------------------------------------------------------------------------
@@ -115,12 +117,6 @@ 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++) {
@@ -128,11 +124,5 @@ 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;
}
}
}

View File

@@ -1,538 +0,0 @@
/***************************************************************************
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();
}

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, Bool_t useFFTW) :
PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTime, Bool_t dcCorrected, UInt_t zeroPaddingPower) :
fData(data), fUnitTag(unitTag), fStartTime(startTime), fEndTime(endTime),
fDCCorrected(dcCorrected), fZeroPaddingPower(zeroPaddingPower)
{
@@ -491,16 +491,9 @@ PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTi
}
fValid = true;
fUseFFTW = true;
fIn = nullptr;
fOut = nullptr;
#ifdef HAVE_DKS
fInDKS = nullptr;
fOutDKS = nullptr;
#endif
SetUseFFTW(useFFTW);
//as fPhCorrectedReFT = 0;
fApodization = F_APODIZATION_NONE;
@@ -555,71 +548,21 @@ PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTi
}
// allocate necessary memory
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
}
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 (fUseFFTW) {
if ((fIn == nullptr) || (fOut == nullptr)) {
fValid = false;
return;
}
} else { // try DKS
#ifdef HAVE_DKS
if ((fInDKS == nullptr) || (fOutDKS == nullptr)) {
fValid = false;
return;
}
#else
if ((fIn == nullptr) || (fOut == nullptr)) {
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);
// 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) {
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
// check if a valid plan has been generated
if (!fFFTwPlan) {
fValid = false;
#endif
}
}
@@ -640,25 +583,14 @@ PFourier::PFourier(TH1F *data, Int_t unitTag, Double_t startTime, Double_t endTi
*/
PFourier::~PFourier()
{
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
}
if (fFFTwPlan)
fftw_destroy_plan(fFFTwPlan);
if (fIn)
fftw_free(fIn);
if (fOut)
fftw_free(fOut);
//as if (fPhCorrectedReFT)
//as delete fPhCorrectedReFT;
}
//--------------------------------------------------------------------------
@@ -704,23 +636,7 @@ void PFourier::Transform(UInt_t apodizationTag)
PrepareFFTwInputData(apodizationTag);
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
}
fftw_execute(fFFTwPlan);
// correct the phase for tstart != 0.0
// find the first bin >= fStartTime
@@ -733,42 +649,12 @@ void PFourier::Transform(UInt_t apodizationTag)
}
Double_t phase, re, 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
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;
}
}
@@ -798,7 +684,11 @@ void PFourier::SetUseFFTW(const Bool_t flag)
*/
Double_t PFourier::GetMaxFreq()
{
UInt_t noOfFourierBins = fNoOfBins/2+1;
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
return fResolution*noOfFourierBins;
}
@@ -850,7 +740,11 @@ 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 = fNoOfBins/2+1;
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
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) {
@@ -860,19 +754,9 @@ TH1F* PFourier::GetRealFourier(const Double_t scale)
}
// fill realFourier vector
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
}
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);
}
return realFourier;
}
@@ -1056,7 +940,11 @@ 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 = fNoOfBins/2+1;
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
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) {
@@ -1066,20 +954,11 @@ TH1F* PFourier::GetImaginaryFourier(const Double_t scale)
}
// fill imaginaryFourier vector
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
}
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);
}
return imaginaryFourier;
}
@@ -1131,7 +1010,11 @@ 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 = fNoOfBins/2+1;
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
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) {
@@ -1141,20 +1024,11 @@ TH1F* PFourier::GetPowerFourier(const Double_t scale)
}
// fill powerFourier vector
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
}
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);
}
return pwrFourier;
}
@@ -1208,7 +1082,11 @@ 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 = fNoOfBins/2+1;
UInt_t noOfFourierBins = 0;
if (fNoOfBins % 2 == 0)
noOfFourierBins = fNoOfBins/2;
else
noOfFourierBins = (fNoOfBins+1)/2;
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) {
@@ -1219,31 +1097,18 @@ 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 (re == 0) {
if (im >= 0.0)
if (fOut[i][0] == 0.0) {
if (fOut[i][1] >= 0.0)
value = PI_HALF;
else
value = -PI_HALF;
} else {
value = atan(re/im);
value = atan(fOut[i][1]/fOut[i][0]);
// check sector
if (re < 0.0) {
if (im > 0.0)
if (fOut[i][0] < 0.0) {
if (fOut[i][1] > 0.0)
value = PI + value;
else
value = PI - value;
@@ -1298,42 +1163,28 @@ 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 = 1;
if (ival > 0) { // start time > 0
UInt_t start = 0;
if (ival >= 0) {
start = static_cast<UInt_t>(ival);
}
Double_t mean = 0.0;
if (fDCCorrected) {
for (UInt_t i=start; i<start+fNoOfData; i++) {
mean += fData->GetBinContent(static_cast<Int_t>(i));
for (UInt_t i=0; i<fNoOfData; i++) {
mean += fData->GetBinContent(static_cast<Int_t>(i+start));
}
mean /= static_cast<Double_t>(fNoOfData);
}
}
// 2nd fill fIn
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
}
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;
}
// 3rd apodize data (if wished)
@@ -1374,9 +1225,6 @@ 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 };
@@ -1417,12 +1265,6 @@ 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));
}
if (fUseFFTW) {
fIn[i][0] *= q;
} else {
#ifdef HAVE_DKS
fInDKS[i] *= q;
#endif
}
fIn[i][0] *= q;
}
}

View File

@@ -137,18 +137,6 @@ 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;
}

View File

@@ -3973,6 +3973,7 @@ Bool_t PMsrHandler::HandleRunEntry(PMsrLines &lines)
}
}
// xy-data -----------------------------------------------
if (line.BeginsWith("xy-data", TString::kIgnoreCase)) {
@@ -6449,14 +6450,6 @@ 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();
@@ -6859,359 +6852,6 @@ 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)
//--------------------------------------------------------------------------

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;
}
//--------------------------------------------------------------------------

View File

@@ -141,8 +141,6 @@ PMusrCanvas::PMusrCanvas()
{
fTimeout = 0;
fStartWithFourier = false;
fUseDKS = false;
fScaleN0AndBkg = true;
fValid = false;
fAveragedView = false;
@@ -206,10 +204,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, const Bool_t useDKS) :
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg),
fUseDKS(useDKS), fBatchMode(batch), fPlotNumber(number)
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)
{
fTimeout = 0;
fAveragedView = false;
@@ -274,10 +272,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, const Bool_t useDKS) :
fTheoAsData(theoAsData), fStartWithFourier(fourier), fStartWithAvg(avg), fUseDKS(useDKS),
fBatchMode(batch), fPlotNumber(number), fFourier(fourierDefault),
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),
fMarkerList(markerList), fColorList(colorList)
{
fTimeout = 0;
@@ -3392,17 +3390,12 @@ 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, useFFTW);
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, fFourier.fFourierPower);
} else {
Int_t powerPad = fFourier.fFourierPower+5; // +5 means 8 times more points on theo (+3) + 4 times more points in fourier (+2)
#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);
fourierTheory = new PFourier(fData[i].theory, fFourier.fUnits, startTime, endTime, fFourier.fDCCorrected, powerPad);
}
if (!fourierTheory->IsValid()) {
std::cerr << std::endl << ">> PMusrCanvas::HandleFourier(): **SEVERE ERROR** couldn't invoke PFourier to calculate the Fourier theory ..." << std::endl;

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];
// 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];
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];
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))
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;
}
// 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];
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) && (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))
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;
}
// 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];
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;
}
}
#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

View File

@@ -498,7 +498,6 @@ 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
@@ -528,6 +527,7 @@ Double_t PRunListCollection::GetSingleRunChisqExpected(const std::vector<Double_
}
}
// return the chisq of the single run
switch (type) {
case PRUN_SINGLE_HISTO:
@@ -548,6 +548,9 @@ 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;
}
@@ -883,17 +886,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();
}
// 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++;
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++;
}
}
// return the chisq of the single run
@@ -1391,305 +1394,3 @@ 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();
}

View File

@@ -291,10 +291,6 @@ 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;
}
//--------------------------------------------------------------------------
@@ -354,8 +350,6 @@ 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;
@@ -469,11 +463,6 @@ 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;
@@ -951,8 +940,6 @@ 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;

View File

@@ -366,42 +366,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();
#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;
}
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;
}
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;

View File

@@ -45,6 +45,7 @@
#define SEED 0
#define STATEFILE NULL
//-----------------------------------------------------------------------------
std::vector<double> TPointPWaveGapIntegralCuhre::fPar;
@@ -223,6 +224,7 @@ 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.
*
@@ -252,6 +254,7 @@ 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.
@@ -273,8 +276,11 @@ int TDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TCosSqDWaveGapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -305,6 +311,7 @@ double TCosSqDWaveGapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -325,8 +332,11 @@ int TCosSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TSinSqDWaveGapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -357,6 +367,7 @@ double TSinSqDWaveGapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -377,8 +388,11 @@ int TSinSqDWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TAnSWaveGapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -409,6 +423,7 @@ double TAnSWaveGapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -429,8 +444,11 @@ int TAnSWaveGapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TAnSWaveGapIntegralDivonne::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Divonne interface
*
@@ -469,6 +487,7 @@ double TAnSWaveGapIntegralDivonne::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Divonne---actual implementation of the function
*
@@ -489,8 +508,11 @@ int TAnSWaveGapIntegralDivonne::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TAnSWaveGapIntegralSuave::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Suave interface
*
@@ -523,6 +545,7 @@ double TAnSWaveGapIntegralSuave::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Suave---actual implementation of the function
*
@@ -543,8 +566,11 @@ int TAnSWaveGapIntegralSuave::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TNonMonDWave1GapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -575,6 +601,7 @@ double TNonMonDWave1GapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*
@@ -595,8 +622,11 @@ int TNonMonDWave1GapIntegralCuhre::Integrand(const int *ndim, const double x[],
return 0;
}
//-----------------------------------------------------------------------------
std::vector<double> TNonMonDWave2GapIntegralCuhre::fPar;
//-----------------------------------------------------------------------------
/**
* <p>Integrate the function using the Cuhre interface
*
@@ -627,6 +657,7 @@ double TNonMonDWave2GapIntegralCuhre::IntegrateFunc()
return integral[0];
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value for the use with Cuhre---actual implementation of the function
*

View File

@@ -48,6 +48,7 @@
#include <vector>
#include <memory>
//-----------------------------------------------------------------------------
/**
* @class T2Integrator
* @brief Alternative base class for 1D integrations using the GNU Scientific Library integrator.
@@ -70,6 +71,7 @@ class T2Integrator {
static double FuncAtXgsl(double, void *);
};
//-----------------------------------------------------------------------------
/**
* <p>Method for passing the integrand function value to the integrator.
*
@@ -85,6 +87,7 @@ 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
*
@@ -107,20 +110,7 @@ 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.
@@ -146,6 +136,7 @@ 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
@@ -154,6 +145,7 @@ 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.
@@ -163,6 +155,7 @@ inline TIntegrator::~TIntegrator(){
fFunc=0;
}
//-----------------------------------------------------------------------------
/**
* <p>Method for passing the integrand function value to the integrator.
*
@@ -177,6 +170,7 @@ inline double TIntegrator::FuncAtXgsl(double x, void *obj)
return ((TIntegrator*)obj)->FuncAtX(x);
}
//-----------------------------------------------------------------------------
/**
* <p>Calculate the integral of the function between the given boundaries
*
@@ -192,6 +186,7 @@ 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.
@@ -218,6 +213,7 @@ 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
@@ -226,6 +222,7 @@ 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.
@@ -235,6 +232,7 @@ inline TMCIntegrator::~TMCIntegrator(){
fFunc=0;
}
//-----------------------------------------------------------------------------
/**
* <p>Method for passing the integrand function value to the integrator.
*
@@ -250,6 +248,7 @@ 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
*
@@ -334,6 +333,7 @@ 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,6 +355,7 @@ 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
@@ -376,6 +377,7 @@ 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
@@ -397,6 +399,7 @@ 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
@@ -418,6 +421,7 @@ 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
@@ -439,6 +443,7 @@ 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
@@ -460,6 +465,7 @@ 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
@@ -481,6 +487,7 @@ class TNonMonDWave2GapIntegralCuhre {
unsigned int fNDim; ///< dimension of the integral (2)
};
//-----------------------------------------------------------------------------
/**
* @class T2DTest
* @brief Test class for the 2D Monte-Carlo integration.
@@ -494,6 +501,7 @@ 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
*
@@ -587,6 +595,7 @@ class TDWaveGapIntegral : public TMCIntegrator {
double FuncAtX(double *) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function
*
@@ -602,6 +611,7 @@ 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
@@ -617,6 +627,7 @@ class TAnSWaveGapIntegral : public TMCIntegrator {
double FuncAtX(double *) const; ///< Calculate integrand at point x
};
//-----------------------------------------------------------------------------
/**
* <p>Calculate the function value---actual implementation of the function
*
@@ -632,6 +643,7 @@ 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).
@@ -647,6 +659,7 @@ 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)
*
@@ -667,6 +680,7 @@ 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).
@@ -682,6 +696,7 @@ 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)
*
@@ -695,6 +710,7 @@ 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".
@@ -712,6 +728,7 @@ 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
*
@@ -728,6 +745,7 @@ 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
@@ -742,6 +760,7 @@ 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)
*
@@ -755,6 +774,7 @@ 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.
@@ -770,6 +790,7 @@ 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
*
@@ -787,6 +808,7 @@ 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.
@@ -802,6 +824,7 @@ 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
*

View File

@@ -6,6 +6,7 @@ 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})
@@ -13,7 +14,7 @@ root_generate_dictionary(
PDepthProfileDict
PDepthProfile.h
OPTIONS
-I${FFTW3_INCLUDE_DIR}
-I${FFTW3_INCLUDE}
-I${MUSRFIT_INC}
-I${DEPTH_PROFILE_INC}
-inlineInputHeader
@@ -45,7 +46,7 @@ set_target_properties(PDepthProfile
#--- make sure that the include directory is found ----------------------------
target_include_directories(
PDepthProfile BEFORE PRIVATE
$<BUILD_INTERFACE:${FFTW3_INCLUDE_DIR}>
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
$<BUILD_INTERFACE:${MUSRFIT_INC}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
)

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -54,7 +54,6 @@ 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}>
)

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -1,4 +1,4 @@
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -1,4 +1,4 @@
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -66,7 +66,7 @@ class SExpRlx : public PUserFcnBase {
public:
// default constructor and destructor
SExpRlx(){sexp1.SetNpx(1000); sexp2.SetNpx(1000);}
SExpRlx(){}
~SExpRlx(){}
// function operator

View File

@@ -29,7 +29,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#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 //__CLING__
#endif //__CINT__

View File

@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#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 //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

View File

@@ -1,912 +0,0 @@
# 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:

View File

@@ -1,912 +0,0 @@
# 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:

View File

@@ -1,12 +0,0 @@
# 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

View File

@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#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 //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

View File

@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
@@ -35,6 +35,6 @@
#pragma link C++ class TSkewedGss+;
#endif //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

View File

@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#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 //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

View File

@@ -41,7 +41,7 @@ add_library(GapIntegrals SHARED
#--- set target properties, e.g. version --------------------------------------
set_target_properties(GapIntegrals
PROPERTIES
VERSION "1.0.0"
VERSION "1.1.0"
)
#--- make sure that the include directory is found ----------------------------

View File

@@ -28,7 +28,7 @@
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#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 //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

View File

@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
@@ -35,6 +35,6 @@
#pragma link C++ class PGbGLF+;
#endif //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

View File

@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#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 //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -27,7 +27,7 @@
***************************************************************************/
// root dictionary stuff --------------------------------------------------
#ifdef __CLING__
#ifdef __CINT__
#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 //__CLING__
#endif //__CINT__
// root dictionary stuff --------------------------------------------------

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 "0.9.0")
set(PNEXUS_VERSION "1.0.0")
set(PNEXUS_LIBRARY_NAME "PNeXus")
configure_file("PNeXus.pc.in" "PNeXus.pc" @ONLY)
@@ -21,11 +21,10 @@ set_target_properties(PNeXus
)
#--- make sure that the include directory is found ----------------------------
target_include_directories(
PNeXus BEFORE PRIVATE
$<BUILD_INTERFACE:${HDF4_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${HDF5_INCLUDE_DIRS}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
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}>
)
#--- add library dependencies -------------------------------------------------
@@ -34,6 +33,7 @@ if (HAVE_HDF4)
else (HAVE_HDF4)
set(HDF_LIBS ${HDF5_LIBRARIES})
endif (HAVE_HDF4)
message(STATUS "as35> HDF_LIBS: ${HDF_LIBS}")
target_link_libraries(PNeXus PRIVATE ${HDF_LIBS} ${ROOT_LIBRARIES})
#--- install PNeXus solib -----------------------------------------------------

126
src/external/nexus/PyScripts/Install.md vendored Normal file
View File

@@ -0,0 +1,126 @@
# Installation
## Requirements
| Package | Version | Purpose |
|---------|---------|---------|
| Python | ≥ 3.9 | Runtime |
| h5py | ≥ 3.0 | Read HDF5 files (NeXus Version 2) |
| pyhdf | ≥ 0.10 | Read HDF4 files (NeXus Version 1) — optional |
| pdfplumber | ≥ 0.9 | Extract schema from instrument definition PDF (`--pdf` mode) — optional |
---
## Install h5py (required)
h5py provides HDF5 support and is needed for all modern muon NeXus files (Version 2,
written since ~2020).
```bash
pip install h5py
```
Or via your system package manager:
```bash
# Fedora / RHEL
sudo dnf install python3-h5py
# Ubuntu / Debian
sudo apt install python3-h5py
# macOS (Homebrew)
brew install hdf5
pip install h5py
```
---
## Install pyhdf (optional, HDF4 / Version 1 files only)
pyhdf is only needed for reading old HDF4-format files (NeXus Version 1, written
before ~2011 by the MCS software at ISIS). If you only work with modern HDF5 files,
you can skip this step.
pyhdf requires the HDF4 C library to be present on the system.
### Linux
```bash
# Fedora / RHEL
sudo dnf install python3-devel hdf hdf-devel
pip install pyhdf
# Ubuntu / Debian
sudo apt install python3-dev libhdf4-dev
pip install pyhdf
```
> **Note (GCC 14+ / Fedora 40+):** pyhdf may fail to build with a
> `-Wincompatible-pointer-types` error. Work around it with:
> ```bash
> CFLAGS="-Wno-incompatible-pointer-types -Wno-discarded-qualifiers" pip install pyhdf
> ```
### macOS
```bash
brew install hdf4
pip install pyhdf
```
### Windows
Pre-built wheels are available on PyPI for some Python / Windows combinations:
```bash
pip install pyhdf
```
If no wheel is available, consider using a conda environment:
```bash
conda install -c conda-forge pyhdf
```
---
## Install pdfplumber (optional, PDF-driven validation only)
pdfplumber is only needed when you use the `--pdf` option to validate files against
a specific revision of the instrument definition PDF.
```bash
pip install pdfplumber
```
Or via your system package manager (if available):
```bash
# Fedora / RHEL
sudo dnf install python3-pdfplumber # may not be in all repos
# Ubuntu / Debian
sudo apt install python3-pdfplumber # may not be in all repos
# macOS (Homebrew)
pip install pdfplumber
```
---
## Verify the installation
```bash
python3 -c "import h5py; print('h5py', h5py.__version__)"
python3 -c "import pyhdf; print('pyhdf ok')" # optional — HDF4 support
python3 -c "import pdfplumber; print('pdfplumber ok')" # optional — PDF-driven mode
```
---
## No installation needed
The validator is a single self-contained script — no build step, no package
installation of the script itself is required. Simply place
`nexus_muon_validator.py` anywhere on your system and run it with Python.

223
src/external/nexus/PyScripts/Usage.md vendored Normal file
View File

@@ -0,0 +1,223 @@
# Usage — nexus_muon_validator.py
Validates muon NeXus HDF4/5 files against the ISIS Muon Instrument Definitions
(Version 1 and Version 2 / *muonTD*).
Two validation modes are available:
- **Hardcoded mode** (default) — built-in rules based on the 2026 rev 11 spec.
No extra dependencies beyond `h5py`.
- **PDF-driven mode** (`--pdf`) — rules are extracted live from a
`nexus_instrument_definitions_*.pdf` that you supply. Requires `pdfplumber`.
Reference document:
*NeXus Instrument Definitions for Muon Data*, S. Cottrell, 21 January 2026
(`nexus_instrument_definitions_for_muon_data_2026_rev11.pdf`)
---
## Basic invocation
```bash
python3 nexus_muon_validator.py <file.nxs> [<file2.nxs> ...]
```
Validate one or more files in a single call:
```bash
python3 nexus_muon_validator.py run001.nxs run002.nxs run003.nxs
```
---
## Command-line options
| Option | Description |
|--------|-------------|
| `--pdf <def.pdf>` | Parse schema from a NeXus instrument definition PDF and validate against it |
| `--list-schema` | Print the schema extracted from `--pdf` and exit (no files needed) |
| `-v`, `--verbose` | Also show INFO-level findings (optional fields, format info) |
| `--errors-only` | Show only ERROR-level issues; suppress warnings |
| `-h`, `--help` | Show built-in help and exit |
---
## Severity levels
| Level | Meaning |
|---------|---------|
| `ERROR` | A field required by the specification is missing or unreadable. |
| `WARNING` | A field has an unexpected value, a legacy name, or a shape inconsistency. |
| `INFO` | An optional field recommended by the specification is absent (shown only with `-v`). |
---
## Exit codes
| Code | Meaning |
|------|---------|
| `0` | Validation passed — no ERRORs found |
| `1` | At least one ERROR was reported |
| `2` | File could not be opened or is not a recognised NeXus format |
---
## Examples
**Validate a single file (errors and warnings only):**
```bash
python3 nexus_muon_validator.py EMU00139040.nxs
```
**Validate a whole directory of runs:**
```bash
python3 nexus_muon_validator.py /data/musr/2025/*.nxs
```
**Show full detail including optional fields:**
```bash
python3 nexus_muon_validator.py -v EMU00139040.nxs
```
**Show only hard errors (useful in scripts):**
```bash
python3 nexus_muon_validator.py --errors-only EMU00139040.nxs
echo "Exit code: $?"
```
**Use in a shell script with exit-code checking:**
```bash
#!/bin/bash
python3 nexus_muon_validator.py --errors-only "$1"
if [ $? -ne 0 ]; then
echo "Validation failed for $1"
exit 1
fi
```
**Validate against a specific revision of the instrument definition PDF:**
```bash
python3 nexus_muon_validator.py \
--pdf nexus_instrument_definitions_for_muon_data_2026_rev11.pdf \
EMU00139040.nxs
```
**Inspect the schema extracted from a PDF (no files needed):**
```bash
python3 nexus_muon_validator.py \
--pdf nexus_instrument_definitions_for_muon_data_2026_rev11.pdf \
--list-schema
```
Example `--list-schema` output:
```
Parsed schema from: nexus_instrument_definitions_for_muon_data_2026_rev11.pdf …
→ 35 NX classes found (42 version entries)
NXdata v1 required=0 optional=8 attrs=18
NXdata v2 required=2 optional=6 attrs=9
NXdetector v1 required=0 optional=4 attrs=4
NXdetector v2 required=4 optional=28 attrs=34
NXentry v1 required=0 optional=18 attrs=1
NXentry v2 required=11 optional=18 attrs=9
...
```
---
## What is checked
### File format
- Detects HDF5 (via `h5py`) or HDF4 (via `pyhdf`) automatically.
- HDF4 files are Version 1 by definition; HDF5 files may be Version 1 or 2.
- Reports an error if the format is unrecognised or the file cannot be opened.
### Version detection
The instrument definition version is detected automatically:
| Condition | Detected version |
|-----------|-----------------|
| HDF4 file | **Version 1** (always) |
| HDF5: entry `definition` = `muonTD` or `pulsedTD`, or `IDF_version` = 2 | **Version 2** |
| HDF5: entry group named `run` (NXentry), no `definition` field | **Version 1** |
### Version 1 checks (HDF4 or HDF5 `NXfile` / `NXentry`)
Covers the original muon instrument definition (MCS/RAL, 2001).
- Root attribute: `@NeXus_version` (WARNING if absent)
- NXentry (`run`): `IDF_version`, `program_name`, `number`, `title`, `notes`,
`analysis`, `lab`, `beamline`, `start_time`, `stop_time`, `switching_states`
- NXuser: `name`, `experiment_number`
- NXsample: `temperature` (+`@units`), `magnetic_field` (+`@units`)
- NXinstrument: `name`
- NXdetector: `number`; optional `deadtimes` (+`@units`, `@available`),
`angles` (+`@coordinate_system`, `@available`)
- NXcollimator: `type`
- NXbeam: `total_counts` (+`@units`)
- NXdata (`histogram_data_1`): `counts` (+`@units`, `@signal`,
`@t0_bin`, `@first_good_bin`, `@last_good_bin`),
`resolution` (+`@units`), `time_zero` (+`@units`, `@available`),
`raw_time` (+`@axis`, `@primary`, `@units`)
### Version 2 checks (`NXroot` / `muonTD`)
Covers the revised muon instrument definition (ISIS, 20112026).
- Root attributes: `@file_name` (required), `@file_time` (required)
- At least one `raw_data_N` NXentry must be present
- NXentry: `IDF_version` (= 2), `definition` (= `muonTD`), `run_number`,
`title`, `start_time`, `end_time`, `experiment_identifier`
- NXsample: `name`
- NXinstrument: `name`
- NXsource: `name`, `type`, `probe`
- NXdetector (`detector_*`): `counts` (+`@signal`, `@axes`, `@long_name`),
`raw_time` (+`@units`), `spectrum_index`
- NXdata (`detector_*`): `counts` (+`@signal`, `@axes`), `raw_time` (+`@units`)
- NXuser (`user_1`): `name`
### Dimensional consistency checks
- `raw_time` shape must be `(ntc,)` (bin centres) or `(ntc+1,)` (bin boundaries),
where `ntc` is the last dimension of `counts`.
- `corrected_time` shape must be `(ntc,)`.
- `spectrum_index` shape must be `(ns,)`, matching the second-to-last dimension
of `counts`.
### Legacy / transitional handling
The validator distinguishes real errors from known historical deviations:
| Observed value | Expected (spec) | Reported as |
|----------------|-----------------|-------------|
| `pulsedTD` | `muonTD` | WARNING — legacy name, used in files written before rev 8 |
| `time_of_flight` | `raw_time` | WARNING — legacy dataset name used in files before ~2020 |
| `muons` | `positive muons` or `negative muons` | WARNING — non-specific probe label |
| `n/a` for `type` or `probe` in NXsource | specific string | WARNING |
---
## Sample output
```
========================================================================
File: EMU00139040.nxs
========================================================================
[WARNING] /raw_data_1/definition → Value is 'pulsedTD' (legacy name);
current spec (rev≥8) requires 'muonTD'
========================================================================
Summary: 0 error(s), 1 warning(s)
========================================================================
```
With `--verbose`:
```
========================================================================
File: EMU00139040.nxs
========================================================================
[WARNING] /raw_data_1/definition → Value is 'pulsedTD' (legacy name); ...
[INFO ] / → File format: HDF5
[INFO ] / → Detected muon NeXus instrument definition version: 2
[INFO ] /raw_data_1/instrument → Optional group 'beamline' not present
[INFO ] /raw_data_1/sample → Optional dataset 'magnetic_field_state' not present
...
========================================================================
Summary: 0 error(s), 1 warning(s), 13 info(s)
========================================================================
```

File diff suppressed because it is too large Load Diff

View File

@@ -1,69 +0,0 @@
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
src/external/nexus/Usage.md vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,149 @@
# - 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)
execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR)
string(STRIP ${ROOT_BINDIR} ROOT_BINDIR)
execute_process(COMMAND root-config --version OUTPUT_VARIABLE ROOT_VERSION)
string(STRIP ${ROOT_VERSION} ROOT_VERSION)
message("-- Found ROOT: ${ROOT_BINDIR} (found version: ${ROOT_VERSION})")
#---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})

View File

@@ -0,0 +1,7 @@
/* 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@"

View File

@@ -0,0 +1,155 @@
# 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>

View File

@@ -0,0 +1,35 @@
#!/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"

View File

@@ -0,0 +1,447 @@
/***************************************************************************
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;
}

View File

@@ -0,0 +1,119 @@
# - 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)
execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR)
string(STRIP ${ROOT_BINDIR} ROOT_BINDIR)
execute_process(COMMAND root-config --version OUTPUT_VARIABLE ROOT_VERSION)
string(STRIP ${ROOT_VERSION} ROOT_VERSION)
message("-- Found ROOT: ${ROOT_BINDIR} (found version: ${ROOT_VERSION})")
#---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})

View File

@@ -0,0 +1,5 @@
// config.h
#define PACKAGE_VERSION "@PROJECT_VERSION@"
#define BUILD_TYPE "@CMAKE_BUILD_TYPE@"

View File

@@ -0,0 +1,8 @@
#ifndef GIT_VERSION_H
#define GIT_VERSION_H
#define GIT_BRANCH "@GIT_BRANCH@"
#define GIT_CURRENT_SHA1 @GIT_CURRENT_SHA1@
#endif // GIT_VERSION_H

View File

@@ -0,0 +1,55 @@
# 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

View File

@@ -0,0 +1,27 @@
#!/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

View File

@@ -0,0 +1,572 @@
/***************************************************************************
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.

View File

@@ -32,8 +32,6 @@
#include <memory>
#include "TString.h"
#include "Minuit2/MnUserParameters.h"
#include "Minuit2/FunctionMinimum.h"
@@ -41,7 +39,6 @@
#include "PMsrHandler.h"
#include "PRunListCollection.h"
#include "PFitterFcn.h"
#include "PFitterFcnDKS.h"
//-------------------------------------------------------------
/**
@@ -295,8 +292,6 @@ 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
@@ -317,7 +312,6 @@ 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
@@ -586,7 +580,6 @@ class PFitter
* @return Rounded parameter values
*/
PDoubleVector ParamRound(const PDoubleVector &par, const PDoubleVector &err, Bool_t &ok);
std::string GetCPUInfo();
};
#endif // _PFITTER_H_

View File

@@ -61,7 +61,6 @@
*
* @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
{

View File

@@ -1,85 +0,0 @@
/***************************************************************************
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_

View File

@@ -32,16 +32,7 @@
#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>
@@ -222,8 +213,7 @@ 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 useFFTW = true);
Bool_t dcCorrected = false, UInt_t zeroPaddingPower = 0);
virtual ~PFourier();
@@ -235,9 +225,7 @@ class PFourier
*
* @param apodizationTag Apodization strength (0/1=none, 2=weak, 3=medium, 4=strong)
*/
virtual void Transform(UInt_t apodizationTag = F_APODIZATION_NONE);
virtual void SetUseFFTW(const Bool_t flag);
virtual void Transform(UInt_t apodizationTag = 0);
/// Returns the original data histogram title
/// @return Title string
@@ -313,14 +301,12 @@ 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
@@ -333,18 +319,11 @@ 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
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
//as PFTPhaseCorrection *fPhCorrectedReFT;
virtual void PrepareFFTwInputData(UInt_t apodizationTag);
virtual void ApodizeData(Int_t apodizationTag);

View File

@@ -27,7 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifdef __CLING__
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;

View File

@@ -30,7 +30,6 @@
#ifndef _PMSRHANDLER_H_
#define _PMSRHANDLER_H_
#include <string>
#include <memory>
#include <sstream>
#include <string>
@@ -374,10 +373,6 @@ 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
@@ -403,8 +398,6 @@ 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
@@ -473,8 +466,6 @@ 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_

View File

@@ -348,13 +348,6 @@
*/
#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.
@@ -930,44 +923,44 @@ class PRawRunData {
PNonMusrRawRunData fDataNonMusr; ///< keeps all ascii- or db-file info in case of nonMusr fit
private:
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
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
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.
};
//-------------------------------------------------------------
@@ -1229,7 +1222,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)
@@ -1385,7 +1378,6 @@ 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)
};
//-------------------------------------------------------------

View File

@@ -290,8 +290,7 @@ 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 useDKS=false);
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false);
//----------------------------------------------------------------------
/**
@@ -315,8 +314,7 @@ 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 useDKS=false);
const Bool_t fourier=false, const Bool_t avg=false, const Bool_t theoAsData=false);
/// Destructor - cleans up all histograms, graphs, and ROOT objects
virtual ~PMusrCanvas();
@@ -360,7 +358,6 @@ 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

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