636 Commits
v1.9.4 ... dks6

Author SHA1 Message Date
5657fa1f2b adopted cmake to newest DKS version. 2025-06-10 14:44:48 +02:00
28054377f7 changed theory functionc abbriviation 'if' to 'ifld'. 2025-06-10 14:37:43 +02:00
c66af64e96 updated of the offline docu. 2025-06-10 14:36:50 +02:00
ecaf45b4d0 increase libPMusr version to 1.5.0. 2025-06-10 14:34:04 +02:00
2bf7ea1084 new version 1.9.9. Adopted ChangeLog and CMakeLists.txt. 2025-06-10 14:33:50 +02:00
e891f0489a 1st full Gauss/Lorentz LF. Still room for optimization, and further testing. 2025-06-10 14:33:37 +02:00
982181e95a add new functions to musredit select. 2025-06-10 14:33:14 +02:00
ea776016b4 add simple F-mu-F to the standard theory functions. 2025-06-10 14:33:00 +02:00
7a923d2f01 start adding more standard theory functions. Not all ready yet. 2025-06-10 14:32:45 +02:00
072c0b63bc create src dir if not present. Needed for git-revision.h 2025-06-03 12:59:40 +02:00
c745ee769d more docu. 2025-06-03 12:07:00 +02:00
1192b6b452 stripped CMakeLists.txt to the bare minimum. 2025-06-03 12:06:50 +02:00
7e3eda6699 add necessary docu for the Gaussian Lorentzian approach. 2025-06-03 12:06:41 +02:00
60aeab2239 changed the integral approximation approach for Gaussian/Lorentzian. 2025-06-03 12:06:30 +02:00
8135035899 added ZF, LF geometry, dynamic approximation width/hopp << 1. 2025-06-03 12:06:18 +02:00
f0337afee6 improved GL integration. 2025-06-03 12:06:08 +02:00
e48a4c0081 simplify git-revision.h generation. 2025-06-03 12:05:55 +02:00
8f7f90c293 added missing MACOSX_BUNDLE_GUI_IDENTIFIER for mupp. 2025-06-03 12:05:44 +02:00
7b3e6202bd allow to define Tmax from the cmd line. 2025-06-03 12:05:35 +02:00
93b414f96d add missing header. 2025-06-03 12:05:22 +02:00
71622533d3 first LGKT_LF. Might need to slightly improve Simpson. 2025-06-03 12:05:13 +02:00
2454e01885 proper class for GKT LF. 2025-06-03 11:27:23 +02:00
927cc58b96 add LF Gaussian/Lorentzian testing code. 2025-06-03 11:27:12 +02:00
7fd82353ac start populating nfs4 path rather than afs in the musrfit_startup.xml. 2025-06-03 11:26:24 +02:00
eb064232a9 needed to add an additional header (stdbool.h, libCuba) to make clang happy. 2025-05-03 15:19:16 +02:00
58362084d5 comment outdated typedef in libCuba. 2025-05-03 15:19:04 +02:00
c86b313975 slight improvement on mud.h needed that it doesn't crash on macos15.4 m3pro. 2025-05-03 15:18:54 +02:00
44d3d1e95d updated mud.h (thanks to Donald Arseneau). Makes modern compiler happy again. 2025-05-03 15:18:43 +02:00
dcbde4f7bf add skeleton for MusrRoot which will handle TDirectoryFile rather than TFolder. 2025-05-03 15:18:30 +02:00
1ce5cf408b start implementing TDirectoryFile instead of TFolder, since TFolder is depricated. First I added the necessary parts on the validator. The read/write are still missing. 2025-05-03 15:17:30 +02:00
4d4fb66f27 switched from raw to QScopedPointer pointer in mupp.cpp. 2025-04-02 13:43:06 +02:00
7be188c628 back ported some qt6 recent file handling. 2025-03-31 11:13:27 +02:00
a895903a58 improved recent file handling for macos. 2025-03-31 11:13:13 +02:00
7556a2e243 slight improvement in handling of the recent msr-files. 2025-03-31 11:12:57 +02:00
79255750ce updated the icon switching by adding the missing View2Dat. 2025-03-31 11:12:44 +02:00
444e75ea06 fixed typo and added necessary update for the theme flags. 2025-03-31 11:12:32 +02:00
6c82e88789 improved dark theme handling on mupp for qt5. 2025-03-31 11:12:09 +02:00
71de742840 improved dark theme handling on mupp for qt6. 2025-03-31 11:11:57 +02:00
1eff68886a activate the status bar. 2025-03-31 11:11:37 +02:00
6b43f51631 add a user interface option to export data from a msr-file view (single- or multiple files) - qt6. 2025-03-25 07:57:37 +01:00
bccd069367 add a user interface option to export data from a msr-file view (single- or multiple files). 2025-03-25 07:57:25 +01:00
aa2f2756a4 add necessary increment for unique cropped name for PSI-BIN. 2025-03-19 16:46:44 +01:00
129e4c10dd make sure that for PSI-BIN export the 4 char detector names are unique. 2025-03-19 12:21:36 +01:00
bf75b5ef14 add title to PRawRunDataSet. 2025-03-19 12:21:24 +01:00
c0b1071a27 read 'Sample Orientation' from ROOT file, since it might be needed by any2many. 2025-03-19 12:21:12 +01:00
5b9a66758b make sure that the 'selected' object is present. 2025-02-25 16:15:53 +01:00
d65b04e855 this is a workaround which should prevent that the key event is executed if a text/latex is written into the canvas. 2025-02-25 16:15:40 +01:00
688c319e6f fix of a copy/paste error. 2025-02-17 08:18:12 +01:00
f3d7b9c7ff header of exported data adopted for easier read in with pandas. 2025-02-17 08:17:58 +01:00
44821cb8cd updated the copyright info. 2025-01-30 12:00:49 +01:00
86b5080dee proper handling of comments and descriptions in the RUN block. 2025-01-29 08:17:51 +01:00
6a32ba5766 add switch to enable/disable HDF4 support for NeXus. 2025-01-29 08:17:30 +01:00
c6fda693a3 add a new tag PMUSR_UNSUPPORTED_FEATURE 2025-01-28 12:54:23 +01:00
258f248e99 make sure that 'ASCII', 'DAT', and 'DB' is rejected from musrFT. 2025-01-28 12:52:41 +01:00
8dc871e082 path-run-name in RUN block of the msr-file can now handle spaces. 2025-01-20 16:10:25 +01:00
bfade6f4b8 Explicit passing of MnStrategy during minimizer initialization
This patch fixes compilation errors that arise with recent ROOT versions (e.g., 6.34.02),
which require a ROOT::Minuit2::MnStrategy object to be passed when initializing the
ROOT::Minuit2::MnX (X = Migrad, Simplex, Minimize) minimizers (i.e., instead of the integer
representing the "strategy").
2025-01-10 11:19:25 +01:00
df0c5ec545 slightly re-ordered the default files for mupp in the open dialog. 2024-12-16 07:42:14 +01:00
196135fab5 changed default ROOT color kGreen to kGreen+2. 2024-12-14 15:23:58 +01:00
bb28e7258a adopted for custom button handling qt5. 2024-12-11 14:09:45 +01:00
3e216cb6ea adopted for custom button handling. 2024-12-11 14:09:34 +01:00
32768bfdf4 added missing enum tag. 2024-12-11 14:09:23 +01:00
5d5ebde4c2 make the theme handling in musredit more flexible. At the same time adopted some part to more modern c++. 2024-12-11 14:09:11 +01:00
60e2d25ce8 update of the ChangeLog 2024-12-03 18:21:01 +01:00
4c38ff131f center edit widget for find. This gives a better user experience. 2024-12-02 20:14:23 +01:00
3004823f36 added jump to block feature. 2024-12-02 20:11:54 +01:00
532b6f42ff make sure that for non-muSR data errors are not = 0. Will set it to 1, and issue a warning. This prevents chisq to crash. 2024-10-14 14:38:05 +02:00
6812f68a8f implemented unary operator for metaData in functions. 2024-10-11 16:39:24 +02:00
2f6f3a6874 fixed a bug for out-of-repo build to generate git-info. 2024-10-11 08:25:27 +02:00
9e8f22f629 adopted OpenMP handling for libZFRelaxation. 2024-09-25 09:47:28 +02:00
a96f1b35d7 fixed a bug in the mupp gui refresh of a collection. 2024-09-21 13:10:19 +02:00
432c0bd6ec make sure that the run template number has at least 4 digits before proceeding. 2024-09-21 13:10:08 +02:00
6263e9aba3 fix batch mode averaged output
closes issue #63
2024-09-12 11:02:09 +02:00
e0230196c2 improved dat-file reading for mupp. 2024-08-12 10:34:35 +02:00
01582b5a44 updated the docu. 2024-06-24 09:45:31 +02:00
a6a3d26cd2 added the option to write the content of the MINUIT2.OUTPUT ascii file as yaml. This extends the previous commit from Ryan M.L. McFadden. 2024-06-18 12:56:21 +02:00
05c8625dc1 ignore all files generated from an in-repo build 2024-06-18 12:55:51 +02:00
78eb8653ce write the fit results to an easy-to-read/parse yaml file
This patch adds routines for writing a comprehensive set of fit results (i.e., parameter values, parabolic errors, asymmetric errors, covariances, correlation coefficients, etc.) for an individual `.msr` file to an easy-to-read/parse `.yaml` file.

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

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

```python
import yaml

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

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

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

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

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

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

Conflicts:
	configure.ac
	src/Makefile.am
	src/classes/Makefile.am
	src/external/MuSR_software/Makefile.am
2019-03-08 13:53:36 +01:00
352ce48899 find theme in case default channel fail. This is ugly and eventually needs a better solution. 2019-02-14 09:41:14 +01:00
f6ee484baf Dynamic Search Path for ROOT Dictionary
Added by default the dynamic search path '/usr/local/lib' to ROOT.
This is needed to find the necessary dictionaries for musrfit,
musrview, musrt0. Furthermore, added an option '--show-dynamic-path'
to these programs which allow the user to dump the currently used
dynamic search paths. This is potentially handy for diagnostics.
2019-02-05 10:08:15 +01:00
bc09ff5d8d adopted musredit.pro such that the deprecated automake get things compiled. 2019-01-22 15:01:57 +01:00
94950cb755 ifgk and ifll CUDA/OpenCL-GPU accessible. 2019-01-22 14:05:09 +01:00
fc68aed573 make msr-file comment consistent with the docu (for ifll and ifgk). 2019-01-22 14:04:02 +01:00
8014920903 Docu update
Added information about the not yet documented functions for internal fields with Gaussian/Lorentzian broadening.
2019-01-21 14:48:43 +01:00
55c298630a update version information. 2019-01-21 14:48:23 +01:00
7ace2e7d35 Make so far undocumented functions ifgk and ifll public and at the same time properly normalize them. 2019-01-21 14:48:07 +01:00
64fc455831 Add Default Search Paths via musredit preferences if previously no search paths were present
So far it was not possible to add Default Search Paths to musrfit via musredit if somebody delete all the predefined search paths. This bug is now fixed.
2018-12-17 17:38:40 +01:00
2c65609f84 AddT0 offset bug
Up to now there has been an addT0 offset bug which resulted to the following situation.
Since the offset was wrong by '1', for the first addt0 the t0 of the file was used
instead of the one given in the msr-file. If these t0's are substantially different, the
adding of the runs was quite off, resulting in strong distortions at very early times.
Pant Amba Datt pointed towards this bug which is fixed now.
2018-12-11 14:12:48 +01:00
a5748f0359 Fourier relative phase: bug fix
The reference phase for real Fourier was accidentely counted twice.
2018-11-29 11:00:24 +01:00
91c33fdbd1 musredit help system if neither QWebEngine nor QWebKit is found.
If neither QWebEngine nor QWebKit is found, do not generate an build
error anymore. Instead just show a default window stating that
the help system is not available due to missing Qt web libs.
2018-11-29 08:50:12 +01:00
d874bcfeab BNMR lib installation problems
Adopted the build system for the BNMR libs such that the generated files are found and can be installed. The BNMR lib mantainers (ZS, JK) are responsible for the functionality though.
2018-11-27 12:41:39 +01:00
d2ed54dedf updated docu 2018-11-13 09:20:55 +01:00
cabb957b8a changed example to reference phase in the Fourier block. 2018-11-13 09:20:37 +01:00
1e8b79ec1d set reference phase index in the case of a phase vector 2018-11-13 09:20:14 +01:00
0d917564c5 allow to define the phase parameter lists in the Fourier block with a reference phase parameter. This means all the other phase parameters are then relative to this reference phase parameter. This is often used when analysing LEM data. 2018-11-13 09:19:48 +01:00
35fd671166 fixed wrong include path in the cmake infrastructure. 2018-11-05 10:11:40 +01:00
515bf278d5 make sure that enough relevant digits of the parameters are exported to the db/dat-file. 2018-10-26 14:30:33 +02:00
f28a0153b4 added missing header. 2018-10-24 11:31:19 +02:00
419f0718f3 increased the export precision. This is a quick and dirty fix only. 2018-10-23 16:02:10 +02:00
06ae0a12ea fixed start != t0 phase issue 2018-10-18 13:54:05 +02:00
b9e0812699 update of docu 2018-10-16 08:43:44 +02:00
4004e5e9fd added new Fourier phase feature to this example. 2018-10-15 17:08:43 +02:00
357d46aac4 allow multiple Fourier phase parameters for phase shifted real Fourier. Autophasing still missing. 2018-10-15 16:12:49 +02:00
e9e39bb8a6 get rid of cmake warnings in connection with automoc and autouic 2018-10-11 12:48:13 +02:00
660053c52a make sure that BOOST is found even if installed in any non-standard path.
Conflicts:
	src/CMakeLists.txt
	src/classes/CMakeLists.txt
2018-08-27 15:59:50 +02:00
987713c416 update of the docu. Added the beta-NMR docu written by Jonas Krieger. 2018-08-23 13:03:32 +02:00
db70d474dc added some more necessary paths. 2018-08-17 21:00:00 +02:00
dc437c9f25 fix of an accidentally carried out wrong cleanup. 2018-08-17 16:16:08 +02:00
JAK
927eb75a90 cmake should now also work on MacOS. 2018-08-17 16:04:11 +02:00
JAK
7dd79560d1 Removed class MLRes from libBNMR. It wasn`t implemented. 2018-08-17 16:04:07 +02:00
JAK
a159f573b6 Updated docu in LineProfile.pdf. 2018-08-17 16:01:02 +02:00
JAK
8a7a9b7380 Updated docu in LineProfile.pdf. 2018-08-17 16:01:02 +02:00
JAK
d9c4505e8e The line shape width is now the correct FWHM. 2018-08-17 16:01:02 +02:00
5aa7bec5d6 Added CMake files for libLineProfile. 2018-08-17 16:01:02 +02:00
JAK
266b18ae33 Added libLineProfile and integrated it into automake. 2018-08-17 16:01:02 +02:00
685aca6c9a Speed up of SExpRlx by a factor of ~5 by using static TF1s. Might not be thread save. 2018-08-17 16:00:55 +02:00
57931f0487 Cleaned up libBNMR a bit. 2018-08-17 15:57:16 +02:00
4cd0ec2e7f README edited online with Bitbucket. Proper link to the new documentation. 2018-07-27 20:45:21 +02:00
8e1d3a5b68 README.md edited online with Bitbucket. Proper link to the new documentation. 2018-07-27 20:45:02 +02:00
40191f7b44 allow the exponent for the temperature evolution for lambda to be set. If not given, the two fluid exponent 4 will be chosen. 2018-07-11 13:41:36 +02:00
412754078c switched from QTextEdit to QPlainTextEdit for efficiency reasons. Furthermore it allows to limit the block size. 2018-07-10 16:24:07 +02:00
740d64f6a5 change labels when toggling between scale and absolute value. 2018-07-04 17:05:40 +02:00
7f432cc58e adopted the technical docu, according to the new sphinx user docu.
Conflicts:
	doc/musrfit_dox.cfg
2018-07-04 12:48:17 +02:00
2b64ddb405 adopted docu install to the new sphinx docu system. 2018-07-04 07:53:45 +02:00
1c24cd659d switch the docu system from foswiki to sphinx. 2018-07-03 18:52:00 +02:00
7c9b871792 proper MUSR version set. 2018-07-03 11:03:14 +02:00
10b23b11bb added recent files to mupp. 2018-07-03 09:37:18 +02:00
61b3eafa0b make sure that multiple instances of mupp can run simultaneously. 2018-07-02 18:56:32 +02:00
360d4ec7ae a more coherent error message handling. 2018-07-02 15:17:33 +02:00
c3368baddd adopted to the directory tree. 2018-07-02 15:17:17 +02:00
ca5cd4138a make sure that all runs have the same number of parameters. 2018-07-02 15:17:00 +02:00
feae053bbc added MODULE to root_generate_dictionary in order to get the proper name scheme. 2018-06-28 13:26:40 +02:00
4f249fdebe cmake: added more hint paths for DKS. 2018-06-14 15:23:20 +02:00
206a72075b cmake: on macOS absorb mupp_plot into the mupp.app bundle. 2018-06-12 13:56:08 +02:00
3abe2e7e8c cmake: remove HAVE_FORK since it leads to performance issuses with the cuba lib. 2018-06-12 11:26:45 +02:00
fbd0371fd0 cmake fixed a destination bug on macOS. 2018-06-11 14:52:58 +02:00
b6b12322be added mupp. Currently only build with cmake. 2018-06-11 11:30:15 +02:00
cb742d7c30 adopted to macOS. 2018-06-10 15:55:12 +02:00
8c6946164c added mupp actions to musredit. 2018-06-10 14:30:21 +02:00
da4f08f231 cmake: add the forgotten OpenMP flags and libs. 2018-06-10 14:29:59 +02:00
fbb38028cb cmake: make sure that gcc built-in functions are found. 2018-06-10 14:29:37 +02:00
afd4bdb792 update docu. 2018-06-08 15:56:24 +02:00
86eca8bc86 updated to include cmake. 2018-06-07 11:23:46 +02:00
80094c27fa cmake: summary cosmetics 2018-06-07 11:23:12 +02:00
e16e9f29c2 cmake: added missing include path when generating the dictionary. 2018-06-06 17:43:10 +02:00
575c12596b cmake: cuba needs a -fPIC flag explicitly, otherwise it doesn't link with all compilers. 2018-06-06 17:11:52 +02:00
5617cf2925 cleaned up signed/unsigned int issues. 2018-06-06 16:24:42 +02:00
215faf6e50 cmake: got rid of target_compile_options which are better controlled by the build type. 2018-06-06 13:19:05 +02:00
db1e4dc570 cmake: got rid of target_compile_options which are better controlled by the build type. 2018-06-06 13:13:24 +02:00
1cd25fcd40 cmake: make sure that at least one build type is defined (default: Release) 2018-06-06 13:12:54 +02:00
9f880ee67e fixed a bug when compiling with -DNDEBUG 2018-06-06 13:12:23 +02:00
2b049f03b9 slight performance increase - missing header file. 2018-06-06 13:11:57 +02:00
6da091c96b slight performance increase. 2018-06-06 13:11:31 +02:00
b0d9111039 Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2018-06-06 07:50:16 +02:00
9871f23d7a added DKS environment variable to the process. 2018-06-06 07:49:27 +02:00
2e9edb363b Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2018-06-06 07:26:53 +02:00
d24763f4ad cmake: added optimization and at the same time added the beta-NMR lib. 2018-06-05 20:31:07 +02:00
593978711e cmake: replaced debug info by a real one. 2018-06-05 09:50:01 +02:00
c74644cd57 cmake: added -O2 which gives the performance improvement needed. 2018-06-05 07:52:47 +02:00
74c1e63570 fix include statement. 2018-06-04 15:13:56 +02:00
122db33efc moved hardware info to the place where it is needed. 2018-06-04 14:30:09 +02:00
58148581ba cmake: make sure all DKS related libaries and include paths are properly set. 2018-06-04 11:16:45 +02:00
b2c8b9b72b added missing header files. 2018-06-04 09:29:16 +02:00
fda88a69ad cmake: added missing CMakeFiles.txt 2018-06-04 07:49:39 +02:00
b360129ee3 cmake: added library version information to the targets. 2018-06-02 20:45:04 +02:00
610aab1773 cmake: more features implemented. 2018-05-31 18:22:17 +02:00
aa2cc9ddd2 cmake: more necessary files added. Still a lot of testing needed. 2018-05-31 13:26:36 +02:00
923b3c493f cmake: more work on dks6 2018-05-30 19:07:25 +02:00
78de97f498 start to add cmake support for dks6 branch. 2018-05-30 16:36:31 +02:00
a7edb9d232 added a musrfit cmd line flag which allows to check if NeXus support is enabled. 2018-05-02 14:16:57 +02:00
7e8d4f98a5 prevents issue with root v6-13-2. 2018-04-04 11:55:44 +02:00
14c83dedad (i) when exporting Fourier, and _F is added. (ii) the average flag is now also properly propageted in the batch mode. 2018-03-26 12:52:30 +02:00
6944ad1a8b minor fix of shortcut overload conflict. 2018-03-23 12:57:55 +01:00
4f55fcb0cf prevent confusion of similar parameter names. 2018-01-23 12:36:35 +01:00
e8a12653a6 improved the close canvas mechanism (from the global to the object level) 2017-12-01 08:55:10 +01:00
115e812d25 for PSI-BIN/MDU: fixed wrong last good bin, and added number of events per histo. 2017-11-23 10:11:49 +01:00
61e87fc03b added missing temperature unit. 2017-11-23 09:23:12 +01:00
908ad4af86 for PSI-BIN/MDU: dump all temperature available including the std devs. 2017-11-23 09:01:42 +01:00
1e2fe799c6 fixed crash when msr2data is invoked and no tab is open. 2017-11-17 16:55:13 +01:00
bc7ddcfc6d Changed behaviour for the case where LGB > Histo Size. New: LGB = (Histo Size - 1) together with a warning instead of issuing an error. 2017-11-09 10:37:27 +01:00
70d1a24534 make msr-file reader more robust against leading spaces. 2017-11-08 11:43:49 +01:00
324045f396 make sure that a valid covariance matrix is available after Hesse. 2017-11-02 21:17:49 +01:00
784a951540 since my automake structure is now ready for rpmbuild, the version number is increased. 2017-10-26 15:59:19 +02:00
2c91ab1046 configure slightly extended to deal with rpmbuild. 2017-10-25 13:14:42 +02:00
a2d142e73d check if DOCDIR has not already injected from the command line. 2017-10-24 09:06:50 +02:00
66fd54b8fa add a dyn LF example. 2017-10-06 08:15:17 +02:00
bb13025185 fixed an ugly mistake in the opimization of the non-analytic LF integrals. 2017-10-04 17:00:58 +02:00
56637bf934 move __swap__.msr file to /Users/suter_a/.musrfit. This makes sure that it can be written even when musredit is started from a readonly destination. 2017-10-02 16:46:10 +02:00
c5b1573da0 removed some default directories since it potentially leads to problems. 2017-09-06 15:15:56 +02:00
e6b61ea3fc improved Qt5 checks (Qt5WebKit (old) versus Qt5WebEngine (new)) 2017-09-06 09:11:25 +02:00
b027db1bc9 improved run-path handling in case DKS is not enabled. 2017-08-30 15:50:14 +02:00
2cb68a3495 deal with run-time-path for macOS. 2017-08-30 15:45:12 +02:00
8f86af959c version 1.0.0 -> 1.1.0 2017-08-24 08:31:32 +02:00
05fb2375e0 updated docu including DKS support and up-to-date macOS fink/macport setting up description. 2017-08-24 08:25:39 +02:00
f1b36a83cf re-enabled some variable settings needed for linux OpenCL. 2017-08-21 15:15:38 +02:00
de6275b5cf added DKS to the process variable. This makes sure that the DKS lib is always found. 2017-08-21 14:32:41 +02:00
08d67afb78 prevent double free. 2017-08-21 14:31:16 +02:00
25c7894fe0 fine tuning for OpenCL fallback. 2017-08-21 14:28:12 +02:00
49db148c37 added proper destructor. 2017-08-18 07:58:25 +02:00
b62d315d1f fixed a wrong variable initializer. 2017-08-17 13:55:13 +02:00
c49edda58e proper minimal ROOT version number check. 2017-08-17 13:36:03 +02:00
40337b00ad a first version which handles AMD cards as well. 2017-08-17 13:30:27 +02:00
2d4697c750 fixes a bug in the GPU memory allocation. 2017-08-17 13:29:25 +02:00
d397bf0064 fixed an issue with the month (0/1-problem). 2017-06-09 07:52:24 +02:00
26d78cf482 proper handling for DKS/GPU Fourier transform. 2017-05-31 16:21:53 +02:00
4a1b985506 added the missing DKS Fourier support flag. 2017-05-31 08:51:19 +02:00
bce9326f06 fix logy problem. 2017-05-29 18:02:31 +02:00
2b7a391bbb back-integrate DKS Fourier after DKS upgrade and modularization. Not yet tested other than compilation. 2017-05-29 17:54:57 +02:00
c2e362d406 added boost_system lib. 2017-05-29 17:52:49 +02:00
1729055385 merged from root6. Compiles but has issues with DKS linking yet. 2017-05-15 21:30:42 +02:00
13106a51c7 added root6 features to dks6 2017-02-21 14:47:33 +01:00
6cae76f1c1 fixed a little annoying bug in the LF none-analytic integral estimate. 2017-02-21 11:39:22 +01:00
3237b1f898 add forgotten header-file and include path
Conflicts:
	src/musredit_qt5/musredit.pro
2017-02-09 15:38:07 +01:00
2bf8648d35 Merge branch 'dks6' of https://git.psi.ch/nemu/musrfit into dks6 2017-02-08 12:36:35 +01:00
c5ac242e71 add git revision to the musredit about dialog. 2017-02-08 12:35:03 +01:00
e8f692b42c more changes towards musrfit/DKS/root6. 2017-02-08 11:16:27 +01:00
18d037fdf2 adopted dks to root6 (branch dks6). Not yet tested. 2017-02-07 16:12:49 +01:00
38c4293d58 resolved merge conflicts with master 2016-12-23 14:16:22 +01:00
605502386c Merge branch 'master' into dks 2016-11-08 10:02:33 +01:00
6aea6473ab merge dks to master 2016-08-25 08:40:40 +02:00
8f20d2fd4c musredit: run lists are now properly loaded if containing nS-nE elements. 2016-08-02 13:52:41 +02:00
ac30fd956b merged branch 'master' into 'dks' 2016-04-28 13:42:24 +02:00
ec27baf3a4 added c/const to the GPU ready functions. 2016-04-27 08:37:15 +02:00
bc881f0c75 moved CPU/GPU information collection from PFitter to musrfit. 2016-04-27 08:11:30 +02:00
da2f0a1049 (i) added mu minus. (ii) single histo is now fed with a proper error vector which covers all allowed background options. 2016-04-25 12:20:24 +02:00
319fb45f97 made startTimeBin and endTimeBin class variables. 2016-04-25 12:18:27 +02:00
71fbce110b added the function string mmsetf for DKS. 2016-04-25 12:16:56 +02:00
4dc36ffbae changed name of a function for a more precise self description. Added function to collect to mu minus parameters. 2016-04-25 12:15:36 +02:00
be9498f37d added muon minus specific function: muMinusExpTF/mmsetf 2016-04-25 12:05:42 +02:00
bdd8c16650 added fit type selector for DKS 2016-04-18 17:26:47 +02:00
aedacbcd34 added DKS asymmetry fit support 2016-04-15 16:47:40 +02:00
27eb664686 added missing DKS selector in GetPhaseOptRealFourier 2016-04-14 16:33:19 +02:00
f95a4c9078 added all the muSR specific analytic formulae 2016-04-14 14:53:55 +02:00
7dc9158a09 Merge branch 'master' into dks 2016-04-11 12:23:31 +02:00
1e0e19180f fixed error in sleep ms->s. Clean up left over debug information. 2016-04-11 12:21:47 +02:00
2a041d4878 removed debug information. Added CPU/GPU information to the MINUIT2.OUTPUT file. 2016-04-07 13:06:02 +02:00
6fa7bb5764 first DKS running version. Still a lot of testing needed. Currently only single histogram fitting with a limited number of functions is supported to run on the GPU. 2016-04-06 17:22:58 +02:00
a29b790e04 some more work towards DKS/GPU integration 2016-04-01 17:44:49 +02:00
ae77181f42 add memory handling for DKS/GPU. No fitting possible, yet. 2016-03-31 16:41:46 +02:00
5fb2ce777e some more work towards DKS/GPU support of musrfit 2016-03-10 15:52:48 +01:00
7b292980e5 added the class PFitterFcnDKS which eventually will handle the DKS/GPU binding. Currently it is without real functionality 2016-03-09 16:28:32 +01:00
d9782c55c8 added a theory translator for DKS 2016-03-08 16:23:18 +01:00
d9a35a25bb improved CUDA/DKS checks 2016-03-07 16:41:07 +01:00
b157d01506 merge into master 2016-03-04 13:23:12 +01:00
18564964fa calculate mean starting from fStartTime, if fStartTime > 0. 2015-04-17 10:29:20 +02:00
6ac3cdd798 corrected size for noOfFourierBins, and made switching between FFTW and DKS more coherent 2015-04-14 16:49:33 +02:00
a2601348cf first working FFT including DKS. 2015-04-13 17:21:27 +02:00
a393cb9ec5 fixed wrong Fourier vector size for DKS. 2015-04-08 17:24:24 +02:00
75578f1977 first work to add GPU support via DKS for Fourier. 2015-04-07 16:46:20 +02:00
535 changed files with 23905 additions and 21698 deletions

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
# ignore all files generated from an in-repo build
build/

View File

@ -1,9 +1,10 @@
# - musrfit
# - musrfit --- DKS -----------------------------------------------------------
cmake_minimum_required(VERSION 3.17)
project(musrfit VERSION 1.9.3 LANGUAGES C CXX)
project(musrfit VERSION 1.9.9 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)
@ -71,7 +72,7 @@ find_package(PkgConfig REQUIRED)
find_package(Git REQUIRED)
#--- check for ROOT -----------------------------------------------------------
find_package(ROOT 6.18 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
find_package(ROOT 6.16 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
if (ROOT_mathmore_FOUND)
execute_process(COMMAND root-config --bindir OUTPUT_VARIABLE ROOT_BINDIR)
string(STRIP ${ROOT_BINDIR} ROOT_BINDIR)
@ -117,6 +118,42 @@ if (try_OpenMP)
endif (OpenMP_CXX_FOUND)
endif (try_OpenMP)
#--- check for CUDA and/or OpenCL followed by DKS -----------------------------
if (dks)
find_package(CUDA)
if (CUDA_FOUND)
message (STATUS "CUDA include: ${CUDA_INCLUDE_DIRS}")
message (STATUS "CUDA libs: ${CUDA_TOOLKIT_ROOT_DIR}/lib64")
message (STATUS "CUDA version: ${CUDA_VERSION}")
add_definitions(${DKS_CMAKE_CXX_FLAGS})
endif (CUDA_FOUND)
if (NOT CUDA_FOUND)
message(STATUS "CUDA not found, looking for OpenCL")
find_package(OpenCL)
if (OpenCL_FOUND)
message(STATUS "OpenCL version : ${OpenCL_VERSION_STRING}")
message(STATUS "OpenCL include dir: ${OpenCL_INCLUDE_DIR}")
message(STATUS "OpenCL library dir: ${OpenCL_LIBRARY}")
add_definitions(-DDKS_OPENCL)
endif (OpenCL_FOUND)
endif (NOT CUDA_FOUND)
if (NOT CUDA_FOUND AND NOT OpenCL_FOUND)
message(WARNING ">> Neither CUDA nor OpenCL found which are required for DKS, hence disable DKS support <<")
else (NOT CUDA_FOUND AND NOT OpenCL_FOUND)
find_package(DKS "1.2.0"
HINTS "/usr/local/lib/"
)
endif (NOT CUDA_FOUND AND NOT OpenCL_FOUND)
endif (dks)
if (DKS_FOUND)
message(STATUS "DKS version : ${DKS_VERSION}")
message(STATUS "DKS include dir : ${DKS_INCLUDE_DIR}")
message(STATUS "DKS library : ${DKS_LIBRARY}")
endif (DKS_FOUND)
#--- check for Qt -------------------------------------------------------------
if (qt_based_tools)
# check for any Qt, i.e. AUTO
@ -200,8 +237,10 @@ endif (qt_based_tools)
#--- if NeXus check also for HDF4, HDF5, and MXML -----------------------------
if (nexus)
find_package(HDF5 COMPONENTS CXX REQUIRED )
find_package(HDF5 COMPONENTS CXX REQUIRED)
if (HAVE_HDF4)
find_package(HDF4 REQUIRED)
endif (HAVE_HDF4)
find_package(NEXUS REQUIRED)
add_definitions(-DPNEXUS_ENABLED)
endif (nexus)
@ -222,6 +261,19 @@ else ()
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 ------------------------------------------------
#--- rpath related things -----------------------------------------------------
# use, i.e. don't skip the full RPATH for the build tree
set(CMAKE_SKIP_BUILD_RPATH FALSE)
@ -249,6 +301,8 @@ set(CMAKE_INSTALL_RPATH "${rpath}")
add_subdirectory(src)
#--- write summary of the installation
cmake_host_system_information(RESULT PROCESSOR QUERY PROCESSOR_DESCRIPTION)
message("")
message("|-----------------------------------------------------------------------|")
message("| |")
@ -257,7 +311,8 @@ message("|
message("|-----------------------------------------------------------------------|")
message("")
message(" System: ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} - ${CMAKE_HOST_SYSTEM_VERSION}")
message(" -------")
message(" Processor: ${PROCESSOR} (${CMAKE_SYSTEM_PROCESSOR})")
message(" ----------")
message("")
message(" musrfit Version: ${musrfit_VERSION}")
message(" ----------------")
@ -273,6 +328,7 @@ message(" GSL found in ${GSL_INCLUDE_DIRS}, Version: ${GSL_VERSION}")
message(" BOOST found in ${Boost_INCLUDE_DIRS}, Version: ${Boost_VERSION}")
message(" LibXML2 found in ${LIBXML2_INCLUDE_DIR}, Version: ${LIBXML2_VERSION_STRING}")
message(" ROOT found in ${ROOT_INCLUDE_DIRS}, Version: ${ROOT_VERSION}")
if (OpenMP_FOUND)
if (OpenMP_CXX_VERSION)
message(" OpenMP found Version: ${OpenMP_CXX_VERSION}")
@ -280,10 +336,29 @@ 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("")
if (HAVE_HDF4)
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
else (HAVE_HDF4)
message(" HDF4 not present.")
endif (HAVE_HDF4)
message(" HDF5 found in ${HDF5_INCLUDE_DIRS}, Version: ${HDF5_VERSION}")
message(" NeXus found in ${NEXUS_INCLUDE_DIR}, Version: ${NEXUS_VERSION_STRING}")
endif (nexus)

View File

@ -12,6 +12,37 @@ or
https://bitbucket.org/muonspin/musrfit/commits/all
Release of V1.9.9, 2025/06/08
=============================
add THEORY functions for local Gaussian / global Lorentzian, and a simple F-mu-F function.
Release of V1.9.8, 2025/03/24
=============================
add a user interface option to export data from a msr-file view (single- or multiple files).
Release of V1.9.7, 2025/01/18
=============================
allow spaces in RUN block path-filename
Release of V1.9.6, 2024/12/02
=============================
added jump to block feature in musredit.
Release of V1.9.5, 2024/06/24
=============================
yaml export of ALL fit-parameters, as initiated by R.M.L. McFadden.
Release of V1.9.4, 2024/06/08
=============================
enable OpenMP for macOS.
Release of V1.9.3, 2024/04/19
=============================
@ -200,6 +231,7 @@ NEW 2016-04-28 msr2data gets a new option: paramList which allows to
extract a subset of all the parameters of a collection
of msr-files.
NEW 2016-04-22 Added the theory function muMinusExpTF for mu minus fits
NEW 2016-03-08 added a theory translator for DKS
NEW 2016-02-23 It is now possible to export the averaged data/Fourier
CHANGED 2016-12-18 updated the docu.
CHANGED 2016-12-18 a couple of little improvements in musredit.
@ -207,6 +239,7 @@ CHANGED 2016-08-10 drop NeXus support for Version < 4.4
CHANGED 2016-04-26 start-/endTimeBin are now class members. This reduces
the number of recalculations.
FIXED 2016-08-02 run lists are now properly loaded if containing nS-nE elements.
FIXED 2016-04-14 added missing DKS selector in GetPhaseOptRealFourier.
changes since 0.16.0
===================================

View File

@ -32,6 +32,7 @@ For a more exhaustive user documentation see:
<andreas.suter@psi.ch>
For the beta-NMR related parts, please contact Zaher Salman
For the beta-NMR related parts, please contact
<zaher.salman@psi.ch>

View File

@ -1,30 +0,0 @@
# configure_musrfit_version_file.cmake.in:
set(SRC_DIR "@CMAKE_SOURCE_DIR@")
set(BIN_DIR "@CMAKE_CURRENT_BINARY_DIR@")
# Set variables
set(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
set(MUSRFIT_VERSION "@MUSRFIT_VERSION@")
# Get the current working branch
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch
execute_process(
COMMAND git log -1 --pretty="%h, %ci"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_CURRENT_SHA1
OUTPUT_STRIP_TRAILING_WHITESPACE
)
configure_file(
${SRC_DIR}/cmake/git-revision.h.in
${BIN_DIR}/git-revision.h
@ONLY
)
# EOF

BIN
doc/.DS_Store vendored

Binary file not shown.

BIN
doc/examples/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

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

Binary file not shown.

View File

@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>

View File

@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiC_1300x_52nm_48nm_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>

View File

@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>Si10_2.0_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>

View File

@ -6,6 +6,30 @@
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiO2_70nm2.0_30nm2.2_SiC_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>3000</energy>
<energy>4000</energy>
<energy>5000</energy>
<energy>6000</energy>
<energy>7000</energy>
<energy>8000</energy>
<energy>9000</energy>
<energy>10000</energy>
<energy>11000</energy>
<energy>12000</energy>
<energy>13000</energy>
<energy>14000</energy>
<energy>15000</energy>
<energy>16000</energy>
<energy>17000</energy>
<energy>17000</energy>
<energy>18000</energy>
<energy>19000</energy>
<energy>20000</energy>
<energy>21000</energy>
<energy>22000</energy>
</energy_list>
</trim_sp>
</depthProf>

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2024 by Andreas Suter *
* Copyright (C) 2007-2025 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

@ -8,7 +8,7 @@
***************************************************************************/
/***************************************************************************
* Copyright (C) 2007-2021 by Andreas Suter *
* Copyright (C) 2007-2025 by Andreas Suter *
* andreas.suter@psi.ch *
* *
* This program is free software; you can redistribute it and/or modify *

View File

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

View File

@ -2,106 +2,106 @@ MnSi, FLC68.2, 50 K
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 Rate_1 1.6687 0.0086 none
2 Field_1 73089.883 0.090 none
3 Rate_2 1.968 0.032 none
4 Field_2 72289.02 0.24 none
1 Rate_1 1.6686 -0.0085 0.0086
2 Field_1 73089.887 -0.090 0.090
3 Rate_2 1.967 -0.032 0.032
4 Field_2 72289.02 -0.24 0.24
5 Asym_1 0.2949 0.0030 none
6 Frc_1 0.7316 0.0059 none
7 Phase_1 55.61 0.52 none
8 N0_1 940.35 0.54 none
9 Bkg_1 1.523 0.064 none
5 Asym_1 0.2949 -0.0030 0.0030
6 Frc_1 0.7316 -0.0058 0.0059
7 Phase_1 55.61 -0.52 0.52
8 N0_1 940.36 -0.54 0.54
9 Bkg_1 1.524 -0.064 0.064
10 Asym_2 0.2960 0.0030 none
11 Frc_2 0.7475 0.0059 none
12 Phase_2 30.77 0.50 none
13 N0_2 961.49 0.55 none
14 Bkg_2 1.928 0.065 none
10 Asym_2 0.2960 -0.0030 0.0030
11 Frc_2 0.7475 -0.0058 0.0059
12 Phase_2 30.77 -0.50 0.50
13 N0_2 961.50 -0.55 0.55
14 Bkg_2 1.929 -0.065 0.065
15 Asym_3 0.3002 0.0029 none
16 Frc_3 0.7462 0.0056 none
17 Phase_3 18.03 0.48 none
18 N0_3 1024.28 0.57 none
19 Bkg_3 1.919 0.067 none
15 Asym_3 0.3002 -0.0029 0.0029
16 Frc_3 0.7462 -0.0056 0.0057
17 Phase_3 18.03 -0.48 0.48
18 N0_3 1024.29 -0.57 0.57
19 Bkg_3 1.920 -0.067 0.067
20 Asym_4 0.3088 0.0029 none
21 Frc_4 0.7333 0.0054 none
22 Phase_4 336.94 0.47 none
23 N0_4 1029.36 0.57 none
24 Bkg_4 1.863 0.067 none
20 Asym_4 0.3088 -0.0029 0.0029
21 Frc_4 0.7333 -0.0053 0.0054
22 Phase_4 336.94 -0.48 0.47
23 N0_4 1029.37 -0.57 0.57
24 Bkg_4 1.865 -0.067 0.067
25 Asym_5 0.3094 0.0029 none
26 Frc_5 0.7416 0.0055 none
27 Phase_5 280.32 0.48 none
28 N0_5 1002.69 0.56 none
29 Bkg_5 1.979 0.067 none
25 Asym_5 0.3094 -0.0029 0.0029
26 Frc_5 0.7416 -0.0054 0.0055
27 Phase_5 280.33 -0.48 0.48
28 N0_5 1002.70 -0.56 0.56
29 Bkg_5 1.981 -0.067 0.067
30 Asym_6 0.3153 0.0032 none
31 Frc_6 0.7403 0.0058 none
32 Phase_6 211.07 0.51 none
33 N0_6 853.43 0.52 none
34 Bkg_6 1.656 0.061 none
30 Asym_6 0.3153 -0.0032 0.0032
31 Frc_6 0.7403 -0.0057 0.0058
32 Phase_6 211.07 -0.51 0.51
33 N0_6 853.44 -0.52 0.52
34 Bkg_6 1.658 -0.061 0.061
35 Asym_7 0.3118 0.0032 none
36 Frc_7 0.7378 0.0059 none
37 Phase_7 161.74 0.51 none
38 N0_7 858.76 0.52 none
39 Bkg_7 1.594 0.061 none
35 Asym_7 0.3118 -0.0032 0.0032
36 Frc_7 0.7377 -0.0058 0.0059
37 Phase_7 161.75 -0.51 0.51
38 N0_7 858.77 -0.52 0.52
39 Bkg_7 1.595 -0.061 0.062
40 Asym_8 0.2985 0.0031 none
41 Frc_8 0.7373 0.0061 none
42 Phase_8 133.69 0.53 none
43 N0_8 871.20 0.52 none
44 Bkg_8 1.746 0.062 none
40 Asym_8 0.2985 -0.0031 0.0031
41 Frc_8 0.7373 -0.0060 0.0061
42 Phase_8 133.70 -0.53 0.53
43 N0_8 871.20 -0.52 0.52
44 Bkg_8 1.748 -0.062 0.062
45 Asym_9 0.2874 0.0027 none
46 Frc_9 0.7340 0.0054 none
47 Phase_9 158.63 0.47 none
48 N0_9 1184.29 0.61 none
49 Bkg_9 2.542 0.073 none
45 Asym_9 0.2874 -0.0027 0.0027
46 Frc_9 0.7340 -0.0054 0.0055
47 Phase_9 158.63 -0.47 0.47
48 N0_9 1184.30 -0.61 0.61
49 Bkg_9 2.544 -0.073 0.073
50 Asym_10 0.2846 0.0027 none
51 Frc_10 0.7453 0.0055 none
52 Phase_10 128.05 0.47 none
53 N0_10 1193.66 0.61 none
54 Bkg_10 2.394 0.073 none
50 Asym_10 0.2845 -0.0027 0.0027
51 Frc_10 0.7452 -0.0055 0.0055
52 Phase_10 128.05 -0.47 0.47
53 N0_10 1193.67 -0.61 0.61
54 Bkg_10 2.396 -0.073 0.073
55 Asym_11 0.2877 0.0026 none
56 Frc_11 0.7463 0.0053 none
57 Phase_11 102.43 0.45 none
58 N0_11 1280.00 0.63 none
59 Bkg_11 2.730 0.075 none
55 Asym_11 0.2877 -0.0026 0.0026
56 Frc_11 0.7462 -0.0052 0.0053
57 Phase_11 102.42 -0.45 0.45
58 N0_11 1280.01 -0.63 0.63
59 Bkg_11 2.732 -0.075 0.075
60 Asym_12 0.2919 0.0025 none
61 Frc_12 0.7405 0.0050 none
62 Phase_12 42.97 0.43 none
63 N0_12 1383.96 0.66 none
64 Bkg_12 2.807 0.078 none
60 Asym_12 0.2919 -0.0025 0.0025
61 Frc_12 0.7405 -0.0050 0.0050
62 Phase_12 42.97 -0.43 0.43
63 N0_12 1383.97 -0.66 0.66
64 Bkg_12 2.809 -0.078 0.078
65 Asym_13 0.2903 0.0025 none
66 Frc_13 0.7494 0.0050 none
67 Phase_13 350.74 0.43 none
68 N0_13 1393.01 0.66 none
69 Bkg_13 2.738 0.078 none
65 Asym_13 0.2903 -0.0025 0.0025
66 Frc_13 0.7493 -0.0050 0.0050
67 Phase_13 350.74 -0.43 0.43
68 N0_13 1393.02 -0.66 0.66
69 Bkg_13 2.740 -0.078 0.079
70 Asym_14 0.2968 0.0025 none
71 Frc_14 0.7327 0.0049 none
72 Phase_14 288.56 0.43 none
73 N0_14 1374.46 0.66 none
74 Bkg_14 2.768 0.078 none
70 Asym_14 0.2968 -0.0025 0.0025
71 Frc_14 0.7327 -0.0049 0.0050
72 Phase_14 288.57 -0.43 0.43
73 N0_14 1374.47 -0.66 0.66
74 Bkg_14 2.771 -0.078 0.078
75 Asym_15 0.2799 0.0025 none
76 Frc_15 0.7427 0.0052 none
77 Phase_15 282.56 0.45 none
78 N0_15 1365.97 0.65 none
79 Bkg_15 2.809 0.078 none
75 Asym_15 0.2799 -0.0025 0.0025
76 Frc_15 0.7427 -0.0052 0.0053
77 Phase_15 282.56 -0.45 0.45
78 N0_15 1365.99 -0.66 0.65
79 Bkg_15 2.811 -0.078 0.078
80 Asym_16 0.2771 0.0026 none
81 Frc_16 0.7344 0.0055 none
82 Phase_16 212.46 0.48 none
83 N0_16 1256.94 0.63 none
84 Bkg_16 2.458 0.074 none
80 Asym_16 0.2771 -0.0026 0.0026
81 Frc_16 0.7344 -0.0054 0.0055
82 Phase_16 212.46 -0.48 0.48
83 N0_16 1256.95 -0.63 0.63
84 Bkg_16 2.460 -0.074 0.075
###############################################################
THEORY
@ -257,9 +257,12 @@ t0 20039.0
###############################################################
COMMANDS
#OpenCL-GPU
CUDA
MAX_LIKELIHOOD
PRINT_LEVEL 2
#PRINT_LEVEL 2
MINIMIZE
MINOS
SAVE
###############################################################
@ -278,5 +281,5 @@ phase par(7, 5, 16)
range 7.1 7.5
###############################################################
STATISTIC --- 2018-10-15 15:55:36
maxLH = 1286508.7, NDF = 1246064, maxLH/NDF = 1.032458
STATISTIC --- 2023-11-09 09:38:03
maxLH = 1286509.8, NDF = 1246064, maxLH/NDF = 1.032459

View File

@ -2,23 +2,23 @@ LSCO x=0.02 (224-227), T=12.00 (K), E=5.57 keV, WEW B=~49(G)/8.62(A), Tr=15.02 (
###############################################################
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 AsymT 0.05053 -0.00071 0.00072 0 0.33
1 AsymT 0.05052 -0.00071 0.00072 0 0.33
2 Field 48.298 -0.094 0.095
3 RateT 0.129 -0.010 0.010 0 none
4 AsymL 0 0 none 0 0.33
5 RateL 0 0 none
6 AlphaLR 0.9784 -0.0013 0.0013
7 PhaseL 6.6 -1.6 1.6 -40 40
8 BkgL 6.920 -0.048 0.048
8 BkgL 6.921 -0.048 0.048
9 RelPhaseR 178.8 -1.9 1.9 150 210
10 NormR 419.46 -0.40 0.40
10 NormR 419.47 -0.40 0.40
11 BkgR 8.393 -0.050 0.050
12 AlphaTB 1.1025 -0.0015 0.0015
13 RelPhaseT 269.1 -1.9 1.9 240 300
14 BkgT 7.466 -0.049 0.049
14 BkgT 7.467 -0.049 0.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
17 BkgB 7.092 -0.048 0.047
18 One 1 0 none
19 Zero 0 0 none
@ -96,5 +96,5 @@ range 0 9 -0.15 0.15
view_packing 500
###############################################################
STATISTIC --- 2018-11-13 07:58:56
maxLH = 3971.7, NDF = 4001, maxLH/NDF = 0.992668
STATISTIC --- 2023-10-25 11:01:10
maxLH = 3971.7, NDF = 4001, maxLH/NDF = 0.992678

View File

@ -8,9 +8,9 @@ FITPARAMETER
4 Phase_L 178.95 -0.41 0.41
5 Phase_R 1.75 -0.39 0.39
6 N0_L 1097.9 -1.0 1.0
7 N0_R 1159.7 -1.0 1.0
7 N0_R 1159.8 -1.0 1.0
8 Bkg_L 54.47 -0.20 0.20
9 Bkg_R 46.70 -0.19 0.19
9 Bkg_R 46.71 -0.19 0.19
###############################################################
THEORY
@ -47,6 +47,7 @@ t0 202.0
###############################################################
COMMANDS
CUDA
SCALE_N0_BKG TRUE
MINIMIZE
MINOS
@ -63,11 +64,11 @@ FOURIER
units Gauss # units either 'Gauss', 'Tesla', 'MHz', or 'Mc/s'
fourier_power 12
apodization NONE # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE, PHASE_OPT_REAL
phase 8.5
#range_for_phase_correction 50.0 70.0
range 0.0 200.0
range 0 200
###############################################################
STATISTIC --- 2015-01-05 14:09:47
chisq = 663.9, NDF = 515, chisq/NDF = 1.289169
STATISTIC --- 2024-06-07 15:33:49
chisq = 663.9, NDF = 515, chisq/NDF = 1.289084

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: 28c8d31b3d0d7429fcebb7bd0074bdd3
config: fae482e1a3134e03efb428cbbe21a254
tags: 645f666f9bcd5a90fca523b33c5a78b7

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="22"
height="22"
viewBox="0 0 22.000001 22"
id="svg2"
version="1.1"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
sodipodi:docname="musrview2dat-plain.svg">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow1Sstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Sstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path8245"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#da4453;stroke-width:1pt;stroke-opacity:1;fill:#da4453;fill-opacity:1"
transform="scale(0.2) translate(6,0)" />
</marker>
<marker
inkscape:stockid="Arrow2Mstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow2Mstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path8257"
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#da4453;stroke-opacity:1;fill:#da4453;fill-opacity:1"
d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
transform="scale(0.6) translate(0,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Lend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Lend"
style="overflow:visible;"
inkscape:isstock="true">
<path
id="path8236"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#da4453;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.8) rotate(180) translate(12.5,0)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="38.863636"
inkscape:cx="11"
inkscape:cy="11"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="pt"
inkscape:window-width="2560"
inkscape:window-height="1376"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-grids="true"
showguides="true"
borderlayer="true"
inkscape:showpageshadow="false"
inkscape:document-rotation="0">
<inkscape:grid
type="xygrid"
id="grid5486" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1030.3622)">
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.935414;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 8.471,1031.8299 v 7"
id="path8054"
inkscape:connector-curvature="0" />
<g
id="g16411"
transform="translate(-1.9999996,0)">
<path
inkscape:connector-curvature="0"
id="path8035-5"
d="m 8.5000005,1043.3622 0,8"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:open="true"
d="m 10.000001,1043.8622 a 2.594672,3.5000203 0 0 1 2.594672,3.5 2.594672,3.5000203 0 0 1 -2.594672,3.5"
sodipodi:end="1.5707963"
sodipodi:start="4.712389"
sodipodi:ry="3.5000203"
sodipodi:rx="2.594672"
sodipodi:cy="1047.3622"
sodipodi:cx="10.000001"
sodipodi:type="arc"
id="path16389"
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.99996012;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path16394"
d="m 8,1043.8622 2,0"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:transform-center-y="-3.7031618"
inkscape:transform-center-x="-1.5617682"
inkscape:connector-curvature="0"
id="path16394-8"
d="m 8.0000005,1050.8622 1.9999995,0"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.911555;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 18.500001,1044.3384 v 6.6474"
id="path8054-0-0"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.935;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 16.4165,1043.8617 h 4.166666"
id="path8071-1"
inkscape:connector-curvature="0" />
<g
id="g16558"
transform="matrix(0.8331761,0,0,1,2.2916816,0)">
<path
inkscape:connector-curvature="0"
id="path16442"
d="m 11.002838,1050.8557 2.99716,-6.9869"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.09554851px;stroke-linecap:round;stroke-linejoin:bevel;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path16444"
d="m 13.999998,1043.8688 2.997161,6.9869"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.09554851px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 12,1049.3622 4,0"
id="path16450"
inkscape:connector-curvature="0" />
<path
style="fill:#4d4d4d;fill-opacity:1;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1.0000001,1049.8622 3.0000002,0"
id="path16452-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1.0000001,1041.8622 5.0000001,0"
id="path16452-4-1"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1.0000001,1043.8622 3.0000004,0"
id="path16452-4-7"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1.0000001,1045.8622 2.0000001,0"
id="path16452-4-8"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#4d4d4d;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 1.0000001,1047.8622 3.0000004,0"
id="path16452-4-89"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#da4453;stroke-width:1.00000012;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 12.353554,1040.1551 2,2 2.000001,-2"
id="path16535"
inkscape:connector-curvature="0" />
<g
id="g1261"
transform="translate(-2,-0.0478)">
<path
inkscape:connector-curvature="0"
id="path16442-7"
d="m 8.4971623,1031.91 -2.497162,6.9869"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:bevel;stroke-opacity:1" />
<path
inkscape:connector-curvature="0"
id="path16444-4"
d="M 6.0000003,1038.8969 3.5028374,1031.91"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.935414;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 10.967707,1031.8299 v 7"
id="path8054-6"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.935;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 14,1031.7617 H 11"
id="path8054-6-8"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.935;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 14,1038.8617 H 11"
id="path8054-6-8-7"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.919364;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 14,1034.8617 H 11.0995"
id="path8054-6-8-7-2"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.900712;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 15.908054,1031.7306 1.0766,7.2162"
id="path8054-2"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.900712;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 21,1031.7626 -1.0766,7.2162"
id="path8054-2-7"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.901;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 18.39969,1035.6617 -1.30419,3.3269"
id="path8054-2-7-0"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.901;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 18.4995,1035.6617 1.30419,3.3269"
id="path8054-2-7-0-5"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,22 @@
.. include:: <isogrk1.txt>
.. index:: acknowledgment
.. _acknowledgment:
Acknowledgements
================
**Bastian M. Wojek**
I am very much indebted to BMW for his rigorous testing of ``musrfit``, his many useful suggestions, contributions, and for the
largest part of the user manual of ``musrfit`` which makes it accessible to a broader audience! Many thanks Bastian!
**Uldis Locans**
I am very much indebted to Uldis work on :ref:`DKS <setup-dks>` enabling the GPU support for ``musrfit``. His kind, calm, and
extremely competent way to deal with his projects as well as to deal with the chaos of physicists way to think is admirable. Many thanks Uldis!
**Zaher Salman**
Thanks for his beta-NMR and web-interface contributions to ``musrfit``!
**Robert Scheuermann**
Thanks for his constant contructive input on ``musrfit``!

View File

@ -0,0 +1,8 @@
.. include:: <isogrk1.txt>
.. index:: any2many
any2many - a Universal |mgr|\SR-file-format converter
=====================================================
``any2many`` allows to convert most |mgr|\SR-file-formats from one to the other.
For a detailed description see :ref:`here <any2many>`.

View File

@ -0,0 +1,9 @@
.. index:: bugtracking
.. _bugtracking:
Bugtracking
===========
For reporting bugs or requesting new features and improvements please use
the `bitbucket-repo <https://bitbucket.org/muonspin/musrfit/issues>`_ (preferred)
or send an e-mail to A. Suter at PSI.

View File

@ -0,0 +1,18 @@
.. include:: <isogrk1.txt>
.. index:: cite
.. _cite:
How to Cite ``musrfit``?
========================
Since quite some effort is going into the development and maintenance of the ``musrfit`` package, you should at least acknowledge it in your publication if you have used it to analyze your data. Even better of course is to cite it properly by the reference given beneath
* A.\ Suter, B.M. Wojek, "Musrfit: A Free Platform-Independent Framework for |mgr|\SR Data Analysis", Physics Procedia **30**, 69 (2012). `<http://dx.doi.org/10.1016/j.phpro.2012.04.042>`_
The GPU high speed ``musrfit`` version is utilizing ``DKS``. In case you are using this version, please also add the following citations
* A.\ Adelmann, U. Locans, A. Suter, "The Dynamic Kernel Scheduler—Part 1", Computer Physics Communications **207**, 83 (2016). `<https://doi.org/10.1016/j.cpc.2016.05.013>`_
* U.\ Locans, *et al.*, "Real-time computation of parameter fitting and image reconstruction using graphical processing units", Computer Physics Communications **215**, 71 (2017). `<https://doi.org/10.1016/j.cpc.2017.02.007>`_
* U.\ Locans and A.\ Suter, "Musrfit Real Time Parameter Fitting Using GPUs", JPS Conf. Proc. *21*, 011051 (2018). `<http://dx.doi.org/10.7566/JPSCP.21.011051>`_

View File

@ -0,0 +1,389 @@
.. include:: <isogrk1.txt>
.. index:: file-formats
.. _file-formats:
Short description and references to the supported file-formats
==============================================================
Currently the following |mgr|\SR and non-|mgr|\SR file formats are supported (in alphabetic order):
* ascii (non-|mgr|\SR): :ref:`ASCII file format for non-u\SR <ascii-file-format>`
* db (non-|mgr|\SR): :ref:`DB (triumf) <db-file-format>`
* dat (non-|mgr|\SR): :ref:`DAT: CSV like data file <dat-file-format>`
* mdu (|mgr|\SR): :ref:`MDU file format (PSI) <mdu-file-format>`
* mud (|mgr|\SR): :ref:`MUon Data access file format (TRIUMF) <mud-file-format>`
* musr-root (|mgr|\SR): :ref:`MusrRoot - an Extensible Open File Format for uSR <MusrRoot>`
* nexus (|mgr|\SR): used to read NeXus files from ISIS (HDF4 and HDF5): :ref:`NeXus <nexus-file-format>`
* psi-bin (|mgr|\SR): :ref:`PSI-BIN file format (PSI) <psi-bin-file-format>`
* root (|mgr|\SR): specific version for LEM before 2012 :ref:`LEM ROOT file format<root-file-format>`
* wkm (|mgr|\SR): special ascii file format used in the past by the TU Braunschweig (outdated): :ref:`WKM <wkm-file-format>`
.. index:: ascii-file-format
.. _ascii-file-format:
ASCII file format for non-|mgr|\SR
----------------------------------
This for instance can be used to fit :math:`1/\lambda^2 ~ \mathrm{vs} ~ T` to study gap properties of superconductors.
Details about the gap-intergrals can be found in the memo *GapIntegrals.pdf* which can be found in the source code of musrfit
under <musrfit-home-dir>/src/external/libGapIntegrals.
This primitive file format has the following structure:
Comment lines start with a '#' or '%' character.
The file can start with some header info. The header is optional, as all its tags, but
if present it has the following format:
::
HEADER
TITLE: title
X-AXIS-TITLE: x-axis title
Y-AXIS-TITLE: y-axis title
SETUP: setup
FIELD: field
TEMP: temperature
ENERGY: energy
Field has to be given in (G), temperature in (K) and energy in (keV).
The data are read column like and start with the data tag DATA, followed by the
data columns, i.e.:
::
DATA
x, y [, error y]
where spaces, column, are a tab are possible separations.
If no error in y is present, the weighting in the fit will be equal.
A full example might look like this:
::
# libGapIntegrals-test.dat
# This is a comment
% This as well
HEADER
TITLE: Test superconductor data
X-AXIS-TITLE: T (K)
Y-AXIS-TITLE: #lambda^{-2} (#mum^{-2})
SETUP: H #parallel c
FIELD: 100
TEMP: 0.0
ENERGY: 4200
# here the data will follow
DATA
# x, y, error y
0.0318411, 7.77455, 0.2
0.0629929, 7.9869, 0.15
0.113914, 7.64209, 0.15
0.202492, 7.37699, 0.15
0.302725, 7.70893, 0.12
0.447456, 7.77565, 0.12
0.611685, 7.45768, 0.12
0.813613, 7.19287, 0.12
1.00822, 7.57813, 0.12
1.24793, 7.31343, 0.12
1.50635, 7.16818, 0.12
1.74591, 6.99634, 0.12
1.99795, 6.90414, 0.12
2.25061, 6.41393, 0.12
2.4958, 6.66666, 0.12
2.75514, 5.93766, 0.12
3.00753, 5.61992, 0.12
3.26056, 4.89091, 0.12
3.49414, 4.52005, 0.08
3.75356, 3.73799, 0.08
3.99425, 2.84974, 0.08
4.30518, 1.35139, 0.08
.. index:: db-file-format
.. _db-file-format:
DB file format for non-|mgr|\SR
-------------------------------
The DB file format is an *archaic* ascii file format from TRIUMF which is intended to be used to collect parameter summaries of various runs, which can be read directly by :ref:`mupp <mupp>`.
The DB file is organized in a couple of tags defining various properties, followed by the parameter data with its errors.
Tags and is content are always separated by an empty line.
The first tag is the **TITLE**. Followed by the title in the next line
::
TITLE
This is the best data ever
The next tag is the **ABSTRACT**, followed a potentially multi-line abstract, e.g.
::
ABSTRACT
Here comes the detailed description ...
The next tag, **LABELS**, are used to define human readable names for the data parameters to be followed:
::
LABELS
T (K)
B (G)
...
The number of labels have to fit the number of parameters present!
The next tag is **DATA**, which is a list of the parameter names as found in you msr-file.
Unlike the other tags, here the list of names follow directly after the **DATA** tag
::
DATA dataT dataB dataE dataTr ...
Next there will be a line with the tag **\\\\-e**, followed by
The parameters are afterwards listed as
::
param-name = val, pos-err, neg-err,\
After all the parameters listed of a specific run, the **run number** with the run title ends a run data set.
This might look like this (be aware of the comma!):
::
11231,,, AgPlate 250nm (T5034), T=200.00 K, E=12.99 keV, B=~50(G)/8.65(A), Tr/Sa=12.00/-1.80 kV, SR=-10.00
A full example might look like this:
::
TITLE
Ag Plate 2023 runs, Tr12kV, E=13keV, TF B=50G
Abstract
Summary of the
LABELS
T (K)
B (G)
Implantation Energy (keV)
Transport (kV)
RAL-RAR (kV)
RAT-RAB (kV)
Spin Rotation Angle (degree)
Asy
Lambda
Ph
Field
RelPh_L
N0_L
N_bkg_L
RelPh_T
N0_T
N_bkg_T
RelPh_R
alpha_LR
N_bkg_R
RelPh_B
alpha_TB
N_bkg_B
maxLH
NDF
maxLHred
RUN
Data dataT dataB dataE dataTr dataRALRAR dataRATRAB dataSpinRot Asy Lambda Ph Field RelPh_L N0_L N_bkg_L RelPh_T N0_T N_bkg_T RelPh_R alpha_LR N_bkg_R RelPh_B alpha_TB N_bkg_B maxLH NDF maxLHred RUN
\-e
dataT = 200.001, 0.0009, 0.0009,\
dataB = 49.49, 0, 0,\
dataE = 12.9952, 0, 0,\
dataTr = 11.9993, 0, 0,\
dataRALRAR = -0.008, 0, 0,\
dataRATRAB = -0.009, 0, 0,\
dataSpinRot = -10, 0, 0,\
Asy = 0.22466, 0.00084, -0.00084,\
Lambda = 0.0081, 0.0014, -0.0014,\
Ph = 12.14, 0.32, -0.32,\
Field = 50.837, 0.017, -0.017,\
RelPh_L = 0, 0, 0,\
N0_L = 430.67, 0.39, -0.39,\
N_bkg_L = 6.81, 0.048, -0.048,\
RelPh_T = -89.95, 0.4, -0.4,\
N0_T = 422.6, 0.37, -0.37,\
N_bkg_T = 7.125, 0.047, -0.048,\
RelPh_R = -178.55, 0.39, -0.39,\
alpha_LR = 0.9729, 0.0012, -0.0012,\
N_bkg_R = 7.375, 0.048, -0.048,\
RelPh_B = 90.38, 0.4, -0.4,\
alpha_TB = 0.9522, 0.0012, -0.0012,\
N_bkg_B = 6.546, 0.047, -0.047,\
maxLH = 20303.3, 0, 0,\
NDF = 20361, 0, 0,\
maxLHred = 0.997166, 0, 0,\
11231,,, AgPlate 250nm (T5034), T=200.00 K, E=12.99 keV, B=~50(G)/8.65(A), Tr/Sa=12.00/-1.80 kV, SR=-10.00
dataT = 153, 0.7, 0.7,\
dataB = 49.49, 0, 0,\
dataE = 12.9952, 0, 0,\
dataTr = 11.9993, 0, 0,\
dataRALRAR = -0.008, 0, 0,\
dataRATRAB = -0.009, 0, 0,\
dataSpinRot = -10, 0, 0,\
Asy = 0.22253, 0.00084, -0.00083,\
Lambda = 0.0055, 0.0014, -0.0014,\
Ph = 11.53, 0.32, -0.32,\
Field = 51.026, 0.017, -0.017,\
RelPh_L = 0, 0, 0,\
N0_L = 430.31, 0.39, -0.39,\
N_bkg_L = 6.762, 0.048, -0.048,\
RelPh_T = -89.3, 0.4, -0.4,\
N0_T = 422.31, 0.37, -0.37,\
N_bkg_T = 6.96, 0.047, -0.047,\
RelPh_R = -178.61, 0.4, -0.4,\
alpha_LR = 0.975, 0.0013, -0.0012,\
N_bkg_R = 7.361, 0.048, -0.048,\
RelPh_B = 90.24, 0.4, -0.4,\
alpha_TB = 0.9605, 0.0012, -0.0012,\
N_bkg_B = 6.623, 0.047, -0.047,\
maxLH = 20435.6, 0, 0,\
NDF = 20361, 0, 0,\
maxLHred = 1.00366, 0, 0,\
11235,,, AgPlate 250nm (T5034), T=151.72 K, E=13.00 keV, B=~50(G)/8.65(A), Tr/Sa=12.00/-1.80 kV, SR=-10.00
>> here many more run data would follow ...
.. index:: dat-file-format
.. _dat-file-format:
DAT: CSV like file format for non-|mgr|\SR
------------------------------------------
This is typically used when exporting the parameter data from **msr2data** to be used in **mupp**, gnuplot, origin, or whatever parameter plotter you might use.
The first line defines the parameter tags separated by spaces or tabs. If errors are available there are labeled be the ending *Err*.
This is followed by the parameter values and its errors if present. A fill example looks like this:
::
dataT dataTErr dataB dataE dataTr dataRALRAR dataRATRAB dataSpinRot Asy AsyPosErr AsyNegErr Lambda LambdaPosErr LambdaNegErr Ph PhPosErr PhNegErr Field FieldPosErr FieldNegErr RelPh_L RelPh_LPosErr RelPh_LNegErr N0_L N0_LPosErr N0_LNegErr N_bkg_L N_bkg_LPosErr N_bkg_LNegErr RelPh_T RelPh_TPosErr RelPh_TNegErr N0_T N0_TPosErr N0_TNegErr N_bkg_T N_bkg_TPosErr N_bkg_TNegErr RelPh_R RelPh_RPosErr RelPh_RNegErr alpha_LR alpha_LRPosErr alpha_LRNegErr N_bkg_R N_bkg_RPosErr N_bkg_RNegErr RelPh_B RelPh_BPosErr RelPh_BNegErr alpha_TB alpha_TBPosErr alpha_TBNegErr N_bkg_B N_bkg_BPosErr N_bkg_BNegErr maxLH NDF maxLHred RUN
200 0.007 99.48 1.11754 10.001 -0.008 -0.008 -10 0.1587 0.0012 0.0012 0.0263 0.003 0.003 29.85 0.64 0.64 101.179 0.035 0.035 0 0 0 219.27 0.27 0.27 2.676 0.033 0.033 -89.79 0.81 0.81 210.42 0.26 0.26 2.723 0.032 0.032 -179.73 0.81 0.81 0.9808 0.0017 0.0017 2.993 0.033 0.033 90.05 0.82 0.82 0.9755 0.0017 0.0017 2.501 0.032 0.032 20444.8 20361 1.00412 11400
200 0.009 99.49 2.11668 10.001 -0.008 -0.008 -10 0.1732 0.0012 0.0012 0.0096 0.0025 0.0026 28.88 0.57 0.57 101.231 0.03 0.03 0 0 0 219.86 0.27 0.27 2.749 0.033 0.033 -88.87 0.71 0.71 211.47 0.26 0.26 2.791 0.032 0.032 -178.48 0.72 0.71 0.9678 0.0017 0.0017 2.969 0.033 0.033 90.94 0.73 0.73 0.9608 0.0017 0.0017 2.653 0.032 0.032 20182.5 20361 0.991233 11401
.. index:: mdu-file-format
.. _mdu-file-format:
MDU file format (psi) for |mgr|\SR
----------------------------------
For details about the PSI-BIN/MDU file format from PSI see `Class_MuSR_PSI <http://lmu.web.psi.ch/docu/manuals/bulk_manuals/software/Class_MuSR_PSI/index.html>`_
.. index:: mud-file-format
.. _mud-file-format:
MUD file format (triumf) for |mgr|\SR
-------------------------------------
For details about the MUD file format from triumf see `MUon Data access <https://cmms.triumf.ca/mud/>`_ .
.. _musr-root-file-format:
MusrRoot file format (PSI) for |mgr|\SR
---------------------------------------
For details see :ref:`MusrRoot - an Extensible Open File Format for uSR <MusrRoot>`.
.. index:: nexus-file-format
.. _nexus-file-format:
NeXus file format (isis) for |mgr|\SR
-------------------------------------
For details about the NeXus file format from ISIS (UK) see `The application of the NeXus data format to ISIS muon data <https://doi.org/10.1016/S0921-4526(02)01613-7>`_ . For a detailed list of available meta information and data see `NeXus Instrument Definitions for ISIS muon Data <https://www.isis.stfc.ac.uk/Pages/nexus-definition-v27924.pdf>`_ .
.. index:: psi-bin-file-format
.. _psi-bin-file-format:
PSI-BIN file format (psi) for |mgr|\SR
--------------------------------------
For details about the PSI-BIN/MDU file format from PSI see `Class_MuSR_PSI <http://lmu.web.psi.ch/docu/manuals/bulk_manuals/software/Class_MuSR_PSI/index.html>`_.
.. index:: root-file-format
.. _root-file-format:
ROOT file format (psi/lem before 2012) for |mgr|\SR
---------------------------------------------------
For details about the API of ROOT files can be here: `ROOT files <https://root.cern/manual/root_files/>`_.
The structure of the ROOT files (LEM, before 2012) looks like this:
::
ROOT-file --|
|-- histos ---|
| |-- DecayAnaModule
| |-- PileUpAnaModule
| |-- ScalerSumRate
| |-- SCAnaModule
|
|-- RunInfo --|
|-- RunSummary
``histos``, ``RunInfo``, ``DecayAnaModule``, ``PileUpAnaModule``, ``ScalerSumRate``, ``SCAnaModule`` are **TFolder** objects.
The ``DecayAnaModule`` object holds the positron spectra
::
DecayAnaModule --|
|-- hDecay00
|-- hDecay01
|-- hDecay02
|-- hDecay03
|-- hDecay20
|-- hDecay21
|-- hDecay22
|-- hDecay23
The ``hDecayXX`` files or **TH1F** objects containing the positron spectra of the LEM detectors.
The detectors (00, 01, 02, and 03) are the detectors (Left, Top, Right, Bottom). These are non-post-pileup (NPP) histograms.
The detectors (20, 21, 22, and 23) are the detectors (Left, Top, Right, Bottom). These are post-pileup-corrected (PPC) histograms.
The ``SCAnaModule`` contains various **TF1H** objects of slow control data of the run.
The ``RunSummary`` is essentially an ascii dump, with summary information of the run.
.. index:: wkm-file-format
.. _wkm-file-format:
WKM file format for |mgr|\SR
----------------------------
WKM is an obsolete ascii file format, originally introduced by people from the TU Braunschweig.
It starts with a header which shows like this:
::
- WKM data file converted with any2many
NEMU_Run: 2466
nemu_Run: ./2466.wkm
Date: 13:22:00 2012-06-03 / 14:04:38 2012-06-03
Title: LSCO x=0.02 (224-227), T=12.00 (K), E=5.57 keV, WEW B=~49(G)/8.62(A), Tr=15.02 (kV), Sample=8.70 (kV), SpinRot -10
Field: 49.11
Setup: Sample, WEW, LowTemp-2
Temp: 11.999
TOF(M3S1): nocut
Groups: 8
Channels: 66601
Resolution: 0.0001953125
The header ends with an empty line.
The data are stored as following: there are always 10 bin-counts per line.
Between detectors, there will be an empty line.

View File

@ -0,0 +1,32 @@
.. musrfit docu documentation master file, created by
sphinx-quickstart on Sun Jun 17 11:00:32 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to the musrfit documentation!
=====================================
.. toctree::
:maxdepth: 2
cite
tutorial
user-manual
user-libs
setup-standard
setup-dks
musredit
mupp
msr2data
any2many
file-formats
musr-root
acknowledgement
bugtracking
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

View File

@ -0,0 +1,374 @@
.. include:: <isogrk1.txt>
.. index:: msr2data
.. _msr2data:
msr2data - A Program for Automatically Processing Multiple ``musrfit`` msr Files
================================================================================
``msr2data`` (originally written by B. M. Wojek) is a program implemented in ``C++``. Its purpose is
to process multiple msr files (input files for ``musrfit``) with the same parameters and summarize the fitting
results either in a *TRIUMF DB* [#f1]_ or a *column ASCII* file. This allows essentially to
#. Collect the fit parameters.
#. Generate *new* input msr files based on old ones.
.. [#f1] For an abridged description of this format see `here <http://musr.org/xyfit/dbformat.html>`_. The DB files
produced by ``msr2data`` can be viewed for instance with :ref:`mupp <mupp>` or |mgr|\View `see here <http://musr.org/muview/>`_, however,
they are not completely backward-compatible to the original ``db language`` since the parameter names can be longer than five or
six characters! In order to establish this backward compatibility (if needed) the user has to ensure the correct length of the
parameter names in the msr files!
.. _msr2data-basic-usage:
Basic Types of Usage
--------------------
Apart from numerous :ref:`optional parameters <msr2data-opt-param>` that might be set, in principle there are four different ways of calling ``msr2data``.
These differ in how the list of runs which should be processed is supplied:
**msr2data <run> <extension> [optional parameters]**
A single run number.
**msr2data <firstRunNo> <lastRunNo> <extension> [optional parameters]**
An interval of run numbers is specified through the first and the last run number. The condition ``<firstRunNo>`` < ``<lastRunNo>`` is not necessary.
**msr2data \[ <runList> \] <extension> [optional parameters]**
Where ``<runList>`` is one or a combination of the following:
#. ``<run0>, <run1>, <run2>, ... <runN>`` : run numbers, *e.g.* 123 124,
#. ``<run0>-<runN>`` : a range, *e.g.* 123-125 -> 123 124 125,
#. ``<run0>:<runN>:<step>`` : a sequence, *e.g.* 123:127:2 -> 123 125 127. ``<step>`` has to be a positive integer.
#. A ``<runList>`` can also combine (1)-(3), *e.g.* 123 128-130 133, etc.
**msr2data <runListFileName> <extension> [optional parameters]**
An ASCII file containing a list of run numbers and optional external parameters is passed to ``msr2data``. For the structure of the ASCII file
see :ref:`below <run-list-file_structure>`.
All four basic types of calling ``msr2data`` contain the *mandatory* file-name ``<extension>`` passed right after the list of runs. The meaning of
this ``<extension>`` should become clear after giving examples for all four cases:
.. code-block:: bash
$ msr2data 8472 _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr``.
.. code-block:: bash
$ msr2data 8472 8474 _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr``, ``8473_tf_h13.msr``, and ``8474_tf_h13.msr``.
.. code-block:: bash
$ msr2data [8472 8470] _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8472_tf_h13.msr`` and ``8470_tf_h13.msr``.
.. code-block:: bash
$ msr2data [8470:8474:2] _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from ``8470_tf_h13.msr``, ``8472_tf_h13.msr``, and ``8474_tf_h13.msr``.
.. _run-list-file_structure:
Run List File Structure
+++++++++++++++++++++++
.. code-block:: bash
$ msr2data run.list _tf_h13
generates the DB file ``out.db`` (can be changed by using the -o option) from all runs listed in the ASCII file ``run.list`` in the working directory.
In this file it is also possible to include *external* parameters which should be put in the resulting DB file. The structure of the ``run.list`` is the following:
::
RUN VAR1 VAR2 VAR3 ...
8460 200 27.1 46.2 ...
8472 205 27.1 46.3 ...
8453 210 27.2 45.9 ...
· · · ·
· · · ·
· · · ·
*The first not commented and not empty line determines the parameter names and labels and has to be present!*
It is allowed to add comments (with a preceding '#') or empty lines to the run-list file.
The following should be mentioned together with the above examples:
* The output files in the examples above are only newly created if they did *not* exist before invoking ``msr2data``.
If the files were already present the msr file data would be appended!
* If the files have been newly created, also the DB file header is written. If the files were present before, only
the data blocks are appended. The output of the header can either be forced or completely suppressed with the ``header``
and ``noheader`` options as shall be seen later.
* If the ``musrfit`` output files do not have an ``<extension>`` as specified above like ``8472.msr`` one has to call ``msr2data`` like in the following example:
.. code-block:: bash
$ msr2data 8472 8460 ""
.. _msr2data-opt-param:
Optional Parameters
-------------------
As mentioned already above there are some optional parameters which change the behavior of ``msr2data`` and can be passed in any order. Here is a complete list:
**data**
The output file format is changed to a simple column ASCII file (default output file name: out.dat).
**new**
An existing output file is deleted before new information is written to it.
**header**
Force the output of the file header even if the output file was present before.
**noheader**
The output of the file header is suppressed—also if the output file is newly created.
If either both or none of the header options are given, ``msr2data`` writes the file header only to new files
and it solely appends the data blocks to an existing output file assuming that the header is present already.
**nosummary**
There will be no attempt to read additional information like the temperature or the applied magnetic field from
the data files even if these information were present there.
**paramList <param>**
option used to select the parameters which shall be exported. ``<param>`` is a list of parameter numbers to be exported.
Allowed lists are: ``<startNo>-<endNo>``, *e.g.* ``1-16`` will export parameters 1 to 16. Space separated numbers, *e.g.:* ``1 3 5``.
A combination of both is possible, *e.g.* ``1-16 19 31 62``, and so on.
**-o<outputFileName>, -o <outputFileName>**
The processed data will be written to the file ``<outputFileName>`` instead of the default ``out.db`` or ``out.dat``.
If ``<outputFileName>`` is equal to none (case-insensitive) the parameter data are not appended to any output file.
**fit**
Additionally to the final data collection ``msr2data`` will invoke ``musrfit`` to fit the specified runs.
All msr files are assumed to be present, none is newly generated!
**fit-<template>[!]**
Additionally to the final data collection ``msr2data`` will generate msr files for the runs specified in the list
of runs and invoke :ref:`musrfit <musrfit>` for performing fits of the data. As template for the first run the file
``<template><extension>.msr`` (or if not available: ``<template><extension>.mlog``) is used; the subsequent input
files will be created using the msr output of the last processed runs ("chain fit"). However, if for all runs only
the given template should be used one has to append an exclamation mark (**!**) to the ``<template>``.
**msr-<template>**
The same as ``fit-<template>[!]``, *without* calling ``musrfit`` and the final data collection, *i.e.* only the msr files for the given runs are generated.
**-k**
If specified together with the ``fit-<template>`` option, the :ref:`- -keep-mn2-output <musrfit>` option is passed to ``musrfit``.
In the case no fits should be done, this option is ignored.
**-t**
In case this option is given additionally to the ``fit-<template> option``, ``musrfit`` is called with
the :ref:`- -title-from-data-file <musrfit>` option. If no fitting is done, this option is ignored.
**Examples:**
In order to illustrate the usage of these parameters a few examples with explanations are given below:
.. code-block:: bash
$ msr2data 8400 8460 _tf_h13 -oABC.db fit-8472
Using ``8472_tf_h13.msr`` as first template, ``msr2data`` generates subsequent msr input files ``8400_tf_h13.msr`` through ``8460_tf_h13.msr``,
calls ``musrfit`` to perform a fit of these files and collects the results of the fits together with the DB header in the new file ``ABC.db``.
Additionally, some information about external parameters like the temperature will be passed to ``ABC.db`` if it is present in the data files.
.. code-block:: bash
$ msr2data [8500 8502-8504 8507] _zf fit-8472 noheader nosummary -o DEF.db
Using ``8472_zf.msr`` as first template, ``msr2data`` generates subsequent msr input files ``8500_zf.msr``, ``8502_zf.msr``, ``8503_zf.msr``,
``8504_zf.msr``, and ``8507_zf.msr``, calls ``musrfit`` to perform a fit of these files and collects the results of the fits in the file ``DEF.db``
*without* writing the DB file header or attempting to read additional information from the data files.
.. code-block:: bash
$ msr2data 8595 8585 "" noheader fit-8472! -oGHI.dat data nosummary -k
Using ``8472.msr`` as template for all runs, ``msr2data`` generates the msr input files ``8595.msr`` through ``8585.msr``, calls ``musrfit`` with
the option ``--keep-mn2-ouput`` to perform a fit of these files and collects the results of the fits in the column-structured ASCII file ``GHI.dat``
*without* writing any file header or attempting to read additional information from the data files.
.. code-block:: bash
$ msr2data 8472 8475 "" fit -o none
Take the *given* msr files ``8472.msr`` through ``8475.msr`` and call ``musrfit`` *without* finally summarizing the results.
.. code-block:: bash
$ msr2data 8472 8475 _tf_h13 msr-8471!
Using ``8471_tf_h13.msr`` as template for all runs, ``msr2data`` generates the msr input files ``8472_tf_h13.msr`` through ``8475_tf_h13.msr``.
*No fitting will be performed and no DB or ASCII output will be generated!*
.. code-block:: bash
$ msr2data [8472 8475-8479] _tf_h13 paramList 1-16 data -o bestData.dat
Will collect the parameters 1 to 16 from the msr-files ``8472_tf_h13.msr``, ``8475_tf_h13.msr``, ``8476_tf_h13.msr``, ``8477_tf_h13.msr``, ``8478_tf_h13.msr``,
and ``8479_tf_h13.msr`` and write these parameters into a column like output file ``bestData.dat``.
.. index:: msr2-data-global-mode
The Global Mode
---------------
Apart from all the options described :ref:`above <msr2data-opt-param>` there is another program option: **global**.
This option changes the general behavior of ``msr2data`` in that way that instead of processing one msr file for each
run it combines all specified runs in *one single msr file* with the possibility to define common parameters for all
runs as well as run-specific parameters. When writing the obtained parameters to a DB file or a column-structured
ASCII file that single msr file is read and the parameters valid for each run are extracted. The global option can be
used in conjunction with any of the described invocations of ``msr2data`` and together with all options stated :ref:`above <msr2data-opt-param>`.
File Generation
+++++++++++++++
The general idea of this mode is to generate a global msr file on the basis of a working single-run msr file. For this
purpose a single-run template containing information about common and run-specific parameters should be created. These
parameters are identified through their parameter names:
**run-specific parameters**
these parameters are tagged with the current run number in the format ``%0Xu``, *i.e.* ``X`` digits with leading zeros,
at the end of the parameter name, *e.g.* for a 4-digit-formatted run number ``alpha0123`` if the run number was 123 or
for a 8-digit-formatted run number ``alpha00123456`` if the run number was 123456. ``X`` has to be at least 4.
**common parameters**
all parameters that are not run specific
The :ref:`FITPARAMETER block <msr-fitparameter-block>` of an exemplary template file ``8472_example.msr`` could therefore look like:
::
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 Phase 35.8359 -3.94496 3.93749
2 Asy8472 0.04501 -0.00208 0.00211 0 0.33
3 Field 143.212 -0.27960 0.27885 100 200
4 Rate8472 0.14245 -0.02501 0.02279 0 1
Here the parameters **2** and **4** would be treated as *run-specific* whereas the parameters **1** and **3** would be *common* to the original and all newly added runs.
Normally, within the template file there should *not* appear explicitly any run-specific parameters in the :ref:`THEORY <msr-theory-block>` and
:ref:`FUNCTIONS <msr-functions-block>` blocks. If however, those parameters are met, ``msr2data`` will try to substitute them by mapped parameters
and add them accordingly to the map contained in each :ref:`RUN block <msr-run-block>`.
When ``msr2data`` is called to generate a global msr file, *e.g.*
.. code-block:: bash
$ msr2data 8471 8470 _example msr-8472 global
a new msr file ``8471+global_example.msr`` is created. As can be seen in the example, the name of the global msr file always starts with the
first specified run number followed by the ``+global`` identifier and the template ``<extension>``. The example's global FITPARAMETER block would be:
::
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
# Common parameters for all runs
1 Phase 35.8359 -3.94496 3.93749
2 Field 143.212 -0.27960 0.27885 100 200
# Specific parameters for run 8471
3 Asy8471 0.04501 -0.00208 0.00211 0 0.33
4 Rate8471 0.14245 -0.02501 0.02279 0 1
# Specific parameters for run 8470
5 Asy8470 0.04501 -0.00208 0.00211 0 0.33
6 Rate8470 0.14245 -0.02501 0.02279 0 1
This shows that the fit parameters are reorganized in a way that the common parameters appear at the beginning of the parameter list and they are
followed by copies of the parameters specific to each run (in the specified order!). Additionally, for each specified run new RUN blocks are
created — for each run as many as found for the template run.
During this reorganization all the affected parameter occurrences are changed accordingly!
.. note::
Please be aware of the fact that comments in the template msr file are *not* propagated to the newly generated global msr file!
.. index:: msr2data-global-param-extraction
Parameter Extraction
++++++++++++++++++++
After fitting some model to the specified data the fit parameters can be extracted from the global msr file to a DB or column-structured ASCII file;
as usual this includes also parameters stored in the run data files or externally specified parameters given in a :ref:`run-list file <run-list-file_structure>`.
In order to reach this goal the global msr file has to obey certain rules:
* The order of the parameters has to match the one described above, meaning the common parameters are listed first followed by
the same number of parameters specific to each run tagged by the according run numbers at the end of the parameter names and
having the same order as the specified list of runs.
* The RUN blocks have to be ordered according to the list of runs to be processed.
Following these rules -- which is achieved most easily by generating the global msr file using ``msr2data`` as shown above -- the parameters can be extracted *e.g.* like
.. code-block:: bash
$ msr2data 8471 8470 _example global data -o globalFit.dat
This will read in the file ``8471+global_example.msr``, extract for each run all relevant parameters from the msr file as well as
from the according data files (if available) and append all of them in columns to the ASCII file ``globalFit.dat``.
.. index:: msr2data-global-extended
The Extended Global Mode
++++++++++++++++++++++++
If a new global input file is generated, it is also possible to do an automatic pre-analysis for each single run using the specified template first;
afterwards the run-specific parameters of these single-run msr files are collected into the global msr file. In special cases this might be useful
to obtain a better set of starting values for the parameters, however, in most cases it will not replace the "manual review" of the generated global
input file. The option is activated by choosing the keyword **global+**. For example
.. code-block:: bash
$ msr2data 8471 8470 _example global+ msr-8472
Here, ``8472_example.msr`` is first used as template to generate the file ``8471-OneRunFit_example.msr``, then ``musrfit`` is called for it, the result
is used to generate ``8470-OneRunFit_example.msr`` and ``musrfit`` is called for that file. Finally, the global fit file ``8471+global_example.msr`` is
produced — including the fit results of the ``OneRunFit`` files for the run-specific parameters.
By appending an exclamation mark **!** to the **global+** option, the given template will be used for every new file generation (similar to the fit option
explained before). The **+[!]** extension will be ignored, if no new global input file is generated.
The single run msr files are *not* deleted at the moment. The information contained in them might be useful for some people. Of course the data can also
be collected by ``msr2data``. *E.g.* in order to produce a DB file ``OneRunFits.db`` one could call
.. code-block:: bash
$ msr2data 8471 8470 -OneRunFit_example -o OneRunFits.db
.. note::
Please be aware that the program in this mode *always* generates new single-run msr files and *always* calls ``musrfit`` for them. In case there are
already single-run fits present, these cannot be used in conjunction with this option. The program on purpose behaves in this way in order to ensure
the file integrity and correct parameter order within these files.
Known Limitations
-----------------
* The indexing run number of the msr file has to be at the begin of every filename.
* Within the data file name the ``RUN#`` has the format ``%0Xu``, *i.e.* ``X`` digits with leading zeros, and has to be the rightmost number given in this
format in the file name. ``X`` has to be at least 4. The highest treatable run number is :math:`2^{32}-1 = 4294967295`.
* In order to keep ``msr2data`` working properly the msr files should only contain *one* STATISTIC block at the end of the file and *one* FITPARAMETER block
right after the TITLE — ``musrfit`` itself allows to have more creative msr files...
* The msr-file generation from a template takes only care of runs given on the *first* line of a ``RUN block``. :ref:`ADDRUN <msr-addrun>` statements are simply
copied! Since this is most probably *not* what one likes to do, it is suggested *not* to use the ``fit-<template>`` and ``msr-<template>`` options if
ADDRUN statements were present in the template file.
* ``msr2data`` will write only up to two successive empty lines in newly generated msr files. In case more subsequent empty lines are encountered in a template file,
these are not copied! Actually, this measure is not a limitation but has been introduced to keep the msr files in a reasonable shape.
The Graphical User Interface for msr2data Provided by musredit
--------------------------------------------------------------
:ref:`musredit <musredit-sec>`, designed especially for the manipulation of ``musrfit`` msr files and graphical front ends to ``musrfit``, offer an almost
self-explanatory graphical user interface to ``msr2data`` depicted below:
.. image:: ../images/msr2data-GUI.*
1. and 2. Choose one of the ways to specify your list of runs as described under :ref:`basic usage <msr2data-basic-usage>`.
3. Give the file extension here, *e.g.* ``_zf`` for files like ``8472_zf.msr``. If the files do not have an extension this
field stays empty. ``musredit`` takes care of passing the "" to ``msr2data`` as mentioned above.
4. Activates the ``fit-<template>`` option if ``<template>`` is entered. In case the option ``Chain Fit`` is *not* set the
given template will be used for the input-file generation for all runs to be fitted — otherwise the output of the first
fit serves as template for the second and so on. The template field stays empty if *no* fits should be performed!
5. Activates the ``-o <outputFileName>`` option if ``<outputFileName>`` is entered. If nothing is entered the default output file ``out.db`` or ``out.dat`` is used.
The options tags correspond essentially to the description in :ref:`optional parameters <msr2data-opt-param>`.

View File

@ -0,0 +1,238 @@
.. include:: <isogrk1.txt>
.. index:: mupp
.. _mupp:
mupp - |mgr|\SR Parameter Plotter
=================================
``mupp`` is a little helper program which allows to quickly plot a collection of msr-file parameters,
as for instance generated by :ref:`msr2data <msr2data>`. It can handle ``db``- and ``dat``-files.
Also a collection of ``msr``-files can be invoked. ``mupp`` is heavily inspired by |mgr|\View (see
`here <http://musr.org/muview/>`_).
``mupp`` can be operated from within as graphical user interface or via a command line scripting interface.
The ``mupp`` GUI can be invoked either directly from the command line or from within :ref:`musredit <musredit-sec>`.
Each collection bundles a number of runs, where a run is a single |mgr|\SR measurement.
A run is analyzed by a number of parameters (defined in the msr-files), and complemented by
additional physical parameters as the temperature, magnetic field, implantation energy, etc.
Hence parameters can be seen as vectors and can be plot against each other.
.. index:: mupp-gui
The Graphical User Interface
----------------------------
A typical setting could look like this
.. image:: ../images/mupp-gui-0.*
1. shows the list of loaded collections. A collection is defined as ``db``- or ``dat``-file (typically the
output from :ref:`msr2data <msr2data>`). If you call the open-dialog and select a collection of
``msr``-files, ``mupp`` will call ``msr2data`` and tries to generate a collection on-the-fly.
2. in this list, the data-tags of the currently selected collection is presented. The data-tags can be
directly dragged over to the ``x``- and ``y``-axis list. Another way is to select the data-tag
wished and click ``add X`` to add the selected data-tag to the ``x``-axis list. Analogous it is done
for the ``y``-axis.
3. ``x``-axis list. The labels are followed by ``(-X-)`` where the number ``X`` corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.
4. ``y``-axis list. The labels are followed by ``(-X-)`` where the number ``X`` corresponds to the
selection it corresponds to. The numbering of the collection is as given in the collection list.
5. ``add X`` allows to add the currently selected data-tag to the ``x``-axis list.
6. ``add Y`` allows to add the currently selected data-tag to the ``y``-axis list.
7. ``remove X`` will remove the selected ``x``-axis tag.
8. ``remove Y`` will remove the selected ``y``-axis tag.
9. Often one would like to compare trends of different settings. In the above example each collections
holds an energy scans for a given temperature. Each collection is measured at a different temperature.
Now, instead of adding ``x``- and ``y``-axis tags for each collection, you can do the following:
you add ``x``- and ``y``-axis data-tags for the first collection. Afterwards you select all the other
collections of interest and click on ``Add Ditto``. ``mupp`` will then add the corresponding
``x``- and ``y``-axis data-tags accordingly. This is less error prone and quicker!
10. Clicking the ``Plot`` button will invoke ``mupp_plot`` (a ``ROOT`` based application) which will
present the data, as shown here
.. image:: ../images/mupp-plot-0.*
:height: 600px
11. ``Remove Collection``: will remove the selected collection
12. ``Refresh Collection``: will reload the collection (``db``- or ``dat``-file). This is often useful
during beamtime where the collection is growing run-by-run.
13. Command history window.
14. This is the script command line. Currently it allows to perform the tasks without mouse gambling.
In the future much more commands are planed. See the ``Help / Cmd's`` for the currently available
commands.
Define Variable Dialog
++++++++++++++++++++++
.. image:: ../images/mupp-add-var.*
1. Variable text edit window.
2. Collection link window.
3. Shows the parameters of the selected collection.
4. Check if the variable/error variable from the edit window is valid.
5. Add the variable to the selected collection(s) if the parsing is successful.
A variable defined here is a mathematical expression defined by parameters of loaded collections.
Since a parameter also has an associated error, also newly defined variables **always** need
to be defined together with a corresponding error variable. If the name of a variable is defined
as ``SigmaSC_10`` (see the above snapshot), the error variable need to be named as ``SigmaSC_10Err``.
Currently the following mathematical functions are defined: ``max``, ``min``, ``abs``, ``sin``, ``cos``,
``tan``, ``exp``, ``log``, ``ln``, ``pow``.
.. index:: mupp-scripting
The Scripting Interface
-----------------------
``mupp`` can also be operated in a scripting like manner. The use cases are plot updates during run time,
or web-based interaction which requests figures. A script is invoked by the command line option ``-s`` (see
:ref:`mupp command line summary <mupp-usage>`. Currently the following scripting commands are available:
**loadPath <dir>**
set the load path to ``<dir>``. Bash variables like $HOME are accepted. This is the path where to look for collection files (``db``- and ``dat``-files).
**load <coll>**
will load the collection ``<coll>``.
**selectAll**
will select all loaded collections. This means every plot of variable x/y will be carried out to *ALL* collections.
**select <nn>**
selects collection ``<nn>``, where ``<nn>`` is either the *number* of the collections, or its *name*, *e.g.*
select YBCO-40nm-T5K-FC150mT-Escan.db.
**x <label>**
add ``<label>`` as a *x*-variable. Only *one* is allowed.
**y <label(s)>**
add ``<label(s)>`` as *y*-variable. *Multiple* labels are possible.
**norm**
this will normalize all the *y*-variables by their maximum.
**savePath <dir>**
set the save path to ``<dir>``. The place where the macros, and/or the plot output will be saved.
**plot <fln>**
where ``<fln>`` is the file name with extension under which the plot should be saved.
**macro <fln>**
where ``<fln>`` is the file name under which the root macro should be saved.
**var <var_name> = <expr>**
defines a variable.
<expr> is a mathematical expression where collection variables are addressed
via the '$', e.g. ``dataT`` is addressed by ``$dataT``, etc. An example:
``var invT = 1000.0 / $dataT``
Each variable has to be accompanied by its error variable. An error variable
is defined by the ``<var_name>`` followed by ``Err``
For the above example the error variable is
``var invTErr = $invT * $dataTErr / $dataT``
**col <nn> : <var_name>**
links <var_name> to the collection <nn>, where <nn> is the number of the
collection as defined by the order of load, starting with 0.
An example script file ``sigmaSC-vs-temp.txt`` might look like this:
::
# This is a comment
# Script: sigmaSC-vs-temp.txt
loadPath ./
load YBCO-40nm-FC-E3p8keV-B10mT-Tscan.db # collection 0
load YBCO-40nm-FC-E3p8keV-B150mT-Tscan.db # collection 1
# define variables: for each variable an associated error variable is needed.
# B=10mT
var SigmaSC_10 = pow(abs(pow($Sigma,2.0)-pow(0.11,2.0)), 0.5) # 0.11 (1/us) is the nuclear contribution (T>Tc)
var SigmaSC_10Err = pow(pow($Sigma*$SigmaErr,2.0)+pow(0.11*0.0025,2.0), 0.5)/$SigmaSC_10
# B=150mT
var SigmaSC_150 = pow(abs(pow($Sigma,2.0)-pow(0.075,2.0)), 0.5) # 0.075 (1/us) is the nuclear contribution (T>Tc)
var SigmaSC_150Err = pow(pow($Sigma*$SigmaErr,2.0)+pow(0.075*0.0025,2.0), 0.5)/$SigmaSC_150
# link variables to collections
col 0 : SigmaSC_10 # error variable SigmaSC_10Err doesn't need to be given, it is automatically linked to SigmaSC_10
col 1 : SigmaSC_150
norm # normalize the plot to the maximum of each y-data-set
# the next 3 cmds means the following: use collection 0, add dataT to the x-axis,
# and SigmaSC_10 to the y-axis
select 0
x dataT
y SigmaSC_10
select 1
x dataT
y SigmaSC_150
# where to save the output
savePath ./
# create a pdf output file of the above defined xy-data sets. Currently also
# other file formats are supported, like png, jpg, etc.
plot SigmaSCVsTemp.pdf
# creates a ROOT macro which can be used for further refinement
macro SigmaSCVsTemp.C
# end
.. index:: mupp-usage
.. _mupp-usage:
The Usage Summary
-----------------
::
usage: mupp [OPTIONS] [[--path <fit-param-path>] <fit-param-file-names>]
OPTIONS:
-h, --help: this help
-v, --version: current mupp version
-s <fln>, --script <fln>: <fln> being a mupp script.
--path <fit-param-path>: path where to look for the <fit-param-file-names>
<fit-param-file-names>: list of file name(s) to be loaded.
allowed formats are: db, dat, msr
SCRIPT COMMANDS:
Lines starting with '#', '%', or '//' are comments and will be ignored.
The same is true for empty lines. Comments are also allowed at the end
for a command, i.e. loadPath ./ # the best place ever.
load <coll> : load a collection. <coll> is the filename of the
collection (*.db, *.dat)
loadPath <path> : set the load path to <path>; accepting bash variables
like $HOME, etc.
x <var-name> : set a x-axis variable. <var-name> is a data tag of
the db/dat-file.
y <var-name> : set a y-axis variable. <var-name> is a data tag of
the db/dat-file.
select <nn> : select collection <nn>, where <nn> is the row-number
or the name of the collection to be selected.
selectAll : i.e. already set 'x', 'y' will apply to ALL collections
present.
savePath <path> : sets the save path to <path>; accepting bash variables
like $HOME, etc.
plot <fln> : where <fln> is the file name with extension under which
the plot should be saved.
macro <fln> : where <fln> is the file name under which the root macro
should be saved.
var <var_name> = <expr> : defines a variable.
<expr> is a mathematical expression where
collection variables are addressed via the '$',
e.g. dataT is addressed by $dataT, etc.
col <nn> : <var_name> : links <var_name> to the collection <nn>, where
<nn> is the number of the collection as defined
by the order of load, starting with 0.

View File

@ -0,0 +1,681 @@
.. include:: <isogrk1.txt>
.. index:: MusrRoot
.. _MusrRoot:
MusrRoot - an Extensible Open File Format for |mgr|\SR
======================================================
Until 2011 different |mgr|\SR file formats were used within PSI. The bulk-|mgr|\SR instruments were
writing their data in the ``PSI-BIN`` file format, which is a fixed binary format with rather stringent
limitations. The LE-|mgr|\SR (LEM) instrument was using a ROOT (CERN) based file format which was tightly
tailored to the special needs of the LEM instrument. This situation was unsatisfactorily and hence it
was decided to move forward to a open file format called ``MusrRoot`` to be described in the following.
Some Basics Concerning ROOT Files
---------------------------------
The |mgr|\SR data acquisition systems at PSI are utilizing MIDAS (see `Midas Home Page <https://midas.triumf.ca/MidasWiki/index.php/Main_Page>`_).
The MIDAS analyzer, which is responsible to build histograms, especially the |mgr|\SR decay histograms, makes
it very easy to build ROOT (see `ROOT/CERN home page <https://root.cern.ch>`_ ) histogram objects (these
are ``TH1F`` objects for |mgr|\SR decay histograms). ROOT is a ``C++`` object-oriented data mining and
analysis frame work. These histograms can be collected and saved in ROOT files (``TFile``). In order to ease
the understanding of the upcoming definitions, a few ROOT related things shall be summaries here. For details
concerning the ROOT frame work documentation please check `ROOT/CERN Users Guide(s) <https://root.cern.ch/root-user-guides-and-manuals>`_
and `ROOT/CERN Reference Guide <https://root.cern.ch/guides/reference-guide>`_.
ROOT files (``TFile``) are binary files which can hold any kind of objects. A ``TFile`` is organized similarly
to a directory structure of an operating system. Within the ROOT framework, there is a ``TFile`` browser available
which allows to inspect these files. This browser (``TBrowser``) will show all object saved in the ``TFile`` directly,
if they derive from ``TObject``.
The ``MusrRoot`` file format to be described below is only using a small subset of possible ROOT objects, namely:
* ``TFolder``: this are the top level objects in the ``MusrRoot`` file.
* ``TH1F``: Hold the |mgr|-decay-histograms.
* ``TObjArray``: Holding collection of header information.
* ``TObjString``: Holding the content of any header information.
Since all these objects are deriving form ``TObject``, they will be directly accessible via the ``TBrowser``-object.
For instance, the |mgr|-decay-histograms can be directly plotted, are even fitted, out of the box.
MusrRoot an Extensible Open File Format for |mgr|\SR
----------------------------------------------------
As mentioned before, ROOT files are open-file-format files meaning that they can contain more entries (and most probably will) than the ones specified in the following. The specified ones will be the mandatory ones for all instruments. Before defining all mandatory entries, the MusrRoot file structure shall be sketched.
The MusrRoot file structure looks like:
::
histos ---|
|- DecayAnaModule ---|
| |- hDecay001
| |- hDecay002
| ...
|
|- SCAnaModule ---|
... |- hSampleTemperature
|- hSampleMagneticField
...
RunHeader ---|
|- RunInfo
|- DetectorInfo ---|
| |- Detector001
| |- Detector002
| ...
|
|- SampleEnvironmentInfo
|- MagneticFieldEnvironmentInfo
|- BeamlineInfo
...
where ``hDecay001``, etc. are ROOT histograms (to be more specific: ``TH1F``), containing the |mgr|\SR decay histograms. There can be as many as needed, especially there is no limitation about their length. The histogram object names will be ``hDecayXXX``, where ``XXX`` (leading zero int, *i.e.* ``%03d``
in ``C/C++`` notation, starting with '1') is the histogram number. The title and name of the histogram (see description of the ``TH1F`` ROOT class) contains the label of the histogram, like 'top', 'forward', etc. How many of these histograms are present is accessible through the ``RunInfo`` folder in which the necessary header information are found (details see next sections). The folder ``SCAnaModule`` contains histograms of some of the slow-control parameters, as for instance the sample temperature versus time, the applied field versus time, etc. Again the label of the histogram will give more specific information about its content.
Run Information Contained in ``RunHeader``
++++++++++++++++++++++++++++++++++++++++++
The ``RunHeader`` contains all needed meta-information to describe a |mgr|\SR-run. The list of the minimal number of required "folders" of the ``RunHeader`` is given in the following structure:
::
RunHeader (TFolder) ---|
|- RunInfo (TObjArray)
|- DetectorInfo (TObjArray)
|- SampleEnvironmentInfo (TObjArray)
|- MagneticFieldEnvironmentInfo (TObjArray)
|- BeamlineInfo (TObjArray)
In brackets the object type is given. ``RunInfo`` contains most information relevant for the user and will be itemized in :ref:`RunInfo Overview <musr-root-overview>` and :ref:`RunInfo Required <run-info-required>`. ``DetectorInfo`` contains detector specific information, like detector name, time zero bin, etc. (details is found under :ref:`DetectorInfo Required <detector-info-required>`). ``SampleEnvironmentInfo`` (details under :ref:`SampleEnvironmentInfo Required <sample-environment-info-required>`), and ``MagneticFieldEnvironmentInfo`` (details under :ref:`MagneticFieldEnvironmentInfo Required <magnetic-field-environment-info-required>`) store additional, more detailed information concerning the sample environment. ``BeamlineInfo`` stores beamline relevant information (details under :ref:`BeamlineInfo Required <beamline-info-required>`).
Before elaborating more on the required items within this structure, a few words on the ROOT types used here: ``RunHeader`` is a ``TFolder`` object. All the "sub-directory" entries are of type ``TObjArray`` and collect items of type ``TObjString`` or other ``TObjArray`` (*i.e.* sub-directories and sub-sub-directories, etc.).
.. index:: MusrRoot-Overview
.. _musr-root-overview:
``RunInfo`` Overview
^^^^^^^^^^^^^^^^^^^^
======================== ============================ =====================================================
Name Internal Type Comment
======================== ============================ =====================================================
Version ``TString`` GIT version of ``TMusrRunHeader``
Generic Validator URL ``TString`` URL of the generic ``MusrRoot`` validation xsd-file.
Specific Validator URL ``TString`` URL of the instrument specific validation xsd-file.
Generator ``TString`` Program which wrote the ``MusrRoot`` file, *e.g.* ``nemu_analyzer``
File Name ``TString`` File name of the ``MusrRoot`` file, *e.g.* ``deltat_tdc_gps_4295.root``
Run Title ``TString``
Run Number ``Int_t``
Run Start Time ``TString`` ISO 8601 date time
Run Stop Time ``TString`` ISO 8601 date time
Run Duration ``TMusrRunPhysicalQuantity`` run duration in sec
Laboratory ``TString`` *e.g.* PSI
Instrument ``TString`` *e.g.* GPS
Muon Beam Momentum ``TMusrRunPhysicalQuantity`` *e.g.* 28.1 MeV/c
Muon Species ``TString`` positive, or negative muon
Muon Source ``TString`` *e.g.* Target E - Low Energy Muons or "Target M" ...
Setup ``TString``
Comment ``TString``
Sample Name ``TString``
Sample Temperature ``TMusrRunPhysicalQuantity`` *e.g.* 3.21 +- 0.05 K; SP: 3.2; CF1
Sample Magnetic Field ``TMusrRunPhysicalQuantity`` *e.g.* 350.002 +- 0.005 G; SP: 350; WXY
No of Histos ``Int_t``
Time Resolution ``TMusrRunPhysicalQuantity`` *e.g.* 0.1953125 ns
RedGreen Offsets ``TIntVector`` *e.g.* 0; 20
======================== ============================ =====================================================
These entries should be clear except for the ``RedGreen Offsets`` and the column "Internal Type" which shortly will be discussed before specifying the content of the other required folders.
#. ``RedGreen Offsets``: in case experiments are performed with external stimuli, there will be a collection of related histograms.
For instance for electrical field experiments, there will be histograms for field on/off, doubling the number of needed histograms.
In order to distinguish them easier in the data file, the ``RedGreen Offsets`` were introduced. One selection of histograms
(assuming for the moment 8 detectors) will be numbered from 1 to 8 (lets say the field off ones). The other set of histograms
(field on in this example) will then start with 21 through 28 (see table above). The same will be true for the detector information
(see :ref:`DetectorInfo Required <detector-info-required>`). The entry ``No of Histos`` will only give 8 for the given example,
meaning that red/green multiplication is defined rather via ``RedGreen Offsets`` than the number of histograms.
#. Internal Types: in order to ease the handling of the ``MusrRoot`` run header, a class ``TMusrRunHeader`` is available which deals
with it. The "Internal Type" specified, corresponds to the internal representation in within this class. In the ``MusrRoot`` file
these entries are all saved as browsable ROOT strings (``TObjStringv). The only special type is ``TMusrRunPhysicalQuantity`` which
is introduced to deal with physical quantities. They always can be represented in the following way:
::
<property name> <value> +- <estimated error> <unit>; SP: <demand>; <description>
Not all of these values are needed to be given and depending on which are given, the representation in the ``MusrRootv file will be different (handled by ``TMusrRunHeader``). Examples are given in the comment column of the table above. For details see :ref:`TMusrRunPhysicalQuantity - Possible Representations <musr-run-physical-quantity>`.
A mock-up ``TBrowser`` print-out would look like the one shown in the following figure. You might notice, that at the end of each entry you find a ``-@X``, where ``X`` is a number. This is an encoding of the internal type of the entry and is the price to be payed not using derived types. The next section will explain this in much more detail.
.. image:: ../images/MusrRoot-RunInfo.*
``TMusrRunHeader`` mock up. The red shaded entries are of type ``TMusrRunPhysicalQuantity``
.. _musr-run-header-concept:
TMusrRunHeader Concept
----------------------
The different |mgr|\SR instruments need different information to be written into the data file (next to the most important ones: the histograms). The above defined properties are the *minimal number of required* ones. There are different possible approaches to deal with it on the implementation level.
* A base class dealing with *minimal* required standard is defined. Afterwards for each instrument a class
is derived which is extending the base class to the needs of the instrument.
* The base class is defined in a more abstract way, and some external, text-based description is given which defines the details of the instrument.
Even though the first approach is very clean, it would mean a lot of maintenance work. The 2nd approach is slightly more demanding for the handling class (``TMusrRunHeader`` and helper classes), but having the advantage of easy maintainability and expandability. The idea is that all header information can be classified into 7 groups (see previous and following section(s))
#. Strings, represented by ``TString``
#. Integers, represented by ``Int_t``
#. Floating point numbers, represented by ``Double_t``
#. Physical quantities, represented by :ref:`TMusrRunPhysicalQuantity - Possible Representations <musr-run-physical-quantity>`
#. Collection of strings, represented by ``TStringVector``
#. Collection of integers, represented by ``TIntVector``
#. Collection of floating point numbers, represented by ``TDoubleVector``
These properties can be collected by themselves in form of vectors. This way any needed information can be written into the ROOT file. The class ``TMusrRunHeader`` is implementing this run header concept. In following section code snippets will be discussed, showing how this is used on level of the ``MIDAS`` analyzer, ``musrfit`` reader routine, and ``any2many`` conversion routines. The section :ref:`Validation <musr-root-validation>` will discuss how to validate ``MusrRoot`` files.
User Interface for MusrRoot Run Header
++++++++++++++++++++++++++++++++++++++
There are two things needed to deal with the ``MusrRoot`` run header, namely writing it and reading it. I will start with the writing as will be done in the ``MIDAS`` analyzer.
Writing a MusrRoot Run Header
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An example program ``write_musrRoot_runHeader`` which is writing a full run header is part of the ``musrfit`` package. Here I will concentrate just on the most essential parts. First one needs an instance of ``TMusrRunHeader``
.. code-block:: c++
TMusrRunHeader *header = new TMusrRunHeader();
TMusrRunPhysicalQuantity prop;
``header`` is the instance of ``TMusrRunHeader``. ``prop`` is an instance of ``TMusrRunPhysicalQuantity`` which will be needed further down in the description. In the next step some run header entries will be added
.. code-block:: c++
header->Set("RunInfo/File Name", "deltat_tdc_gps_2871.root");
header->Set("RunInfo/Run Title", "here comes the run title");
header->Set("RunInfo/Run Number", 2871);
Adding information is done via the multiple overloaded ``Set(<pathName>,<value>)`` method. Here ``<pathName>`` is a string representing the "path" like representation in the ``MusrRoot`` file structure, followed by the "value" to be set, *e.g.* "=File Name=". ``<value>`` can be any of the types listed at the beginning of :ref:`Sec. TMusrRunHeader Concept <musr-run-header-concept>`. Here a few examples how to set ``TMusrRunPhysicalQuantity``.
.. code-block:: c++
prop.Set("Sample Temperature", 3.2, 3.21, 0.05, "K", "CF1");
header->Set("RunInfo/Sample Temperature", prop);
prop.Set("Time Resolution", 0.1953125, "ns", "TDC 9999");
header->Set("RunInfo/Time Resolution", prop);
prop.Set("CF3", MRH_UNDEFINED, 3.27, 0.09, "K", "strange temperature");
header->Set("SampleEnvironmentInfo/CF3", prop);
Here ``TMusrRunPhysicalQuantity`` objects are fed via the use of the overloaded set-method. For details see :ref:`TMusrRunPhysicalQuantity - Possible Representations <musr-run-physical-quantity>`.
To set some property within "sub-sub-directories" it would like this:
.. code-block:: c++
header->Set("DetectorInfo/Detector001/Time Zero Bin", 3419.0);
To write the whole run header into a file would look something like this:
.. code-block:: c++
TFile *f = new TFile(fileName, "RECREATE", "write_musrRoot_runHeader");
if (f->IsZombie()) {
delete f;
return -1;
}
// create the needed TFolder object
TFolder *runHeader = new TFolder("RunHeader", "MusrRoot Run Header Info");
// create the "directory" structure
if (header->FillFolder(runHeader)) {
runHeader->Write(); // write run header to file
}
f->Close();
Reading a MusrRoot Run Header
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The following code snippet shows how the extract the full run header from the ``MusrRoot`` file.
.. code-block:: c++
TFile *f = new TFile(fileName, "READ", "read_musrRoot_runHeader");
if (f->IsZombie()) {
delete f;
return -1;
}
TFolder *runHeader = 0;
f->GetObject("RunHeader", runHeader);
if (runHeader == 0) {
cerr << endl << ">> **ERROR** Couldn't get top folder RunHeader";
closeFile(f);
return -1;
}
TMusrRunHeader *header = new TMusrRunHeader(fileName);
if (!header->ExtractAll(runHeader)) {
cerr << endl << ">> **ERROR** couldn't extract all RunHeader information";
closeFile(f);
return -1;
}
f->Close();
delete f;
The routine ``ExtractAll(TFolder *runHeader)`` decodes all the ``TObjString`` objects and fills internal data structures. This means when reading a MusrRoot -file the above handling is always needed. After the ``ExtractAll`` call, parameters can be extracted via the getter routines available. For instance to read the Run Number, the code would look like
.. code-block:: c++
Bool_t ok;
Int_t ival;
header->Get("RunInfo/Run Number", ival, ok);
if (ok)
cout << endl << "Run Number: " << ival;
else
cout << endl << "**ERROR** Couldn't obtain the 'Run Number'.";
Reading a ``TMusrRunPhysicalQuantity`` object, *e.g.* the sample temperature looks like this
.. code-block:: c++
TMusrRunPhysicalQuantity prop;
header->Get("RunInfo/Sample Temperature", prop, ok);
if (ok) {
cout << endl << "Sample Temperature: " << prop.GetValue() << " +- ";
cout << prop.GetError() << " " << prop.GetUnit().Data();
cout << "; SP: " << prop.GetDemand() << "; " << prop.GetDescription().Data();
} else {
cout << endl << "**ERROR** Couldn't obtain the 'Sample Temperature'.";
}
.. index:: MusrRoot-Validation
.. _musr-root-validation:
Validation of a MusrRoot File
+++++++++++++++++++++++++++++
Since ``MusrRoot`` is an open and extensible file format a mechanism is needed to validate that a given file is indeed holding the minimum of required entries. To check this the following scheme is implemented in the program ``musrRootValidation``:
.. image:: ../images/MusrRootValidationScheme.*
``MusrRoot`` validation scheme
In the following this validation scheme will be discussed as it is implemented in ``musrRootValidation``:
#. It is checked if the given file name is a ``TFile``
#. The file structure is recursively parsed and mapped into an temporary XML file. XML is used
since there are ample of parser and validation frameworks at hand. For details check any decent
book about XML. Here the ``libxml2`` is used, because also ROOT is requiring it.
#. In a next step the XML file (holding the structure of the supposed ``MusrRoot`` file is validated
against a XML schema. The minimum of required entries is described by ``MusrRoot.xsd`` which is
part of ``musrfit`` but also available from the PSI/LMU web-page.
#. If the schema validation is successful additional semantic checks (like is the number of decay
histograms the same as the number of detector entries, etc.) will be preformed.
This validation scheme is useful for people which define instrument specific extensions of the base ``MusrRoot``, as for instance the LEM instrument at PSI. It is also useful for people writing file converters in order to cross check if the generated file is valid.
.. _run-info-required:
RunInfo (Required)
------------------
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Version ``TString`` GIT version of ``TMusrRunHeader``
Generic Validator URL ``TString`` URL of the generic ``MusrRoot`` validation xsd-file.
*e.g.* `<http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRoot.xsd>`_
Specific Validator URL ``TString`` URL of the instrument specific validation xsd-file.
*e.g.* for LEM: `<http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRootLEM.xsd>`_
Generator ``TString`` Program which wrote the ``MusrRoot`` file, *e.g.* ``nemu_analyzer``
File Name ``TString`` File name of the ``MusrRoot`` file, *e.g.* ``deltat_tdc_gps_4295.root``
Run Title ``TString``
Run Number ``Int_t``
Run Start Time ``TString`` ISO 8601 date time
Run Stop Time ``TString`` ISO 8601 date time
Run Duration ``TMusrRunPhysicalQuantity`` run duration in sec
Laboratory ``TString`` *e.g.* PSI
Instrument ``TString`` *e.g.* GPS
Muon Beam Momentum ``TMusrRunPhysicalQuantity`` *e.g.* 28.1 MeV/c
Muon Species ``TString`` poitive or negative muon
Muon Source ``TString`` *e.g.* "Target E - Low Energy Muons" or "Target M" ...
Setup ``TString``
Comment ``TString``
Sample Name ``TString``
Sample Temperature ``TMusrRunPhysicalQuantity`` *e.g.* 3.21 +- 0.05 K; SP: 3.2; CF1
Sample Magnetic Field ``TMusrRunPhysicalQuantity`` *e.g.* 350.002 +- 0.005 G; SP: 350; WEW
No of Histos ``Int_t``
Time Resolution ``TMusrRunPhysicalQuantity`` *e.g.* 0.1953125 ns
RedGreen Offsets ``TIntVector`` *e.g.* 0; 20
========================== ============================= =====================================================
.. _detector-info-required:
DetectorInfo (Required)
-----------------------
The ``DetectorInfo`` is organized in a sub-tree like
::
DetectorInfo ---|
|- Detector001
|- Detector002
...
For each histogram in the ``histos/DecayAnaModule`` corresponds detector entry here.
The numbering of the detectors has to correspond the its histogram, *e.g.* ``hDecay023 <=> Detector023``, *i.e.* potentially discontinuous to show red / green breaks.
``Detector<XXX>`` has the elements
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Name ``TString`` detector name, *e.g.* Left-NPP
Histo Number ``Int_t`` histogram number. This number corresponds to the histogram
number in the ``histos/DecayAnaModule`` sub-tree.
Histo Length ``Int_t`` length of the histogram (in bins)
Time Zero Bin ``Double_t`` The type is ``Double_t`` since for the high-field spectrometer
at PSI an ``Int_t`` representation would be not good enough.
First Good Bin ``Int_t``
Last Good Bin ``Int_t``
========================== ============================= =====================================================
.. _sample-environment-info-required:
SampleEnvironmentInfo (Required)
--------------------------------
Here only a single entry is required, namely
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Cryo ``TString`` name of the used cryostat/oven, *e.g.* ``Konti-2``
========================== ============================= =====================================================
.. _magnetic-field-environment-info-required:
MagneticFieldEnvironmentInfo (Required)
---------------------------------------
Here only a single entry is required, namely
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Magnet Name ``TString`` name of the used magnet, *e.g.* ``WEW``.
In case of ZF measurements, there might be an entry like ZF.
========================== ============================= =====================================================
.. _beamline-info-required:
BeamlineInfo (Required)
-----------------------
Here only a single entry is required, namely
========================== ============================= =====================================================
Name Internal Type Comment
========================== ============================= =====================================================
Name ``TString`` name of the beamline, *e.g.* ``piM3.2``
========================== ============================= =====================================================
Exhaustive MusrRoot Tree Including Everything Required
------------------------------------------------------
Here it is assumed that there are hypothetical *red / green data* with electric field on/off and light on/off,
and hence 4 data sets per detector, and 8 detectors of the instrument: ``left/forward``, ``top/forward``, ``right/forward``,
``bottom/forward``, ``left/backward``, ``top/backward``, ``right/backward``, ``bottom/backward``. To show the whole
tree structure, it will be split in the representation afterwards, but keep in mind: this will be all part of a
single ``MusrRoot`` file. I will add comments in the tree structure by the symbol ``#``. Lets start with the |mgr|\SR data histograms:
::
histos -|
|- DecayAnaModule -|
|- hDecay001 # left/forward, electric field off, light off
|- hDecay002 # top/forward, electric field off, light off
|- hDecay003 # right/forward, electric field off, light off
|- hDecay004 # bottom/forward, electric field off, light off
...
|- hDecay007 # right/backward, electric field off, light off
|- hDecay008 # bottom/backward, electric field off, light off
|- hDecay011 # left/forward, electric field on, light off
|- hDecay012 # top/forward, electric field on, light off
|- hDecay013 # right/forward, electric field on, light off
|- hDecay014 # bottom/forward, electric field on, light off
...
|- hDecay017 # right/backward, electric field on, light off
|- hDecay018 # bottom/backward, electric field on, light off
|- hDecay021 # left/forward, electric field off, light on
|- hDecay022 # top/forward, electric field off, light on
|- hDecay023 # right/forward, electric field off, light on
|- hDecay024 # bottom/forward, electric field off, light on
...
|- hDecay027 # right/backward, electric field off, light on
|- hDecay028 # bottom/backward, electric field off, light on
|- hDecay031 # left/forward, electric field on, light on
|- hDecay032 # top/forward, electric field on, light on
|- hDecay033 # right/forward, electric field on, light on
|- hDecay034 # bottom/forward, electric field on, light on
...
|- hDecay037 # right/backward, electric field on, light on
|- hDecay038 # bottom/backward, electric field on, light on
...
*Comments*: as can be seen the histograms are continuous numbered until there is a red / green mode switch where
the histogram number "jumps" (*e.g.* from ``008`` to ``011``). In order to fill in the different red / green
histograms an offset is added (here 10, 20, and 30).
Next the whole ``RunHeader``. Here the information will be grouped in different folders collecting related information,
like general run info, detector info, sample and magnetic field environment info, beamline info, etc.
::
RunInfo:
000 - Version: $Id: TMusrRunHeader.cpp 5092 2012-03-13 07:47:00Z nemu $ -@0
001 - Generic Validator URL: http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRoot.xsd -@0
002 - Specific Validator URL: http://lmu.web.psi.ch/facilities/software/MusrRoot/Validation/MusrRootLEM.xsd -@0
003 - Generator: nemu_analyzer -@0
004 - File Name: lem12_his_0234.root -@0
005 - Run Title: here comes the run title -@0
006 - Run Number: 234 -@1
007 - Run Start Time: 2012-04-19 14:25:22 -@0
008 - Run Stop Time: 2012-04-19 19:13:47 -@0
009 - Run Duration: 17305 sec -@3
010 - Laboratory: PSI -@0
011 - Instrument: LEM -@0
012 - Muon Beam Momentum: 28.1 MeV/c -@3
013 - Muon Species: positive muon -@0
014 - Muon Source: target E -@0
015 - Setup: a very special setup -@0
016 - Comment: nothing more to be said -@0
017 - Sample Name: the best ever -@0
018 - Sample Temperature: 3.21 +- 0.05 K; SP: 3.2 -@3
019 - Sample Magnetic Field: 350.002 +- 0.005 G; SP: 350 -@3
020 - No of Histos: 8 -@1
021 - Time Resolution: 0.1953125 ns; TDC 9999 -@3
022 - RedGreen Offsets: 0; 10; 20; 30
DetectorInfo:
Detector001:
023 - Name: Left/Forward - electric field off, light off -@0
024 - Histo Number: 1 -@1
025 - Histo Length: 66661 -@1
026 - Time Zero Bin: 3419.000000 -@2
027 - First Good Bin: 3419 -@1
028 - Last Good Bin: 66661 -@1
Detector002:
029 - Name: Top/Forward - electric field off, light off -@0
030 - Histo Number: 2 -@1
031 - Histo Length: 66661 -@1
032 - Time Zero Bin: 3419.000000 -@2
033 - First Good Bin: 3419 -@1
034 - Last Good Bin: 66661 -@1
...
Detector038:
213 - Name: Bottom/Backward - electric field on, light on -@0
214 - Histo Number: 38 -@1
215 - Histo Length: 66661 -@1
216 - Time Zero Bin: 3419.000000 -@2
217 - First Good Bin: 3419 -@1
218 - Last Good Bin: 66661 -@1
SampleEnvironmentInfo:
219 - Cryo: Konti-1 -@0
220 - Insert: X123 -@0
221 - Orientation: c-axis perp spin, perp field. spin perp field -@0
MagneticFieldEnvironmentInfo:
222 - Magnet Name: WEW -@0
223 - Current: 17.34 A -@3
BeamlineInfo:
224 - Name: muE4 -@0
ScalerInfo:
225 - Ip: 12332123 -@1
RunSummary:
0000 - Wed Oct 5 01:30:37 2011 Run 2856 started.
0001 - Wed Oct 5 02:02:51 2011 Run 2856 stopped.
0002 -
0003 - LCO, T=170.02(K), wTF ~30(G)/5.18(A), Tr/Sa=15.02/8.50(kV), E=5.63(keV), LEDb off, BP off
0004 - =========================================================================================
0005 -
0006 - #BUC---- B e g i n of User Comment ------ Do not edit this line
0007 - #EUC---- E n d of User Comment ------ Do not edit this line
0008 -
0009 - ====================== E v e n t definition =========================
0010 -
0011 - Events:
0012 - Event_0: (BC)-MCP1-(e+); Event_1:( BC)-TD-MCP2-(e+); Event_2: LEmuSR, (BC)-TD-e
...
*Comment*: the last sub-tree ``RunSummary`` is not following ``TMusrRunHeader`` rule ``<number> - <label>: <value> -@<type>``.
It is added in the instrument analyzer directly by other means than the ``TMusrRunHeader::Set``-method. This is no problem!
Since ``RunSummary`` is not part of the required ``MusrRoot``-file. One is quite free in adding any ROOT based information here.
.. index:: MusrRoot-TMusrRunPhysicalQuantity
.. _musr-run-physical-quantity:
TMusrRunPhysicalQuantity - Possible Representations
---------------------------------------------------
A physical property can be described as
::
<property name>: <value> +- <estimated error> <unit>; SP: <demand>; <description>
where ``<property name>`` is the name of the quantity, *e.g.* Sample Temperature, ``<value>`` the value
of the quantity, ``<estimated error>`` the error estimate, *e.g.* the standard deviation, ``<unit>`` the unit,
*e.g.* K, ``<demand>`` a demand value, *e.g.* the set point of the temperature. ``<description>`` is a
possible additional comment for this quantity.
.. note::
Not *all* of these quantities are always needed. The list of handled combination are given
hereafter together with the ``C++`` code snipped how to set it. It is assumed that ``TMusrRunPhysicalQuantity prop;``
is somewhere defined.
**Possibility 1**
::
<property name>: <value> <unit> [; <description>]
Code snippet:
.. code-block:: c++
prop.Set("Muon Beam Momentum", 28.1, "MeV/c");
header->Set("RunInfo/Muon Beam Momentum", prop);
prop.Set("Time Resolution", 0.1953125, "ns", "TDC 9999");
header->Set("RunInfo/Time Resolution", prop);
Result in the ``RunHeader/RunInfo``:
::
011 - Muon Beam Momentum: 28.1 MeV/c -@3
013 - Time Resolution: 0.1953125 ns; TDC 9999 -@3
The number on front of the token (*e.g.* ``011`` in front of Muon Beam Momentum) will depend on the position where
the entry has been added. The last token, ``-@3``, is the encoding of the type: here ``TMusrRunPhysicalQuantity``.
**Possibility 2**
::
<property name>: <val> +- <err> <unit>[; <description>]
Code snippet:
.. code-block:: c++
prop.Set("CF3", MRH_UNDEFINED, 3.27, 0.09, "K", "strange temperature");
header->Set("SampleEnvironmentInfo/CF3", prop);
Result in the ``RunHeader/SampleEnvironmentInfo``:
::
033 - CF3: 3.27 +- 0.09 K; strange temperature -@3
**Possibility 3**
::
<property name>: <val> <unit>; SP: <demand>[; <description>]
Code snippet:
.. code-block:: c++
prop.Set("CF4", 3.25, 3.28, "K");
header->Set("SampleEnvironmentInfo/CF4", prop);
prop.Set("CF5", 3.26, 3.29, "K", "another strange temperature");
header->Set("SampleEnvironmentInfo/CF5", prop);
Result in the ``RunHeader/SampleEnvironmentInfo``:
::
034 - CF4: 3.28 K; SP: 3.25 -@3
035 - CF5: 3.29 K; SP: 3.26; another strange temperature -@3
**Possibility 4**
::
<property name>: <value> +- <estimated error> <unit>; SP: <demand>; <description>
Code snippet:
.. code-block:: c++
prop.Set("Sample Magnetic Field", 350.0, 350.002, 0.005, "G", "WXY");
header->Set("RunInfo/Sample Magnetic Field", prop);
Result in the ``RunHeader/SampleEnvironmentInfo``:
::
017 - Sample Magnetic Field: 350.002 +- 0.005 G; SP: 350.0; WXY -@3

View File

@ -0,0 +1,523 @@
.. include:: <isogrk1.txt>
.. index:: musredit
.. _musredit-sec:
``musredit``: the GUI Based Interface to ``musrfit``
====================================================
Introduction
------------
.. _Qt: https://qt.io
``musredit`` is an editor which also provide a graphical user interface to the programs contained in the ``musrfit`` suite and are intended
to help the user handle ``musrfit`` msr files. It is implemented in ``C++`` and use the `Qt`_ framework. ``musredit`` is based on Qt 4.6, Qt 5.6 (or above), or Qt6.x.
The Qt 5.6 and Qt 6.x version of ``musredit`` will be actively developed, whereas the Qt 4.x version will only get bug fixing and eventually will be dropped.
On this documentation page only the features related to ``musrfit`` are described — the basic editor functions which should be self-explanatory are *not*.
``musrgui`` is an outdated early version of ``musredit`` and will not described anymore. If still in use, the user is urged to switch to ``musredit``.
.. note::
Before going on using ``musredit`` it is strongly recommended to read the :ref:`manual of musrfit <user-manual>` first!
Available Executable, Configuration Files and their Basic Usage
----------------------------------------------------------------
musredit (musrgui)
++++++++++++++++++
``musredit`` (``musrgui``) is the editor executable. If called from within a shell it accepts a few optional parameters:
**<msr-files>**
File names of the msr files that should be opened in separate editor tabs on startup of ``musredit``.
**- -help**
Displays a small help notice in the shell explaining the basic usage of the program.
**- -version**
Prints the version number of ``musredit``.
If called without any parameters an empty editor window opens.
.. index:: musredit_startup
musredit_startup.xml
++++++++++++++++++++
``musredit_startup.xml`` is the configuration file located under ``$HOME\.musrfit\musredit``. It is also possible to have another version
of this file in the working directory which then will be used!
In this file the following ``XML`` tags are allowed to define settings and might proof useful for all users of ``musredit``:
**<general></general>**
set the default paths to executable and files in this environment
**<exec_path>PATH_TO_EXEC</exec_path>**
set the path ``PATH_TO_EXEC`` where the executable ``musrfit``, ``musrview``, ``musrt0``, etc. can be found (inside the ``<general>`` environment)
**<default_save_path>SAVE_PATH</default_save_path>**
specify the path ``SAVE_PATH`` where ``musredit`` point by default when opening and saving msr files (inside the ``<general>`` environment). Default is the current directory.
**<msr_default_file_path>MSR_DEF_PATH</msr_default_file_path>**
set the path ``MSR_DEF_PATH`` where the default msr files provided by ``musredit`` are stored (inside the ``<general>`` environment)
**<timeout>3600</timeout>**
timeout in seconds after which :ref:`musrview <musrview>` canvas will automatically quit. A value of 0 or
a negative number will keep the ``musrview`` canvas open without self-determination.
**<keep_minuit2_output>y/n</keep_minuit2_output>**
flag indicating if the ``MINUIT2`` output shall be kept per msr-file ('y') or only for the current msr-file ('n').
**<dump_ascii>y/n</dump_ascii>**
flag indicating if ``musrfit`` shall dump fit data into ascii format. See help of :ref:`musrfit <musrfit>`.
**<dump_root>y/n</dump_root>**
flag indicating if ``musrfit`` shall dump fit data into root format. See help of :ref:`musrfit <musrfit>`.
**<title_from_data_file>y/n</title_from_data_file>**
specify if ``musrfit`` should be called with the ``-t`` option by default (inside the ``<general>`` environment)
**<chisq_pre_run_block>y/n</chisq_pre_run_block>**
flag indicating if per-run chisq shall be written into the msr-output-file.
**<estimate_n0>y/n</estimate_n0>**
flag indicating if for a single histogram fit :math:`N_0` shall be estimated before the fit procedure starts.
**<musrview_show_fourier>y/n</musrview_show_fourier>**
flag indicating if ``musrview`` will directly present the Fourier transform rather than the time domain data.
**<musrview_show_avg>y/n</musrview_show_avg>**
flag indicating if ``musrview`` will directly present averaged data, typically used for Fourier power spectra.
**<enable_musrt0>y/n</enable_musrt0>**
specify if :ref:`musrt0 <musrt0>` can be called from within ``musredit`` (inside the ``<general>`` environment)
**<font_settings></font_settings>**
set the default font in this environment
**<font_name>FONT</font_name>**
specify the name of the font ``FONT`` to be used by default in ``musredit`` (inside the ``<font_settings>`` environment)
**<font_size>N</font_size>**
specify the size ``N`` of the font to be used by default in ``musredit`` (inside the ``<font_settings>`` environment)
**<msr_file_defaults></msr_file_defaults>**
put the default settings for newly created msr files in this environment
**<beamline>BL</beamline>**
set the name of the muon beamline ``BL`` here (inside a ``<msr_file_defaults>`` environment)
**<institute>INST</institute>**
set the name of the facility ``INST`` where the beamline ``BL`` is located. Valid settings are ``PSI``, ``RAL``, ``JPARC``, and ``TRIUMF`` (inside a ``<msr_file_defaults>`` environment)
**<file_format>FF</file_format>**
specify the default data file format ``FF`` here. Valid formats are ``NEXUS``, ``MUSR-ROOT``, ``ROOT-NPP``, ``ROOT-PPC``, ``PSI-BIN``, ``PSI-MDU``, ``MDU-ASCII``, ``WKM``, ``MUD``, ``ASCII``, and ``DB`` (inside a ``<msr_file_defaults>`` environment)
**<lifetime_correction>y/n</lifetime_correction>**
choose if by default the ``lifetimecorrection`` option should be set (inside a ``<msr_file_defaults>`` environment)
**<msr2data_defaults></msr2data_defaults>**
define the default options for calling :ref:`msr2data <msr2data>` in this environment; the options set here are ticked by default in the graphical interface of ``musredit``.
**<chain_fit>y/n</chain_fit>**
(un)set the chain fit (!) option (inside a ``<msr2data_defaults>`` environment)
**<write_data_header>y/n</write_data_header>**
(un)set the noheader option (inside a ``<msr2data_defaults>`` environment)
**<ignore_data_header_info>y/n</ignore_data_header_info>**
(un)set the nosummary option (inside a ``<msr2data_defaults>`` environment)
**<keep_minuit2_output>y/n</keep_minuit2_output>**
(un)set the ``-k`` option (inside a ``<msr2data_defaults>`` environment)
**<write_column_data>y/n</write_column_data>**
(un)set the ``data`` option (inside a ``<msr2data_defaults>`` environment)
**<create_msr_file_only>y/n</create_msr_file_only>**
(un)set the ``msr`` option in case a template run is specified (inside a ``<msr2data_defaults>`` environment)
**<fit_only>y/n</fit_only>**
(un)set the ``fit`` option in case no template run is specified (inside a ``<msr2data_defaults>`` environment)
**<global>y/n</global>**
(un)set the ``global`` option (inside a ``<msr2data_defaults>`` environment)
**<global_plus>y/n</global_plus>**
(un)set the ``global+`` option (inside a ``<msr2data_defaults>`` environment)
**<recreate_data_file>y/n</recreate_data_file>**
(un)set the ``musredit`` option for recreating the output file (inside a ``<msr2data_defaults>`` environment)
**<open_file_after_fitting>y/n</open_file_after_fitting>**
(un)set the ``musredit`` option for opening msr files after fitting (inside a ``<msr2data_defaults>`` environment)
Additionally, there are some settings defined in this XML file which should be only changed by experienced users who like to add new features to ``musredit``:
**<help_section></help_section>**
define various help messages in this environment
**<musr_web_X>LINK</musr_web_X>**
define the ``LINK`` to the help page ``musr_web_X``, where ``X`` is ``main``, ``title``, ``parameters``, ``theory``, ``functions``, ``run``,
``command``, ``fourier``, ``plot``, ``statistics``, ``msr2data``, or ``musrFT`` (inside a ``<help_section>`` environment)
**<func_pixmap_path>PIX_PATH</func_pixmap_path>**
set the path ``PIX_PATH`` to LaTeX pixmaps visualizing the various supported theory functions
**<theory_functions></theory_functions>**
define the functions for a msr file's :ref:`THEORY block <msr-theory-block>` according to the correct syntax in this environment
**<func></func>**
specify a function here (inside a ``<theory_functions>`` environment)
**<name>NAME</name>**
the ``NAME`` of the function in the msr file (inside a ``<func>`` environment)
**<comment>COMMENT</comment>**
description of the used parameters (inside a ``<func>`` environment)
**<label>LABEL</label>**
``LABEL`` of the function in the ``musredit`` menu (inside a ``<func>`` environment)
**<pixmap>PIXMAP</pixmap>**
LaTeX picture used to describe the function and stored in the ``PIX_PATH`` (inside a ``<func>`` environment)
**<params>N</params>**
number of parameters ``N`` used by the function (inside a ``<func>`` environment)
An example of the ``musredit_startup.xml`` looks like:
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?>
<musredit_startup xmlns="http://lmu.web.psi.ch/musrfit/user/MUSR/MusrGui.html">
<comment>
This is handling default setting parameters for the musredit.
</comment>
<general>
<exec_path>/usr/local/root/bin</exec_path>
<default_save_path>./</default_save_path>
<msr_default_file_path>/usr/local/root/share/doc/musrfit/templates</msr_default_file_path>
<timeout>3600</timeout>
<keep_minuit2_output>n</keep_minuit2_output>
<dump_ascii>n</dump_ascii>
<dump_root>n</dump_root>
<title_from_data_file>y</title_from_data_file>
<chisq_per_run_block>n</chisq_per_run_block>
<estimate_n0>y</estimate_n0>
<musrview_show_fourier>n</musrview_show_fourier>
<musrview_show_avg>n</musrview_show_avg>
<enable_musrt0>y</enable_musrt0>
</general>
<recent_files>
<path_file_name>/usr/local/root/share/doc/musrfit/examples/test-histo-PSI-BIN.msr</path_file_name>
</recent_files>
<help_section>
<musr_web_main>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html</musr_web_main>
<musr_web_title>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheTitle</musr_web_title>
<musr_web_parameters>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheFitparameterBlock</musr_web_parameters>
<musr_web_theory>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheTheoryBlock</musr_web_theory>
<musr_web_functions>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheFunctionsBlock</musr_web_functions>
<musr_web_run>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheRunBlock</musr_web_run>
<musr_web_command>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheCommandsBlock</musr_web_command>
<musr_web_fourier>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheFourierBlock</musr_web_fourier>
<musr_web_plot>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#ThePlotBlock</musr_web_plot>
<musr_web_statistic>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#TheStatisticBlock</musr_web_statistic>
<musr_web_msr2data>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/Msr2Data.html</musr_web_msr2data>
<musr_web_musrFT>file:///usr/local/root/share/doc/musrfit/html/user/MUSR/MusrFit.html#A_2.3_musrFT</musr_web_musrFT>
</help_section>
<font_settings>
<font_name>Monospace</font_name>
<font_size>12</font_size>
</font_settings>
<msr_file_defaults>
<beamline>mue4</beamline>
<institute>psi</institute>
<file_format>musr-root</file_format>
<lifetime_correction>y</lifetime_correction>
</msr_file_defaults>
<msr2data_defaults>
<chain_fit>y</chain_fit>
<write_data_header>y</write_data_header>
<ignore_data_header_info>n</ignore_data_header_info>
<keep_minuit2_output>n</keep_minuit2_output>
<write_column_data>n</write_column_data>
<recreate_data_file>n</recreate_data_file>
<open_file_after_fitting>y</open_file_after_fitting>
<create_msr_file_only>n</create_msr_file_only>
<fit_only>n</fit_only>
<global>n</global>
<global_plus>n</global_plus>
</msr2data_defaults>
<func_pixmap_path>/usr/local/root/share/doc/musrfit/latex_images</func_pixmap_path>
<theory_functions>
<func>
<name>asymmetry</name>
<comment></comment>
<label>Asymmetry</label>
<pixmap>asymmetry.png</pixmap>
<params>1</params>
</func>
<func>
<name>statGssKT</name>
<comment>(rate)</comment>
<label>static Gauss KT</label>
<pixmap>statGssKT.png</pixmap>
<params>1</params>
</func>
</theory_functions>
</musredit_startup>
.. index:: musredit-features
musredit Features
-----------------
The features of ``musrfit`` which can be accessed by the graphical front ends ``musredit`` will be described in the following. All functions
can either be called by choosing them from the *MusrFit menu*, by clicking the respective button in the *MusrFit bar*, or by using a *keyboard shortcut*.
**musrWiz**
.. image:: ../images/musrWiz.*
``musrWiz`` is a helper programs which allows to create a msr-file from scratch without too much a priori knowledge. For details see :ref:`musrWiz <musrWiz>`.
.. index:: musrWiz
.. _musrWiz:
**Calculate Chisq**
.. image:: ../images/musrchisq.*
Calls ``musrfit`` with the option ``-c``, *i.e.* calculates the :math:`\chi^2` or log max-likelihood for the active msr file tab. Shortcut-key: ``Alt+C``.
The equivalent call on the command line would be
.. code-block:: bash
$ musrfit -c <msr-file>
**Fit**
.. image:: ../images/musrfit.*
Calls ``musrfit`` for fitting of the active msr file in the currently active tab. Shortcut-key: ``Alt+F``.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrfit <msr-file> [optional parameters]
The optional parameters may be chosen under :ref:`Preferences <musredit-prefs>`. For further information refer to the manual of :ref:`musrfit <user-manual>`.
**Swap Msr <-> Mlog**
.. image:: ../images/musrswap.*
Swap the msr and mlog files. *E.g.*, for a file called ``8472_zf.msr``, this is copied to ``8472_zf.mlog`` and vice versa. Shortcut-key: ``Alt+S``.
**Set Steps**
.. image:: ../images/musrStep.*
``musrStep`` allows to adjust the step size, *i.e.* the initial steps for the fitter. Shortcut-key: ``Alt+P``.
**Msr2Data**
.. image:: ../images/msr2data.*
Opens a graphical interface to the ``msr2data`` program described in detail in its :ref:`own manual <msr2data>`. Shortcut-key: ``Alt+2``.
**mupp**
.. image:: ../images/mupp.*
Application which allows to plot ``*.db`` and ``*.dat`` parameter files. Shortcut-key: ``Alt+U``.
For a detailed description see the :ref:`mupp docu <mupp>`.
**View2Dat**
.. image:: ../images/musrview2dat.*
Used to export the data of a collection of msr-files. Essentially the same as calling ``musrview`` and selecting ``Export Data``, but
all in the background, with the option to feed a collection of msr-files, rather than going through this process one after the other.
Why you might want to do that? You might want to use another plotting program (not ROOT) to present your data.
**View**
.. image:: ../images/musrview.*
Calls ``musrview`` from the active tab of ``musredit``. For more details see the :ref:`musrview <musrview>` docu. Shortcut-key: ``Alt+V``.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrview <msr-file> [optional parameters]
**T0**
.. image:: ../images/musrt0-icon.*
Calls ``musrt0`` which allows to set the ``T0`` values for all the runs. For more details see the :ref:`musrt0 <musrt0>` docu.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrt0 <msr-file> [optional parameters]
**Raw Fourier**
.. image:: ../images/musrFT.*
Calls ``musrFT`` which allows to perform a Fourier transform of the raw data. For more details see the :ref:`musrFT <musrFT>` docu.
The equivalent call on the command line could look like
.. code-block:: bash
$ musrFT <msr-file> [optional parameters]
.. _musredit-prefs:
**Preferences**
.. image:: ../images/musrprefs.*
Opens a window in which the optional parameters that should be passed to musrfit can be chosen.
For further information refer to the manual of :ref:`musrfit <musrfit>`.
**Dump Header**
.. image:: ../images/musrdump.*
Opens a file dialog which allows to select a |mgr|\SR data file. When this file can be read, the run header info is dumped into a dialog window.
Essentially this calls ``dump_header`` internally.
musrWiz
-------
``musrWiz`` is a helper program which allows to easily create the necessary msr-file needed as an input for ``musrfit``.
``musrWiz`` is still in it's early stage; not all options are already implemented and here and there you will likely find some bugs.
From ``musredit`` it can be accessed via the MusrFit menu or the wand
.. image:: ../images/musredit-musrWiz.*
The ``musrWiz`` GUI is organized in a couple of different dialogues which some information needs to be provided by the user.
In the following these different dialogues will be discussed briefly.
.. index:: musrWiz-Introduction
musrWiz-Introduction
++++++++++++++++++++
The introduction dialogue
.. image:: ../images/musrWiz-Intro.*
#. an explicit msr-file name can be provided here. More often the msr-file name is generated out of the run number.
#. year of the run data.
#. run number. If no explicit msr-file is provided, the run number together with fit type and type of measurement will be used to generate the msr-file name.
#. from the pull down menu the institute (for which a necessary ``xml``-file is provided) has to be choosen.
#. from the pull down menu the the instrument can be chosen.
#. the fit type has to be chosen. Possible fit types are: ``Single Histo`` / ``Single Histo RRF`` / ``Asymmetry`` / ``Asymmetry RRF`` / ``Mu Minus`` / ``None muSR``
#. type of measurement is essentially needed for the grouping of the detectors. Possible are: ``ZF`` for zero field measurements / ``TF`` for transverse field measurements / ``LF`` for longitudinal field measurements.
Depending on the choice and instrument some additional question might be asked, *e.g.* which magnet has been used.
#. ``T0``'s: this last menu defines from where to get the t0's. The options are: ``from data file``, *i.e.* the t0 are assumed to be correctly set
in the provided data file ``call musrT0``, *i.e.* after the msr-file is generated, ``musrt0`` will be called which allows the user to find the
proper t0 from the prompt peak ``enter here`` will provide a pop-up menu where the t0 parameter can be given explicitly.
If all this information have been provided ``Next>`` will lead you the the theory dialogue.
.. index:: musrWiz-Theory
musrWiz - Theory
++++++++++++++++
The theory dialogue is used to define the fitting function. There are two ways of using it:
#. choose a template theory function. This option has the advantage that the next steps will be very easy because
within the template almost everything is already pre-defined. The disadvantage is that you are not free in setting
up your theory function as you would like to have.
#. freely write your theory function. The advantage here is that you can customize your theory function at your needs.
This will come at the cost that you also will need to define ``maps``, ``functions``, etc. yourself. The good thing
though is that at the very end you can save this as a template for future re-use.
First the template path will be described. The theory dialogue looks like this
.. image:: ../images/musrWiz-Theory.*
#. This is a text edit field were you can enter the theory fit function as you would like to have it. In the example
given the theory reads :math:`p1 \exp(-p2\, t) \cos(2 \pi\, f1 + m1)`, where ``pX`` stands for parameter, ``fX`` for function,
``mX`` for map, and ``X`` for the corresponding number.
#. The ``Clear All`` button will clear whatever you entered in the text field above.
#. This pull-down menu allows to select a theory function which will be added to the text field above by pressing
the ``Add`` button. Pre defined theory function starting with a ``T`` are templates rather than only theory function strings.
#. The ``Add`` button is used to add the chosen theory function / template from the pull-down menu to its left.
#. The ``Check`` button is used to make a syntactical check of whatever is written in the text edit field.
.. index:: musrWiz-Functions
musrWiz - Functions
+++++++++++++++++++
In the Functions dialogue all the necessary functions can be entered. A function operates *only* on fitting parameters.
This is different to the theory function which operates on the fitting parameters and the time. The dialogue looks like this
.. image:: ../images/musrWiz-Functions.*
#. a text edit field in which the various needed functions can be entered. In case a template theory is used, the appropriate function should be shown here and *no* editing will be needed here.
#. pressing ``Show Theory`` button will pop-up a little window showing the previously entered theory function. This is handy when defining its own theory, *i.e.* not working with a template.
.. image:: ../images/musrWiz-Functions-and-Theory.*
.. index:: musrWiz-Maps
musrWiz - Maps
++++++++++++++
.. image:: ../images/musrWiz-Maps.*
The map dialogue will list the maps previously used in the theory and functions blocks/dialogues before. Again, if a template is used, nothing needs to be entered here.
#. The ``Show Theory`` button allows to show the currently defined theory and the functions.
.. index:: musrWiz-FitParam
musrWiz - Fit Parameters
++++++++++++++++++++++++
.. image:: ../images/musrWiz-FitParam.*
In the fit parameter dialogue all parameter names can be defined. Furthermore the starting values for the parameters, the step
(initial step size for the parameter fit), and any boundaries can be defined here.
#. The ``Show Theory`` button allows to show the currently defined theory and the functions.
.. index:: musrWiz-FitInfo
musrWiz - Fit Info
++++++++++++++++++
Collects all the ``musrfit`` and ``MINUIT2`` specific fit commands.
.. image:: ../images/musrWiz-FitInfo.*
#. allows to define the time fit range (start time, end time).
#. packing defines how many bins of the original data shall be combined (added, also called re-binning).
#. in this text field to fitting commands are given (see the ``MINUIT`` and :ref:`musrfit <msr-commands-block>` manual for details).
.. index:: musrWiz-Create
musrWiz - Create
++++++++++++++++
Collects the last necessary information before creating the msr-file.
.. image:: ../images/musrWiz-Create.*
#. shows the path where the msr-file will be saved. If you would like to save it somewhere else press the ``Save As (msr-file path)`` button.
#. pressing this button will allow you to find the path where to save the msr-file.
#. pressing this button will save to current configuration as a template for future re-use.
.. index:: musrStep
musrStep
--------
``musrStep`` is a little helper program which allows to reset the initial step size. This sometimes comes very handy if working on an instrument
with many detectors after a fit slightly went wrong leaving you with a far too small initial step size for further iterations. To edit all the steps
individually is tedious and error prone. Here ``musrStep`` can help.
.. image:: ../images/musrStep-GUI.*
When invoking ``musrStep`` the above dialogue will popup
#. shows the relevant parts of the FITPARAMETER block. The only editable column is step.
#. ``Check Specific`` will popup a dialogue where a template string can be entered, *e.g.* ``Asym``. As a result all fit parameters containing the template string will be selected.
#. ``Check All`` will select all fit parameters.
#. ``Uncheck All`` will unselect all fit parameters.
#. ``Modify Automatic`` will change all the step values automatically. It basically sets all the step sizes to 1% of
the corresponding fit parameter value, except the phases where the step will be set to a value of 5 degrees.
#. ``Modify Selected`` will start the dialogue shown beneath. Follow the description there.
#. ``Save&Quit`` will save the current step values, close the dialogue and reload the modified msr-file.
#. ``Cancel`` will cancel the ``musrStep`` dialogue without modifying anything.
.. image:: ../images/musrStep-Modify-Selected.*
When clicking on ``Modify Selected`` the above dialogue will be presented. It allows to manipulate all selected fit parameter step values according to the following rules
#. ``Scale by Factor`` will scale the step value by the factor given in the field (2). If the ``Absolute Value`` check box is selected, rather than scaling the factor value will be used to modify the step value.
#. scaling factor or absolute value to modify the step values of the selected fit parameters.
#. checking the ``Absolute Value`` check box will change the meaning from *Scale by Factor* to *Copy Factor Value*.
#. ``Scale Automatically`` will modify the step values of the selected fit parameters according to the rules described before.
#. ``Cancel`` will cancel the dialogue.

View File

@ -0,0 +1,273 @@
.. include:: <isogrk1.txt>
.. index:: dks
.. _setup-dks:
Setting up ``musrfit`` / ``DKS``: High Speed Fitting with GPU's
===============================================================
In the years 2016/2017 we explored ways to speed up current fitting frameworks, especially ``musrfit.``
This allows now to analyze histogram sets of high field spectrometers like ``HAL-9500`` at PSI without
the *error-prone* RRF fitting (see U. Locans and A. Suter,
`musrfit - Real Time Parameter Fitting Using GPU <http://dx.doi.org/10.7566/JPSCP.21.011051>`_, and the
Memo from A. Suter, "Rotating Reference Frame Fits", in the ``musrfit`` source code). At the same time
it can help to speed-up elaborate global fits tremendously, and dealing properly with muonium. It also
allows Apple macOS users to speed up their fitting code on the CPU. Currently it is not straight forward
to get ``musrfit`` multi-threaded under macOS since Apple doesn't be default support ``OpenMP``. ``DKS``
enables ``musrfit`` to utilize ``OpenCL`` instead which is present on macOS by default.
.. warning::
Before you run into the shop to buy a gamer graphic card or a Tesla card, make sure that you have an
appropriate server with a sufficiently strong power supply!
.. note::
However, the current ``musrfit/DKS`` version doesn't yet support all theory functions on the GPU.
In case the theory function is not yet available for the GPU, ``musrfit`` will fall back to the CPU implementation.
Conceptually the setup of ``musrfit/DKS`` is as following:
#. install the latest hardware driver for your graphic card.
#. install the GPU SDK which enables number crunching (``CUDA`` for NVIDIA, ``OpenCL`` for AMD)
#. install ``DKS``
#. install the ``musrfit`` version which is ``DKS`` ready
In the following the description for the installation of ``musrfit/DKS`` for the following systems will be discussed in some more detail:
* NVIDIA Tesla K40c
* AMD Graphic Card (Radeon R9 390X)
* macOS in order to get ``OpenCL`` support
The usage of ``musrfit`` with GPU acceleration and ``OpenCL`` support is described in the
:ref:`User manual of the μSR data analysis software musrfit <user-manual>`. The additional
``musrfit/DKS`` are found :ref:`here <msr-commands-block-dks>`.
.. index:: dks-setup-tesla
Setting up ``musrfit/DKS`` for a Tesla K40c (NVIDIA)
----------------------------------------------------
It is assumed that the Tesla K40c is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems
see the card, enter the following command in the terminal:
.. code-block:: bash
$ lspci | grep NVIDIA
The response should look something like
::
05:00.0 3D controller: NVIDIA Corporation GK110BGL [Tesla K40c] (rev a1)
which means that the OS physically recognizes your card.
Driver Installation for the Tesla K40c
++++++++++++++++++++++++++++++++++++++
Next, you will need to download and install the driver for your card. Select the proper operating system,
card, etc. from the `NVIDIA download center <http://www.nvidia.com/Download/index.aspx?lang=en-us>`_. At PSI
we are running currently Red Hat Enterprise Linux 7.x (RHEL) for which we will get a ``rpm`` (something like
``nvidia-diag-driver-local-repo-rhel7-375.66-1.x86_64.rpm``). Install it and make sure there is no conflict
with the nouveau driver of the system.
.. index:: cuda-install
Installation of CUDA
++++++++++++++++++++
Download the `CUDA SDK <https://developer.nvidia.com/cuda-downloads>`_ form NVIDIA for your system. Again,
for the RHEL 7.x this is an ``rpm``. After the installation of the rpm you should reboot your machine.
Afterwards you are ready for the installation of ``DKS``.
.. index:: dks-install
Installation of DKS
+++++++++++++++++++
For the following list of commands the ``'$'`` will be given as the command prompt. *Do not enter it!*
Also some comments will be added starting with a ``'#'`` which can be omitted. They are only there to
explain what is going on. ``DKS`` stands for Dynamical Kernel Scheduler and provides a thin interface
allowing host applications to incorporate GPU's and other hardware accelerators.
Details can be found in the papers listed :ref:`here <cite>`.
In brief the installation should be something like this:
.. code-block:: bash
# go to whatever directory you would like to clone/install DKS
# For macOS DKS will likely to got to $HOME/Applications to be consistent with the musrfit docu for macOS
$ cd $HOME/Apps
$ git clone git://gitea.psi.ch:LMU/DKS.git
$ cd DKS
$ mkdir build
$ cd build
$ cmake ../ -DENABLE_MUSR=1 -DCMAKE_INSTALL_PREFIX=../exec
$ cmake --build ./ --clean-first
$ make install
Since ``DKS`` is installed in a non-standard path, a couple of additional small steps are required.
This will be different for Linux compared to macOS.
For **Linux:**
add the ``DKS`` library path to ``/etc/ld.so.conf.d/musrfit-x86_64.conf`` and execute as super user
.. code-block:: bash
$ /sbin/ldconfig
For **macOS:**
add the ``DKS`` path to ``$HOME/.profile``:
.. code-block:: bash
export DKS=$HOME/Applications/DKS/exec
export LD_LIBRARY_PATH=$DKS/lib:$LD_LIBRARY_PATH
launchctl setenv DKS $DKS
launchctl setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH
.. _musrfit-dks-install:
Installation of musrfit for DKS
+++++++++++++++++++++++++++++++
Most of the installation steps are the same as described for ``musrfit`` without GPU support.
Here only the differences are explained. First checkout ``musrfit``, then you will need to
switch the working branch which is done by
.. code-block:: bash
$ cd $HOME/Apps/musrfit
$ git checkout dks6
Install via cmake
^^^^^^^^^^^^^^^^^
There is on more configuration switch
**-Ddks=<value>**
it allows to enable/disable ``DKS`` support. The default is ``<value>=1``, *i.e.* enabled. To disable use ``<value>=0``.
For a typical setup on a RHEL or macOS system it could look like this
.. code-block:: bash
$ cmake ../ -DCMAKE_INSTALL_PREFIX=$ROOTSYS -DASlibs=1 -DBMWlibs=1 -Dnexus=1 -Ddks=1
After
.. code-block:: bash
$ cmake --build ./ --clean-first -- -j8
$ make install
and updating the shared library lookup table (*only* needed for Linux)
.. code-block:: bash
$ /sbin/ldconfig # as superuser / root
you are done with the setup.
.. index:: dks-setup-amd-graphic-card
Setting up ``musrfit/DKS`` for a AMD Graphic Card (Radeon R9 390X)
------------------------------------------------------------------
Driver Installation for an AMD Graphic Card, *e.g.* Radeon R9 390X
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
This will depend slightly on the AMD Card and operating system. Here I will summaries how it was done
on a RHEL (Linux) system using a Radeon R9 390X.
It is assumed that the Radeon R9 390X is already physically installed on your system. For now I only
will discuss to set it up for a Linux based system. In order to check that your operating systems see
the card, enter the following command in the terminal:
.. code-block:: bash
$ lspci | grep AMD
The response should look something like
::
84:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X] (rev 80)
which means that the OS physically recognizes your card.
For RHEL7.x the AMDGPU-PRO driver should be used. It can be downloaded from `AMD <http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-RedHat-Install.aspx>`_. Unpack the driver
.. code-block:: bash
$ tar -Jxvf amdgpu-pro-17.10-414273.tar.xz
$ cd amdgpu-pro-17.10-414273
Install the driver as root
.. code-block:: bash
$ ./amdgpu-pro-install --compute -y
Here I assume that the AMD graphic card is only used for computation. You need to add the following command
in order that the user **blabla** (change this to the appropriate user name) can access the GPU (otherwise
only root works):
.. code-block:: bash
$ /sbin/usermod -a -G video blabla
Reboot the machine.
AMD APP Software Development Kit (SDK) to enable ``OpenCL`` support
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The AMD APP Software Development Kit (SDK) is a complete development platform created by AMD to allow you to
quickly and easily develop applications accelerated by AMD APP technology. The SDK provides samples, documentation,
and other materials to quickly get you started leveraging accelerated compute using ``OpenCL`` or ``C++ AMP`` in your
``C/C++`` applications.
Download the AMD APP SDK 3.0 from `AMD-SDK <http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/>`_.
Extract the installer
.. code-block:: bash
$ tar -xvjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
Run the installer
.. code-block:: bash
$ ./AMD-APP-SDK-v3.0.130.136-GA-linux64.sh
This will install the AMD APP SDK to ``/opt/AMDAPPSDK-3.0/`` where you can find the ``OpenCL`` include
and library files, as well as documentation and sample code. The install guide for AMD OpenCL SDK can
be found at `AMD SDK Installation Notes <http://developer.amd.com/wordpress/media/2012/10/AMD_APP_SDK_InstallationNotes.pdf>`_.
Installation of DKS and musrfit
+++++++++++++++++++++++++++++++
To install ``DKS`` and ``musrfit`` follow the instructions :ref:`above <musrfit-dks-install>`.
.. index:: dks-opencl-macOS
Setting up ``musrfit/DKS`` for macOS for OpenCL support
-------------------------------------------------------
Since Apple is not providing an out-of-the-box ``OpenMP`` support on their macOS compiler framework (Xcode),
typically ``musrfit`` is just running *single threaded*. Here ``DKS`` can help since it delivers ``OpenCL``
support which is present on macOS. Hence, if you would like to run ``musrfit`` multi-threaded the easiest
way is to use ``DKS``.
Since there is no graphic card involved, you do not need any graphic card driver of additional SDK.
The only thing you need ``DKS`` and the proper ``musrfit`` version.
The installation instruction for ``DKS/musrfit`` can be found :ref:`here <musrfit-dks-install>`.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,417 @@
.. include:: <isogrk1.txt>
.. index:: tutorial
Tutorial for ``musrfit``
========================
Single-histogram-fit tutorial
-----------------------------
The |mgr|\SR-data-analysis process using musrfit is based on so-called msr files. These files contain all
information needed for the analysis such as names of the data files, a theory function, fit and plot parameters,
and so on. It is the idea of this page to explain the basic use of an msr file and the different programs
of the ``musrfit`` suite using the example of a single-histogram fit to time-differential transverse-field
|mgr|\SR data. For a complete description of all options please refer to the :ref:`manual <user-manual>`.
The example deals with a diamagnetic sample that has been measured in an applied field of approximately 150 G in
the `GPS spectrometer <https://www.psi.ch/smus/gps>`_ at `PSI <https://www.psi.ch>`_ using the "transverse geometry".
In this geometry the muon spin is rotated about 50° up and the field is applied parallel to the muon momentum.
Hence, the relevant positron counters (to detect the spin precession) are placed above (histogram 3), below (histogram 4) and right of (histogram 5) the sample. The run numbers start from 3110.
To analyze these data (in a simple way) one starts out from the msr file ``3110_tutorial.msr`` provided together
with the source-code distribution in the sub-directory ``doc/examples/``. This ASCII file can be edited using any
text editor. For convenience the editor ``musredit`` is provided which offer some msr-file-specific functionalities
and additionally serve as front ends to the underlying programs. In the following it is assumed that the file is
open within ``musredit``.
The msr file
++++++++++++
The msr file itself is divided into different blocks; a full description of the format can be found :ref:`here <msr-file-format>`.
In the file ``3110_tutorial.msr`` these blocks are successively:
:ref:`The title <msr-title-block>`
::
sample XYZ
A descriptive title of the file.
:ref:`The FITPARAMETER block <msr-fitparameter-block>`
::
FITPARAMETER
# No Name Value Step Pos_Error Boundaries
1 NormUp 4500 5 none 0 none
2 BgUp 200 1 none 0 none
3 PhaseUp 15 1 none
4 NormDown 4500 5 none 0 none
5 BgDown 200 1 none 0 none
6 PhaseDown 195 1 none
7 NormRight 600 5 none 0 none
8 BgRight 40 1 none 0 none
9 PhaseRight 285 1 none
10 AsymSig1 0.17 0.01 none 0 0.33
11 RateSig1 2.5 0.1 none 0 none
12 FieldSig1 100 1 none
13 AsymSig2 0.02 0.01 none 0 0.33
14 RateSig2 0.5 0.1 none
15 FieldSig2 150 1 none
The list of parameters used in the theory function to describe the set of data.
Each parameter has a number, a name, an initial value and an initial step (for
the fitting process). If a parameter should be fixed, the initial step is set
to 0. After a fit (see below), this block contains the determined parameter values
and uncertainties (in the ``Step`` column). If asymmetric errors are determined, these
will be listed in the ``Step`` column (negative) and the ``Pos_Error`` column (positive).
Optionally, lower and upper boundaries for the parameters can be specified as
shown above.
The meaning of the parameters above is explained in the following:
Since a :ref:`single-histogram fit <single-histogram-fit>` should be done, some
histogram-specific parameters are needed. These are a normalization constant (parameter 1),
a parameter describing the background of uncorrelated events (parameter 2) and the initial
phase of the spin precession with respect to the detector (parameter 3). As stated above,
there are three histograms containing useful information ("Up", "Down", "Right"); hence,
this set of parameters has to be present for each of them (parameters 19).
The remaining parameters are used to model the decay asymmetry which is assumed to be equal
for all histograms. In this example one has two signals (*e.g.* from the sample and the
sample holder), each with an amplitude (parameters 10 and 13), a depolarization rate
(parameters 11 and 14) and a mean field (here given in Gauss, parameters 12 and 15).
:ref:`The THEORY block <msr-theory-block>`
::
THEORY
asymmetry 10
simplExpo 11 (rate)
TFieldCos map1 fun1 (phase frequency)
+
asymmetry 13
simpleGss 14 (rate)
TFieldCos map1 fun2 (phase frequency)
The THEORY block is used to define a fit-parameter-dependent theory function used to model
the decay asymmetry. Different :ref:`predefined <msr-theory-block>` and :ref:`user-defined <user-functions>`
functions can be combined here. Theory lines following each other are *multiplied* and the **+** sign
is used to add different (here: two) signal contributions. The numbers are the parameter numbers
according to the ``FITPARAMETER block``. ``map`` and ``fun`` are used to refer to
histogram-dependent parameters and to interrelate fit parameters, respectively (see below).
:ref:`The FUNCTIONS block <msr-functions-block>`
::
FUNCTIONS
fun1 = gamma_mu * par12
fun2 = gamma_mu * par15
Here functions interrelating different fit parameters and predefined constants can be defined for
the use in the ``THEORY block``. In the example, the functions are used to calculate the
muon-spin-precession frequencies for the given fields [:math:`\nu = \gamma_\mu B / (2\pi)`]. One
function is used for each signal. Altogether, the theory function defined above is
:math:`A(t) = p_{10} e^{-p_{11} t} \cos(\varphi_i \pi/180 + \gamma_\mu p_{12} t) + p_{13} e^{-(p_{14} t)^2/2} \cos(\varphi_i \pi/180 + \gamma_\mu p_{15} t)`, where the *p* are the parameters in the ``FITPARAMETER block`` and :math:`\varphi_i = p_3, p_6, p_9`
depending on the histogram as shall be seen later.
:ref:`The RUN block <msr-run-block>`
::
RUN data/deltat_pta_gps_3110 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
fittype 0 (single histogram fit)
norm 1
backgr.fit 2
map 3 0 0 0 0 0 0 0 0 0
forward 3
data 1 8000
t0 1
fit 0 4.9
packing 20
The RUN blocks are used to collect information on the data to be analyzed. Specifically, these are:
::
RUN data/deltat_pta_gps_3110 PIM3 PSI PSI-BIN (name beamline institute data-file-format)
The path to the data file and the file format (NEXUS, ROOT-NPP, ROOT-PPC, PSI-BIN, PSI-MDU, WKM, MUD, MDU-ASCII).
::
fittype 0 (single histogram fit)
the fit type (0 = single-histogram fit)
::
norm 1
the number of the fit parameter representing the normalization constant
::
backgr.fit 2
the number of the fit parameter representing the background
::
map 3 0 0 0 0 0 0 0 0 0
the definition of the **maps** used in the ``THEORY block`` — RUN-block-specific
parameters are given here; in this example, **map1** is substituted by **parameter 3**
in the ``THEORY block`` for this RUN block and **map2**, **map3**, and so on are undefined.
::
forward 3
the histogram number; in this example 3 corresponds to the histogram of the "Up" positron counter
::
data 1 8000
start and end bins of the range containing useful data in the histogram (to be adjusted, *e.g.* by using ``musrt0``, see below)
::
t0 1
histogram bin corresponding to the time zero (muon implantation time) (to be adjusted, *e.g.* by ``musrt0``, see below)
::
fit 0 4.9
start and end times (in |mgr|\s) defining the fit range. *In case the fit range
exceeds the range of useful data (specified above using the data tag), eventually
this data range is used as fit range.*
::
packing 20
the packing of the histograms (in histogram bins)
Since the data of three histograms is to be analyzed, the file contains not only one but
three RUN blocks — each defining the histogram-specific information following the example given above.
:ref:`The COMMAND block <msr-commands-block>`
::
COMMANDS
MINIMIZE
MINOS
SAVE
In the ``COMMANDS block``, a sequence of operations that should be performed is defined.
Here, the requested operations are the minimization of :math:`\chi^2` (MINIMIZE), the
calculation of *asymmetric errors* (MINOS) as well as saving the found parameter values
and uncertainties to the msr file (SAVE). A full description of the possible commands can
be found :ref:`here <msr-commands-block>`.
:ref:`The FOURIER block <msr-fourier-block>`
::
FOURIER
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
fourier_power 10
apodization WEAK # NONE, WEAK, MEDIUM, STRONG
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
phase par3
range 0.0 600.0
The ``FOURIER block`` is used to define basic settings for the Fourier transform available
in :ref:`musrview <musrview>`. These are:
::
units Gauss # units either 'Gauss', 'MHz', or 'Mc/s'
the units of the Fourier domain
::
fourier_power 10
the number of data points used for the discrete transform, here :math:`2^{10}=1024`.
::
apodization WEAK # NONE, WEAK, MEDIUM, STRONG
the :ref:`apodization <msr-fourier-block-apodization>` to be used
::
plot POWER # REAL, IMAG, REAL_AND_IMAG, POWER, PHASE
what should be plotted (real part, imaginary part, and so on)
::
phase par3
the initial phase of the input data is given here in degrees. Optionally, a phase parameter
from the ``FITPARAMETER block`` can be given, here **par3** takes the value of **parameter 3**.
::
range 0.0 600.0
the start and end points of the range of the Fourier transform in the units specified above
:ref:`The PLOT block <msr-plot-block>`
::
PLOT 0 (single histo plot)
runs 1 2
range 0 4 -0.2 0.2
The ``PLOT block`` defines which data (corresponding to the given RUN blocks) is plotted when
:ref:`musrview <musrview>` is called. In the given example, a canvas would be drawn containing
the (life-time-corrected) data of the first two ``RUN blocks`` ("Up" and "Down" positron counters).
The abscissa would range from 0 to 4 |mgr|\s, the axis of ordinates from -0.2 to 0.2.
It is possible to define more than one ``PLOT block``. Each ``PLOT block`` corresponds to a
separate canvas. Therefore, the second ``PLOT block`` in the file
::
PLOT 0 (single histo plot)
runs 3
use_fit_ranges
produces an additional window containing the (not life-time-corrected) data of the third ``RUN block``
("Right" positron counter). The abscissa ranges from 0 to 4.9 |mgr|\s (according to the fit range given
in the ``RUN block``).
:ref:`The STATISTIC block <msr-statistic-block>`
::
STATISTIC --- 2011-07-09 10:58:44
chisq = 1348.1764, NDF = 1146, chisq/NDF = 1.176419
This block is the last block of a msr file. It contains some information on the fit: the
date and time as well as the absolute and normalized values of :math:`\chi^2` and the
number of degrees of freedom in the fit.
These information only have a meaning if the fitting procedure has been executed at
least once and the fit has converged!
Determine t0 and the data range using musrt0
++++++++++++++++++++++++++++++++++++++++++++
Before the given model can be fitted to the data, the data ranges and time zeros of the different
``RUN blocks`` have to be set correctly. This can be achieved using :ref:`musrt0 <musrt0>`.
Starting this program by selecting the ``musrt0`` button in ``musredit`` or calling from a terminal
.. code-block:: bash
$ musrt0 3110_tutorial.msr
opens an interactive window plotting the data of the first RUN block:
.. image:: ../images/tutorial-musrt0-1.*
The green line (at bin 1) represents time zero, the blue lines the start (at bin 1) and end (at bin 8000)
of the data range and the optional red lines give the limits of the background range (if the background
shall not be determined by the fit). All lines can be either dragged to reasonable locations or set by
pressing the corresponding keyboard shortcuts. In the example the time zero can be set by pressing **T**
(which moves the green line to the bin containing the maximum number of counts), the start of the data
range should be set to about five bins later by zooming into the graph around bin 250 and pressing **d**
when the cursor is found at a suitable location:
.. image:: ../images/tutorial-musrt0-2.*
After all lines have been adjusted for the first histogram, one can go on to the second by pressing **q**.
This procedure is repeated until all ranges have been set correctly. When finished with the last histogram
the new t0 and data-range values will be written to the msr file. A full description of ``musrt0`` can be
found :ref:`here <musrt0>`.
Fit the model to the data using ``musrfit``
+++++++++++++++++++++++++++++++++++++++++++
Now that the basics of the msr file have been introduced and the necessary adjustments have been done one
can proceed with fitting the specified model to the data. This is done by selecting the ``musrfit`` icon
in ``musredit`` or calling from a terminal
.. code-block:: bash
$ musrfit 3110_tutorial.msr
After the fitting procedure has finished the msr file is updated and contains the newly determined values
of the fit parameters.
View the data and the fit using ``musrview``
++++++++++++++++++++++++++++++++++++++++++++
The data and the corresponding fit can be visualized by choosing the ``musrview`` icon in ``musredit`` or
calling from a terminal
.. code-block:: bash
$ musrview 3110_tutorial.msr
This creates the windows according to the given PLOT blocks in the msr file:
.. image:: ../images/tutorial-musrview-1.*
The basic features of ``musrview`` can be found in the ``Musrfit menu``. They include:
* export the shown data and the model to an ASCII file with comma-separated values
* presenting the difference between the shown data and the model (keyboard shortcut: **d**)
* calculate and show the Fourier transform of the shown data (keyboard shortcut: **f**), *e.g.* for
the asymmetry of the "Up" and "Down" detectors:
.. image:: ../images/tutorial-musrview-FT.*
Process multiple msr files using ``msr2data``
+++++++++++++++++++++++++++++++++++++++++++++
This short introduction is concluded by calling attention to the program :ref:`msr2data <msr2data>`.
As the name indicates the main purpose of this program is to extract the ``FITPARAMETER`` block
information from multiple msr files with the same structure and to summarize them in a single
ASCII file (either in ``TRIUMF DB`` format or simple columns). However, as described in detail
in the manual, it is not only possible to collect data from msr files but also to create new
msr files from a template and to process these files using ``musrfit`` on the fly.
Assuming the successive runs **3111** through **3114** can be analyzed using the same model introduced
above for run **3110** (*e.g.* in the case one has done measurements at different temperatures) one can
use the file ``3110_tutorial.msr`` as template, generate the files ``3111_tutorial.msr`` through
``3114_tutorial.msr`` with the corresponding updates in the RUN blocks, call for each one ``musrfit``
and finally summarize the FITPARAMETER block information of all processed files in an ASCII output
file ``tutorial-T-dependence.dat`` (simple columns). If further information on the temperature or the
applied field is available in the data files these will be included as well in the resulting ASCII file.
From the terminal this would be done as follows:
.. code-block:: bash
$ msr2data 3110 3114 _tutorial fit-3110 -o tutorial-T-dependence.dat data
To achieve the same in ``musredit`` (in this snapshot in the *dark theme*) one selects the ``msr2data`` icon and fills the form accordingly:
.. image:: ../images/tutorial-musredit-msr2data.*
Further reading
+++++++++++++++
This page only summarizes the very basic features and options of the programs contained in the ``musrfit`` suite.
For a complete description please refer to the manuals of :ref:`musrfit <musrfit>` (including :ref:`musrview <musrview>`,
:ref:`musrt0 <musrt0>`, and :ref:`musrFT <musrFT>`), :ref:`mupp <mupp>`, :ref:`musredit <musredit-sec>`, and :ref:`msr2data <msr2data>`.
Asymmtery-fit tutorial
----------------------
to be written yet.

View File

@ -0,0 +1,895 @@
.. include:: <isogrk1.txt>
.. index:: user-libs
.. _user-libs:
Documentation of user libs (user functions)
===========================================
.. index:: BMW-libs
.. _BMW-libs:
Meissner-Profiles / Vortex-Lattice related functions (BMW libs)
---------------------------------------------------------------
.. index:: libFitPofB
libFitPofB
++++++++++
Introduction
^^^^^^^^^^^^
``libFitPofB`` is a collection of ``C++`` classes using the ``musrfit`` :ref:`user-functions <user-functions>`
interface in order to facilitate the usage in conjunction with ``musrfit``. The classes contained in this
library generally implement calculations of one-dimensional static magnetic field distributions
:math:`p(B)` which lead to the muon-spin depolarization functions
.. math::
{\cal P}(t) = \int p(B) \cos(\gamma_\mu B t + \varphi) dB,
where :math:`\gamma_\mu = 2 \pi \times 135.54` MHz/T is the gyromagnetic ratio of the muon and :math:`\varphi`
is the initial phase of the muon spins with respect to the positron detector. At the moment the only available
implementations deal with field distributions measured in local isotropic superconductors, either by means of
low-energy |mgr|\SR (see `<https://www.psi.ch/smus/lem>`_) in the Meissner state or by bulk |mgr|\SR in the mixed state.
In the following the basic usage of the library in ``musrfit`` is explained—the calculations by themselves are only
outlined. For further information please refer to the original literature and/or the source code of the implementation.
.. note::
In order to supply certain information needed for the calculations but not suited to be stored in the ``musrfit``
msr files an ``XML`` configuration file in the working directory is used. For details, see below.
.. note::
The implementations in this library heavily rely on `FFTW3 <http://fftw.org/>`_. In principle, it always checks what
is the best way to do efficient Fourier transforms for a given machine before the transforms are actually done. If
repeatedly Fourier transforms of the same (sizable) length should be done, it might be worth storing the once
obtained information in an external file and just load it the next time this information is needed
(`wisdom handling <http://fftw.org/fftw3_doc/Wisdom.html>`_). In case this feature shall be used, a valid wisdom
file has to be specified in the ``XML`` file.
.. note::
The model functions described in the following do generally *not behave nicely* in conjunction with ``MINUIT``
function minimizations (or maximizations). The analysis process at the moment in most cases involves some
tedious trial-and-error procedure, where the displayed MINUIT information as always deserves attention.
This is especially true if small effects should be analyzed (*e.g.* small diamagnetic shifts in superconductors).
The parameter uncertainty in many cases has to be estimated independently. Due to these limitations, also
the use of the fit option of ``msr2data`` *cannot* be advised.
.. note::
If these classes still prove useful and results obtained through them are part of scientific publications,
an acknowledgment of the use of the library is appreciated.
LE-|mgr|\SR
^^^^^^^^^^^
.. index:: 1D-London-Meissner
One-dimensional London model for the Meissner state of isotropic superconductors
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
The models for analyzing LE-|mgr|\SR data assume the magnetic induction :math:`B(z)` to vary only in the
dimension parallel to the momentum of the incident muons. In such a case the magnetic field distribution is given by
.. math::
p(B) = n(z) \left| \frac{dB(z)}{dz} \right|^{-1}
where :math:`n(z)` is the muon implantation profile simulated by ``TRIM.SP``.
Assuming an array of *N* isotropic local superconductors with a total thickness *d* in the Meissner state
the magnetic induction is given by solving the 1D London equation
.. math::
\frac{\partial^2}{\partial z^2}B_i(z) = \frac{1}{\lambda_i^2}B_i(z)
for each layer *i* taking into account the boundary conditions (F. London, Superfluids: Macroscopic Theory of Superconductivity, Dover (1961), p. 34)
.. math::
B_1(0) = B_N(d) = \mu_0H
B_i(d_i) = B_{i+1}(d_i)
\lambda_i^2B_i'(z)\Big\vert_{z=d_i} = \lambda_{i+1}^2B_{i+1}'(z)\Big\vert_{z=d_i},
where the :math:`d_i` specify the interfaces between two adjacent layers and :math:`\lambda_i` is
the magnetic field penetration depth in the constituent :math:`i`.
The calculation of the field distribution has been set up for a superconducting half-space as well
as superconducting thin films with up to three superconducting layers with different penetration depths.
The muon-spin depolarization functions are calculated using the following lines in the ``THEORY`` block
of a ``musrfit`` msr file:
.. index:: TLondon1DHS
**Superconducting half-space**
::
userFcn libFitPofB TLondon1DHS 1 2 3 4 5
The parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. magnetic field penetration depth (nm)
.. index:: TLondon1D1L
**Superconducting thin film (one layer)**
::
userFcn libFitPofB TLondon1D1L 1 2 3 4 5 6 [a b]
The mandatory parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. thickness of the actually superconducting layer (nm)
#. magnetic field penetration depth (nm)
The optional parameters are:
a. fraction f\ :sub:`1` of muons in the thin film contributing to the signal (0 ≤ f\ :sub:`1` ≤ 1)
b. fraction f\ :sub:`s` of muons in the substrate contributing to the signal (0 ≤ f\ :sub:`s` ≤ 1)
.. index:: TLondon1D2L
**Superconducting thin-film bilayer heterostructure**
::
userFcn libFitPofB TLondon1D2L 1 2 3 4 5 6 7 8 [a b c]
The mandatory parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. thickness of the actually superconducting first layer (nm)
#. thickness of the actually superconducting second layer (nm)
#. magnetic field penetration depth of the first layer (nm)
#. magnetic field penetration depth of the second layer (nm)
The optional parameters are:
a. fraction f\ :sub:`1` of muons in the dead and first layer contributing to the signal (0 ≤ f\ :sub:`1` ≤ 1)
b. fraction f\ :sub:`2` of muons in the second layer contributing to the signal (0 ≤ f\ :sub:`2` ≤ 1)
c. fraction f\ :sub:`s` of muons in the substrate contributing to the signal (0 ≤ f\ :sub:`s` ≤ 1)
.. index:: TLondon1D3L
**Superconducting thin-film trilayer heterostructure**
::
userFcn libFitPofB TLondon1D3L 1 2 3 4 5 6 7 8 9 10 [a b c d]
The mandatory parameters are:
#. phase (deg)
#. muon implantation energy as specified in the :ref:`XML startup <BMWlibs-XML>` file (keV)
#. applied field (G)
#. thickness of the dead layer (nm)
#. thickness of the actually superconducting first layer (nm)
#. thickness of the actually superconducting second layer (nm)
#. thickness of the actually superconducting third layer (nm)
#. magnetic field penetration depth of the first layer (nm)
#. magnetic field penetration depth of the second layer (nm)
#. magnetic field penetration depth of the third layer (nm)
The optional parameters are:
a. fraction f\ :sub:`1` of muons in the dead and first layer contributing to the signal (0 ≤ f\ :sub:`1` ≤ 1)
b. fraction f\ :sub:`2` of muons in the second layer contributing to the signal (0 ≤ f\ :sub:`2` ≤ 1)
c. fraction f\ :sub:`3` of muons in the third layer contributing to the signal (0 ≤ f\ :sub:`3` ≤ 1)
d. fraction f\ :sub:`s` of muons in the substrate contributing to the signal (0 ≤ f\ :sub:`s` ≤ 1)
Bulk |mgr|\SR
^^^^^^^^^^^^^
.. index:: Vortex-State-Isotropic
Field distributions in the mixed state of isotropic superconductors
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
When investigating superconductors in the mixed state by means of conventional |mgr|\SR a
two-dimensional flux-line lattice is probed randomly by the muons. The spatial field
distributions within such an ordered lattice are modeled using the Fourier series
.. math::
B(\mathbf{r}) = \langle B \rangle \sum\limits_{\mathbf{K}}B_{\mathbf{K}}\exp(-\imath\mathbf{K}\mathbf{r}),
where :math:`\mathbf{r}=(x,y)`, **K** are the reciprocal lattice vectors of a two-dimensional
vortex lattice and the :math:`B_{\mathbf{K}}` are the Fourier coefficients depending on the
magnetic penetration depth :math:`\lambda` and the superconducting coherence length :math:`\xi`.
The :math:`B_{\mathbf{K}}` for some specific models are as follows:
**London model with Gaussian cutoff** (E.H. Brandt, `J. Low Temp. Phys. 73, 355 (1988) <http://dx.doi.org/10.1007/BF00683568>`_.)
.. math::
B_{\mathbf{K}} = \frac{\exp\left({-K^2\xi^2/2}\right)}{1 + K^2\lambda^2}
**Modified London model** (T.M. Riseman *et al.*, `Phys. Rev. B 52, 10569 (1995) <http://dx.doi.org/10.1103/PhysRevB.52.10569>`_.)
.. math::
B_{\mathbf{K}} = \frac{\exp\left({-K^2\xi^2/2(1-b)}\right)}{1 + K^2\lambda^2/(1-b)},
where :math:`b = \langle B \rangle / (\mu_0 H_{\rm c2})`.
**Analytical Ginzburg-Landau model** ( A. Yaouanc, P. Dalmas de Réotier and E.H. Brandt, `Phys. Rev. B 55, 11107 (1997) <http://dx.doi.org/10.1103/PhysRevB.55.11107>`_)
.. math::
B_{\mathbf{K}} = \frac{f_{\infty}K_1\left(\frac{\xi_v}{\lambda}\sqrt{f_{\infty}^2+\lambda^2K^2}\right)}{K_1\left(\frac{\xi_v}{\lambda}f_{\infty}\right)\sqrt{f_{\infty}^2+\lambda^2K^2}},
where :math:`f_{\infty} = 1 - b^4,~\xi_v = \xi\left(\sqrt{2}-{3\xi}/\left({4\lambda}\right)\right)\sqrt{(1+b^4)(1-2b(1-b)^2)}` and
:math:`K_1` is a modified Bessel function.
Apart from the mentioned analytic models the **numerical Ginzburg-Landau model** (`E.H. Brandt, Phys. Rev. B 68, 054506 (2003). <http://dx.doi.org/10.1103/PhysRevB.68.054506>`_) is available. In this case :math:`B(\mathbf{r})` is obtained by an iterative minimization of the free energy of the vortex lattice.
**Concerning the applicability (e.g. field regions) of each of the mentioned models please refer to the original publications!**
At the moment, the calculation of the field distribution has been implemented for *triangular* flux-line lattices.
The number of grid lines in which the inter-vortex distance is divided for the calculations to be specified through
the :ref:`XML startup <BMWlibs-XML>`.
The muon-spin depolarization functions finally are calculated using the following lines in the THEORY block of a ``musrfit`` msr file:
.. index:: Vortex-Gaussian-CutOff
**2D triangular vortex lattice, London model with Gaussian cutoff**
::
userFcn libFitPofB TBulkTriVortexLondon 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. index:: Vortex-London-modified
**2D triangular vortex lattice, modified London model**
::
userFcn libFitPofB TBulkTriVortexML 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. index:: Vortex-Analytic-GL
**2D triangular vortex lattice, analytic Ginzburg-Landau model**
::
userFcn libFitPofB TBulkTriVortexAGL 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. index:: Vortex-Numeric-GL
**2D triangular vortex lattice, numerical Ginzburg-Landau model**
::
userFcn libFitPofB TBulkTriVortexNGL 1 2 3 4
The parameters are:
#. phase (deg)
#. mean magnetic induction (G)
#. magnetic penetration depth (nm)
#. Ginzburg-Landau coherence length (nm)
.. note::
In order to improve the convergence of ``MIGRAD`` it has proven useful to use the log-likelihood
maximization instead of the :math:`\chi^2` minimization routines and to choose sufficiently large
initial steps for the parameters. Calling ``MINOS`` in conjunction with these functions is futile.
Therefore, the :ref:`COMMANDS block <msr-commands-block>` of the msr file could look like:
::
COMMANDS
STRATEGY 2
MAX_LIKELIHOOD
MIGRAD
HESSE
SAVE
.. index:: BMWlibs-XML
.. _BMWlibs-XML:
The XML startup file
^^^^^^^^^^^^^^^^^^^^
``BMW_startup.xml`` is a configuration file located in the working directory. In this file some settings
like the time and field resolution of the calculations as well as the present muon implantation profiles
for a LE-|mgr|\SR analysis have to be defined. The following XML tags are allowed to define settings:
**<debug>ONE_OR_ZERO</debug>**
activate the debugging output of the settings read from the XML file by setting 1, deactivate it with 0.
**<wisdom>PATH_TO_FILE</wisdom>**
specify the ``PATH_TO_FILE`` to an `FFTW3 wisdom file <http://fftw.org/fftw3_doc/Wisdom.html#Wisdom>`_
that should be used; if the ``PATH_TO_FILE`` is invalid, no ``FFTW3`` wisdom will be used.
**<delta_t>ResT</delta_t>**
set the time resolution ``ResT`` for the calculated depolarization function in microseconds.
**<delta_B>ResB</delta_B>**
set the field resolution ``ResB`` for the calculated field distribution in Gauss.
**<VortexLattice></VortexLattice>**
set the parameters used for the calculation of the spatial field distribution of a vortex lattice.
**<N_VortexGrid>N</N_VortexGrid>**
specify the number of points **N** (in each of the two dimensions) for which the fields within the
vortex lattice are calculated (inside a **<VortexLattice>** environment)
**<LEM></LEM>**
set the parameters used for the calculation of LE-|mgr|\SR field distributions
**<data_path>DATA_PATH_PREFIX</data_path>**
specify the ``DATA_PATH_PREFIX`` to the ``TRIM.SP`` implantation profiles (inside a **<LEM>** environment)
**<N_theory>N_THEORY</N_theory>**
specify the number of points **N_THEORY** for which *B(z)* is calculated (inside a **<LEM>** environment)
The specification of this number is not needed if the calculation of the inverse of *B(z)* is implemented!
**<energy_list></energy_list>**
set the energies for which ``TRIM.SP`` implantation profiles are available (inside a **<LEM>** environment)
**<energy_label>LABEL</energy_label>**
specify the **LABEL** within the file name of a available ``TRIM.SP`` ``RGE`` file (inside a **<energy_list>** environment)
The expected name of the ``RGE`` file will be: ``DATA_PATH_PREFIX + LABEL + .rge``
**<energy>E</energy>**
specify the muon energy *E* (in keV) belonging to the ``TRIM.SP`` ``RGE`` file given above (inside a **<energy_list>** environment)
An example XML file looks as follows:
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?>
<BMW>
<debug>0</debug>
<wisdom>/home/user/WordsOfWisdom.dat</wisdom>
<delta_t>0.01</delta_t>
<delta_B>0.5</delta_B>
<VortexLattice>
<N_VortexGrid>1024</N_VortexGrid>
</VortexLattice>
<LEM>
<data_path>/home/user/TrimSP/some-sample-</data_path>
<N_theory>5000</N_theory>
<energy_list>
<energy_label>02_0</energy_label>
<energy>2.0</energy>
<energy_label>03_0</energy_label>
<energy>3.0</energy>
<energy_label>03_6</energy_label>
<energy>3.6</energy>
<energy_label>05_0</energy_label>
<energy>5.0</energy>
<energy_label>05_3</energy_label>
<energy>5.3</energy>
</energy_list>
</LEM>
</BMW>
.. index:: gap-integral-libs
.. _gap-integral-libs:
Supeconducting Gap-Integrals to calculate :math:`1/\lambda^2` vs :math:`T`
--------------------------------------------------------------------------
The details about the various superconducting gap-integrals are found in the
pdf-file **GapIntegrals.pdf** which can be found in the musrfit source under
``<musrfit-dir>/src/external/libGapIntegrals/``.
.. index:: nonlocal-libs
.. _nonlocal-libs:
Nonlocal superconductivity related Meissner screening functions (AS libs)
-------------------------------------------------------------------------
This library allows to calculate the magnetic field profile :math:`B(z)` for nonlocal superconductors.
For details see `A. Suter, et al., PRB 72, 024506 (2005) <http://dx.doi.org/10.1103/PhysRevLett.95.197201>`_, and references therein.
The provided function calculates the muon spin polarization
.. math::
P(t, E) = \int n(z, E)\, \cos(\gamma_\mu B(z) t + \phi) \, dz,
where :math:`B(z)` is calculated in the limit of specular reflection.
The corresponding user function is called as
::
userFcn libPNL_PippardFitter PNL_PippardFitter 1 2 3 4 5 6 7 8 9
with the parameters
#. implantation energy in (keV).
#. reduced temperature :math:`t=T/T_c`.
#. thickness in (nm).
#. electron mean path, :math:`\ell` in (nm).
#. superconducting coherence length, :math:`\xi` in (nm).
#. London penetration length, :math:`\lambda_{\rm L}` in (nm).
#. external magnetic field strength in (G).
#. the effective detector phase, :math:`\varphi` in :math:`(^\circ)`.
#. a "dead layer" thickness in (nm).
Typically this function needs to be multiplied by a Gaussian in order to take into account: nuclear dipole broadening, partial trapped flux, etc.
In order to find the muon stopping profile, :math:`n(z,E)`, needed for the calculation, the library needs to find the corresponding trimsp
rge-files (muon stoppping profiles). For this the library reads at start-up the following xml-file (example):
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?>
<nonlocal xmlns="http://nemu.web.psi.ch/musrfit/nonlocal">
<comment>
nonlocal_startup.xml
</comment>
<nonlocal_par>
<fourier_points>262144</fourier_points>
</nonlocal_par>
<trim_sp>
<data_path>./profiles/</data_path>
<rge_fln_pre>Sn_E</rge_fln_pre>
<energy_list>
<energy>1000</energy>
<energy>2000</energy>
<energy>4000</energy>
<energy>6000</energy>
<energy>8000</energy>
<energy>10000</energy>
<energy>12000</energy>
<energy>14100</energy>
<energy>18000</energy>
<energy>22000</energy>
<energy>25000</energy>
<energy>27300</energy>
</energy_list>
</trim_sp>
</nonlocal>
Here the number of Fourier points needed in the calculation can be defined (``fourier_points``). The ``trim_sp`` section
contains all the information needed to load the proper muon stopping profiles. ``data_path`` is the path to the needed rge-files.
``rge_fln_pre`` is the rge-file prefix, and ``energy`` are all the energy tags. E.g. ``./profile/Sn_E1000.rge`` would be the first
muon stopping profile for an energy of :math:`E=1000` (eV).
The name of the xml-file has to be ``nonlocal_startup.xml`` and needs to be placed in the directory where the analysis takes place, i.e.
in the directory of all the msr-files.
.. index:: DepthProf-lib
.. _DepthProf-lib:
Depth resolved information (AS libs)
------------------------------------
A method to extract depth-resolved information from the implantation energy dependence of the experimental parameters in a low-energy
muon spin spectroscopy experiment. For details see `A. F. A. Simões, et al. Review of Scientific Instruments. 2020; 91(2): 023906 (7 pp.) <https://doi.org/10.1063/1.5126529>`_.
If you have a layered material (e.g. :math:`N` layers), properties like the asymmetry might depend on the layer in which the muons are stopped.
For instance there might be different probabilities for muonium formation depending on the material, charge transfer layers, etc.
Since the muon stopping distribution, :math:`n(z)`, has some finite range, these properties will be smeared out. For the following we define
the stopping probability, :math:`p_{i}(E)` for a finite slice :math:`i`, ranging from :math:`z \in [a, b]` as
.. math::
p_{i}(E) = \int_a^b n(z,E) \, dz
Furthermore it is assumes that there is a sharp transition between the layers of the property of interest, e.g. the diamagnetic fraction, :math:`f_i`.
Hence the measured property as function of energy is
.. math::
f(E) = \sum_{i=1}^N p_{i}(E) \cdot f_i.
.. note::
Currently it is recommended to read in the data in ASCII or DAT format as a non-|mgr|\SR fit :ref:`(fit type 8) <non-musr-fit>`.
The user library for the depth profile analysis looks for a **3 layer material**, assuming one is looking for the diamagnetic fraction, like
::
###############################################################
FITPARAMETER
# Nr. Name Value Step Pos_Error Boundaries
1 f1 0.54540 0.00072 none 0 1
2 f2 0.23957 0.00048 none
3 f3 0.05615 0.00047 none 0 1
4 x1 63.5000 0.0014 none
5 x2 101.5001 0.0044 none
###############################################################
THEORY
userFcn libPDepthProfile PDepthProfile 1 2 3 4 5
Here, :math:`f1` is the diamagnetic fraction of the first layer, etc. :math:`x1` is the thickness of the first layer, etc.
In order to find the muon stopping profile, :math:`n(z,E)`, needed for the calculation, the library needs to find the corresponding trimsp
rge-files (muon stoppping profiles). For this the library reads at start-up the following xml-file (example):
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8"?>
<depthProf xmlns="http://nemu.web.psi.ch/musrfit/depthProf">
<comment>
TrimSp information
</comment>
<trim_sp>
<data_path>./TRIMSP/</data_path>
<rge_fln_pre>SiO2_70nm2.0_30nm2.2_SiC_E</rge_fln_pre>
<energy_vect start="1000" stop="22000" step="1000"/>
</trim_sp>
</depthProf>
.. index:: BNMR-libs
.. _BNMR-libs:
Functions to analyze |bgr|-NMR data (BNMR libs)
-------------------------------------------------------------------------
This is a collection of ``C++`` classes using the ``musrfit`` :ref:`user-functions <user-functions>`
interface in order to facilitate the usage in conjunction with ``musrfit``. It consists of two libraries:
* ``libBNMR`` contains functions to fit spin lattice relaxation (SLR) data.
* ``libLineProfile`` contains functions to fit resonance lineshapes.
.. note::
Currently it is recommended to read in the data in ASCII format as a non-|mgr|\SR fit :ref:`(fit type 8) <non-musr-fit>`.
.. index:: libBNMR
libBNMR
++++++++++
In |bgr|-NMR the SLR is usually measured by implanting a pulse of :math:`^8`\ Li with a length :math:`t_0` into the sample.
The asymmetry is measured both during the pulse and afterwards. For a a general spin relaxation function :math:`f(t)` the time evolution of the asymmetry is then given by [`Z. Salman, et al., PRL 96, 147601 (2006) <http://dx.doi.org/10.1103/PhysRevLett.96.147601>`_]:
.. index:: SLR
.. _SLR:
.. math::
P(t) = \left\{\begin{matrix}
\frac{\int_0^t e^{-(t-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^t e^{-t'/\tau_{\mathrm{Li}}}dt' } & t\leq t_0\\[6pt]
\frac{\int_0^{t_0}e^{-(t_0-t')/\tau_{\mathrm{Li}}}f(t-t')dt'}{\int_0^{t_0}e^{-t'/\tau_{\mathrm{Li}}}dt'} & t> t_0,
\end{matrix}\right.
where :math:`\tau_{\mathrm{Li}}=1.21`\ s is the :math:`^8`\ Li lifetime.
Functions
^^^^^^^^^^^^
The ``libBNMR`` library currently contains the following functions:
.. index:: ExpRlx
**Exponential relaxation**
::
userFcn libBNMR ExpRlx 1 2
The parameters are:
#. pulse length :math:`t_0` (s)
#. relaxation rate :math:`\lambda` (s\ :math:`^{-1}`\ )
This function implements :math:`f(t)=e^{-\lambda t}`.
.. index:: SExpRlx
**Stretched exponential relaxation**
::
userFcn libBNMR SExpRlx 1 2 3
The parameters are:
#. pulse length :math:`t_0` (s)
#. relaxation rate :math:`\lambda` (s\ :math:`^{-1}`\ )
#. stretching exponent :math:`\beta`
This function implements :math:`f(t)=e^{-(\lambda t)^{\beta}}`.
.. index:: libLineProfile
libLineProfile
+++++++++++++++++
In addition to some simple line shapes ``libLineProfile`` contains functions to fit chemical shift anisotropies in the powder average.
Their functional form can be found in `M. Mehring, Principles of High Resolution NMR in Solids (Springer 1983) <http://dx.doi.org/10.1007/978-3-642-68756-3_2>`_.
For an axially symmetric interaction it is given by:
.. index:: Iax
.. _Iax:
.. math::
I_{\mathrm ax}(f)=\left\{\begin{matrix} \frac{1}{2\sqrt{(f_\parallel-f_\perp)(f-f_\perp)}}& f\in(f_\perp,f_\parallel)\cup(f_\parallel,f_\perp)\\[6pt] 0 & \text{otherwise}\end{matrix} \right.
where :math:`f_\parallel` and :math:`f_\perp` are the frequencies that would be observed if the field is oriented paralell or perpendicular to the symmetry axis, respectively.
| In case of a completely anisotropic interaction, the powder average can be described by the frequencies along the three principle axis :math:`f_1,f_2,f_3`.
| Assume without loss of generality that :math:`f_1<f_2<f_3`, then
.. index:: Ianiso
.. _Ianiso:
.. math::
I(f)&=\left\{\begin{matrix}
\frac{K(m)}{\pi\sqrt{(f-f_1)(f_3-f_2)}},& f_3\geq f>f_2 \\[9pt]
\frac{K(m)}{\pi\sqrt{(f_3-f)(f_2-f_1)}},& f_2>f\geq f_1\\[9pt]
0 & \text{otherwise}
\end{matrix} \right. \\
\\
m&=\left\{\begin{matrix}
\frac{(f_2-f_1)(f_3-f)}{(f_3-f_2)(f-f_1)},& f_3\geq f>f_2 \\[6pt]
\frac{(f-f_1)(f_3-f_2)}{(f_3-f)(f_2-f_1)},& f_2>f\geq f_1\\[6pt]
\end{matrix} \right. \\
\\
K(m)&=\int_0^{\pi/2}\frac{\mathrm d\varphi}{\sqrt{1-m^2\sin^2{\varphi}}},
:math:`K(m)` is the complete elliptic integral of the first kind.
Functions
^^^^^^^^^^^^
The ``libLineProfile`` library currently contains the following functions:
.. index:: LineGauss
**Gaussian**
::
userFcn libLineProfile LineGauss 1 2
The parameters are:
#. center of the line :math:`f_0`
#. FWHM of the line :math:`\sigma`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)=e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}}
.. index:: LineLorentzian
**Lorentzian**
::
userFcn libLineProfile LineLorentzian 1 2
The parameters are:
#. center of the line :math:`f_0`
#. FWHM of the line :math:`w`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)= \frac{w^2}{4(f-f_0)^2+w^2}
.. index:: LineLaplace
**Laplacian**
::
userFcn libLineProfile LineLaplace 1 2
The parameters are:
#. center of the line :math:`f_0`
#. FWHM of the line :math:`w`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)=e^{-2\ln 2 \left|\frac{f-f_0}{w}\right|}
.. index:: LineSkewLorentzian
**Skewed Lorentzian**
::
userFcn libLineProfile LineSkewLorentzian 1 2 3
The parameters are:
#. center of the line :math:`f_0`
#. width of the line :math:`w`
#. skewness parameter :math:`a`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)= \frac{w w_a}{4(f-f_0)^2+w_a^2}, \quad w_a=\frac{2w}{1+e^{a(f-f_0)}}
.. index:: LineSkewLorentzian2
**Skewed Lorentzian 2**
::
userFcn libLineProfile LineSkewLorentzian2 1 2 3
The parameters are:
#. center of the line :math:`f_0`
#. width left of the center :math:`w_1`
#. width right of the center :math:`w_2`
| The height of the peak is 1.
| The functional form is given by
.. math::
A(f)= \left\{\begin{matrix}\frac{{w_1}^2}{4{(f-f_0)}^2+{w_1}^2},&f\leq f_0\\[9pt] \frac{{w_2}^2}{4{(f-f_0)}^2+{w_2}^2},&f>f_0\end{matrix}\right.
.. index:: PowderLineAxialLor
**Powder average of an axially symmetric interaction convoluted with a Lorentzian**
::
userFcn libLineProfile PowderLineAxialLor 1 2 3
The parameters are:
#. frequency for the field oriented paralell to the symmetry axis :math:`f_\parallel`
#. frequency for the field oriented perpendicular to the symmetry axis :math:`f_\parallel`
#. FWHM of the Lorentzian :math:`w`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I_{\mathrm ax}(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)
with :math:`I_{\mathrm ax}(f)` defined :ref:`above <Iax>`.
.. index:: PowderLineAxialGss
**Powder average of an axially symmetric interaction convoluted with a Gaussian**
::
userFcn libLineProfile PowderLineAxialGss 1 2 3
The parameters are:
#. frequency for the field oriented paralell to the symmetry axis :math:`f_\parallel`
#. frequency for the field oriented perpendicular to the symmetry axis :math:`f_\parallel`
#. FWHM of the Gaussian :math:`\sigma`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I_{\mathrm ax}(f)\circledast\left( e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}} \right)
with :math:`I_{\mathrm ax}(f)` defined :ref:`above <Iax>`.
.. index:: PowderLineAsymLor
**Powder average of an anisotropic interaction convoluted with a Lorentzian**
::
userFcn libLineProfile PowderLineAsymLor 1 2 3 4
The parameters are:
#. :math:`f_1`
#. :math:`f_1`
#. :math:`f_3` frequencies along the principal axes
#. FWHM of the Lorentzian :math:`w`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I(f)\circledast\left( \frac{w^2}{4f^2+w^2} \right)
with :math:`I(f)` defined :ref:`above <Ianiso>`. Note that :math:`f_1<f_2<f_3` is not required by the code.
.. index:: PowderLineAsymGss
**Powder average of an anisotropic interaction convoluted with a Gaussian**
::
userFcn libLineProfile PowderLineAsymGss 1 2 3 4
The parameters are:
#. :math:`f_1`
#. :math:`f_1`
#. :math:`f_3` frequencies along the principal axes
#. FWHM of the Gaussian :math:`\sigma`
| The height of the peak is :math:`\sim`\ 1.
| The functional form is given by
.. math::
A(f)= I(f)\circledast\left( e^{-\frac{4\ln 2 (f-f_0)^2}{ \sigma^2}} \right)
with :math:`I(f)` defined :ref:`above <Ianiso>`. Note that :math:`f_1<f_2<f_3` is not required by the code.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,123 @@
/* Compatability shim for jQuery and underscores.js.
*
* Copyright Sphinx contributors
* Released under the two clause BSD licence
*/
/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 B

View File

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -15,6 +15,12 @@ div.clearer {
clear: both;
}
div.section::after {
display: block;
content: '';
clear: left;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
@ -81,6 +87,10 @@ div.sphinxsidebar input {
font-size: 1em;
}
div.sphinxsidebar #searchbox form.search {
overflow: hidden;
}
div.sphinxsidebar #searchbox input[type="text"] {
float: left;
width: 80%;
@ -120,7 +130,7 @@ ul.search li a {
font-weight: bold;
}
ul.search li div.context {
ul.search li p.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
@ -212,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */
div.body {
min-width: 450px;
min-width: 360px;
max-width: 800px;
}
@ -227,6 +237,10 @@ a.headerlink {
visibility: hidden;
}
a:visited {
color: #551A8B;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
@ -257,19 +271,25 @@ p.rubric {
font-weight: bold;
}
img.align-left, .figure.align-left, object.align-left {
img.align-left, figure.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
}
img.align-right, .figure.align-right, object.align-right {
img.align-right, figure.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
}
img.align-center, .figure.align-center, object.align-center {
img.align-center, figure.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
img.align-default, figure.align-default, .figure.align-default {
display: block;
margin-left: auto;
margin-right: auto;
@ -283,30 +303,45 @@ img.align-center, .figure.align-center, object.align-center {
text-align: center;
}
.align-default {
text-align: center;
}
.align-right {
text-align: right;
}
/* -- sidebars -------------------------------------------------------------- */
div.sidebar {
div.sidebar,
aside.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
nav.contents,
aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
padding: 7px;
margin: 10px 0 10px 0;
}
@ -328,10 +363,6 @@ div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
@ -342,9 +373,34 @@ div.body p.centered {
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
@ -354,6 +410,11 @@ table.align-center {
margin-right: auto;
}
table.align-default {
margin-left: auto;
margin-right: auto;
}
table caption span.caption-number {
font-style: italic;
}
@ -369,10 +430,6 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}
table.footnote td, table.footnote th {
border: 0 !important;
}
th {
text-align: left;
padding-right: 5px;
@ -387,22 +444,34 @@ table.citation td {
border-bottom: none;
}
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
/* -- figures --------------------------------------------------------------- */
div.figure {
div.figure, figure {
margin: 0.5em;
padding: 0.5em;
}
div.figure p.caption {
div.figure p.caption, figcaption {
padding: 0.3em;
}
div.figure p.caption span.caption-number {
div.figure p.caption span.caption-number,
figcaption span.caption-number {
font-style: italic;
}
div.figure p.caption span.caption-text {
div.figure p.caption span.caption-text,
figcaption span.caption-text {
}
/* -- field list styles ----------------------------------------------------- */
@ -427,6 +496,74 @@ table.field-list td, table.field-list th {
hyphens: manual;
}
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
/* -- object description styles --------------------------------------------- */
.sig {
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
}
.sig-name, code.descname {
background-color: transparent;
font-weight: bold;
}
.sig-name {
font-size: 1.1em;
}
code.descname {
font-size: 1.2em;
}
.sig-prename, code.descclassname {
background-color: transparent;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.sig-param.n {
font-style: italic;
}
/* C++ specific styling */
.sig-inline.c-texpr,
.sig-inline.cpp-texpr {
font-family: unset;
}
.sig.c .k, .sig.c .kt,
.sig.cpp .k, .sig.cpp .kt {
color: #0033B3;
}
.sig.c .m,
.sig.cpp .m {
color: #1750EB;
}
.sig.c .s, .sig.c .sc,
.sig.cpp .s, .sig.cpp .sc {
color: #067D17;
}
/* -- other body styles ----------------------------------------------------- */
ol.arabic {
@ -449,11 +586,81 @@ ol.upperroman {
list-style: upper-roman;
}
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}
ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}
ol.simple p,
ul.simple p {
margin-bottom: 0;
}
aside.footnote > span,
div.citation > span {
float: left;
}
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {
margin-bottom: 0em;
}
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {
content: "";
clear: both;
}
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
dl {
margin-bottom: 15px;
}
dd p {
dd > :first-child {
margin-top: 0px;
}
@ -467,6 +674,21 @@ dd {
margin-left: 30px;
}
.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}
.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
@ -480,14 +702,6 @@ dl.glossary dt {
font-size: 1.1em;
}
.optional {
font-size: 1.3em;
}
.sig-paren {
font-size: larger;
}
.versionmodified {
font-style: italic;
}
@ -526,11 +740,26 @@ dl.glossary dt {
font-style: oblique;
}
.classifier:before {
font-style: normal;
margin: 0 0.5em;
content: ":";
display: inline-block;
}
abbr, acronym {
border-bottom: dotted 1px;
cursor: help;
}
.translated {
background-color: rgba(207, 255, 207, 0.2)
}
.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}
/* -- code displays --------------------------------------------------------- */
pre {
@ -538,29 +767,69 @@ pre {
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
pre, div[class*="highlight-"] {
clear: both;
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
-webkit-hyphens: none;
hyphens: none;
white-space: nowrap;
}
div[class*="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
@ -569,8 +838,14 @@ div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
table.highlighttable td.linenos,
span.linenos,
div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
-webkit-user-select: text; /* Safari fallback only */
-webkit-user-select: none; /* Chrome/Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+ */
}
div.code-block-caption span.caption-number {
@ -582,21 +857,7 @@ div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
}
code.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
}
code.descclassname {
background-color: transparent;
margin: 1em 0;
}
code.xref, a code {
@ -637,8 +898,7 @@ span.eqno {
}
span.eqno a.headerlink {
position: relative;
left: 0px;
position: absolute;
z-index: 1;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

View File

@ -1 +1 @@
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions .rst-other-versions .rtd-current-item{font-weight:700}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}#flyout-search-form{padding:6px}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -2,312 +2,155 @@
* doctools.js
* ~~~~~~~~~~~
*
* Sphinx JavaScript utilities for all documentation.
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
"use strict";
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
"TEXTAREA",
"INPUT",
"SELECT",
"BUTTON",
]);
/**
* make the code below compatible with browsers without
* an installed firebug like debugger
if (!window.console || !console.firebug) {
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
"profile", "profileEnd"];
window.console = {};
for (var i = 0; i < names.length; ++i)
window.console[names[i]] = function() {};
}
*/
/**
* small helper function to urldecode strings
*/
jQuery.urldecode = function(x) {
return decodeURIComponent(x).replace(/\+/g, ' ');
};
/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;
/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};
/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
const _ready = (callback) => {
if (document.readyState !== "loading") {
callback();
} else {
span = document.createElement("span");
span.className = className;
document.addEventListener("DOMContentLoaded", callback);
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var bbox = span.getBBox();
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
var parentOfText = node.parentNode.parentNode;
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};
/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
/**
* Small JavaScript module for the documentation.
*/
var Documentation = {
init : function() {
this.fixFirefoxAnchorBug();
this.highlightSearchWords();
this.initIndexTable();
const Documentation = {
init: () => {
Documentation.initDomainIndexTable();
Documentation.initOnKeyListeners();
},
/**
* i18n support
*/
TRANSLATIONS : {},
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
LOCALE : 'unknown',
TRANSLATIONS: {},
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
LOCALE: "unknown",
// gettext and ngettext don't access this so that the functions
// can safely bound to a different name (_ = Documentation.gettext)
gettext : function(string) {
var translated = Documentation.TRANSLATIONS[string];
if (typeof translated === 'undefined')
return string;
return (typeof translated === 'string') ? translated : translated[0];
gettext: (string) => {
const translated = Documentation.TRANSLATIONS[string];
switch (typeof translated) {
case "undefined":
return string; // no translation
case "string":
return translated; // translation exists
default:
return translated[0]; // (singular, plural) translation tuple exists
}
},
ngettext : function(singular, plural, n) {
var translated = Documentation.TRANSLATIONS[singular];
if (typeof translated === 'undefined')
return (n == 1) ? singular : plural;
return translated[Documentation.PLURALEXPR(n)];
ngettext: (singular, plural, n) => {
const translated = Documentation.TRANSLATIONS[singular];
if (typeof translated !== "undefined")
return translated[Documentation.PLURAL_EXPR(n)];
return n === 1 ? singular : plural;
},
addTranslations : function(catalog) {
for (var key in catalog.messages)
this.TRANSLATIONS[key] = catalog.messages[key];
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
this.LOCALE = catalog.locale;
addTranslations: (catalog) => {
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
Documentation.PLURAL_EXPR = new Function(
"n",
`return (${catalog.plural_expr})`
);
Documentation.LOCALE = catalog.locale;
},
/**
* add context elements like header anchor links
* helper function to focus on search bar
*/
addContextElements : function() {
$('div[id] > :header:first').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this headline')).
appendTo(this);
});
$('dt[id]').each(function() {
$('<a class="headerlink">\u00B6</a>').
attr('href', '#' + this.id).
attr('title', _('Permalink to this definition')).
appendTo(this);
focusSearchBar: () => {
document.querySelectorAll("input[name=q]")[0]?.focus();
},
/**
* Initialise the domain index toggle buttons
*/
initDomainIndexTable: () => {
const toggler = (el) => {
const idNumber = el.id.substr(7);
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
if (el.src.substr(-9) === "minus.png") {
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
toggledRows.forEach((el) => (el.style.display = "none"));
} else {
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
toggledRows.forEach((el) => (el.style.display = ""));
}
};
const togglerElements = document.querySelectorAll("img.toggler");
togglerElements.forEach((el) =>
el.addEventListener("click", (event) => toggler(event.currentTarget))
);
togglerElements.forEach((el) => (el.style.display = ""));
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
},
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
)
return;
document.addEventListener("keydown", (event) => {
// bail for input elements
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
// bail with special keys
if (event.altKey || event.ctrlKey || event.metaKey) return;
if (!event.shiftKey) {
switch (event.key) {
case "ArrowLeft":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const prevLink = document.querySelector('link[rel="prev"]');
if (prevLink && prevLink.href) {
window.location.href = prevLink.href;
event.preventDefault();
}
break;
case "ArrowRight":
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
const nextLink = document.querySelector('link[rel="next"]');
if (nextLink && nextLink.href) {
window.location.href = nextLink.href;
event.preventDefault();
}
break;
}
}
// some keyboard layouts may need Shift to get /
switch (event.key) {
case "/":
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
Documentation.focusSearchBar();
event.preventDefault();
}
});
},
/**
* workaround a firefox stupidity
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
*/
fixFirefoxAnchorBug : function() {
if (document.location.hash && $.browser.mozilla)
window.setTimeout(function() {
document.location.href += '';
}, 10);
},
/**
* highlight the search words provided in the url in the text
*/
highlightSearchWords : function() {
var params = $.getQueryParameters();
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
if (terms.length) {
var body = $('div.body');
if (!body.length) {
body = $('body');
}
window.setTimeout(function() {
$.each(terms, function() {
body.highlightText(this.toLowerCase(), 'highlighted');
});
}, 10);
$('<p class="highlight-link"><a href="javascript:Documentation.' +
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
.appendTo($('#searchbox'));
}
},
/**
* init the domain index toggle buttons
*/
initIndexTable : function() {
var togglers = $('img.toggler').click(function() {
var src = $(this).attr('src');
var idnum = $(this).attr('id').substr(7);
$('tr.cg-' + idnum).toggle();
if (src.substr(-9) === 'minus.png')
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
else
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
}).css('display', '');
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
togglers.click();
}
},
/**
* helper function to hide the search marks again
*/
hideSearchWords : function() {
$('#searchbox .highlight-link').fadeOut(300);
$('span.highlighted').removeClass('highlighted');
},
/**
* make the url absolute
*/
makeURL : function(relativeURL) {
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
},
/**
* get the current relative url
*/
getCurrentURL : function() {
var path = document.location.pathname;
var parts = path.split(/\//);
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
if (this === '..')
parts.pop();
});
var url = parts.join('/');
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
},
initOnKeyListeners: function() {
$(document).keyup(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');
if (prevHref) {
window.location.href = prevHref;
return false;
}
case 39: // right
var nextHref = $('link[rel="next"]').prop('href');
if (nextHref) {
window.location.href = nextHref;
return false;
}
}
}
});
}
};
// quick alias for translations
_ = Documentation.gettext;
const _ = Documentation.gettext;
$(document).ready(function() {
Documentation.init();
});
_ready(Documentation.init);

View File

@ -1,9 +1,13 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.9.3',
LANGUAGE: 'None',
const DOCUMENTATION_OPTIONS = {
VERSION: '1.9.9',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

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