For the moment we keep to copies of it -- one for the use within the various
musrfit programs, one that can be used in user functions.
* musrt0 is now again activated in musrgui/musredit by default.
In the RUN block data file names can now be given in the following way:
- without extension (default and only possible way up to now)
- with (completely) lower-case extension (e.g. .nxs)
- with (completely) upper-case extension (e.g. .NXS)
In any case, the file that is looked for can have both a lower-case or an upper-case extension.
The default (if no option is given) is now that only for newly generated or empty files the respective header will be written.
If data is appended to an existing file, it is assumed that the header also is present already!
In this case only the new data blocks are appended directly after to existing ones.
[Most probably this behavior is broken if used in a native Windows environment, however, this is not the only problem there...]
The previous option "noheader" is preserved.
It suppresses the output of the header in any case.
If new data are appended to an existing output file this is done at the end of the file---just as before!
A new option "header" has been introduced.
If this is given, the output of the header is forced---no matter if a file (probably with header) existed before or not.
Also in this case all new data (and the header) are appended at the end of the output file if it existed already.
In case both options are given, the default behavior is activated.
Non-existing msr-files in the specified list of runs are now ignored as far as possible!
Still a warning for each non-existing file will be issued!
Before, encountering such a file led to the termination of the program.
Also the writing of the empty lines at the end of the data-output-file should be fixed now in this case.
It is needed to get a "correct db-file".
Before, when the program has been aborted before the last run was processed, these empty lines had not been appended to the file.
run-specific parameters. This might help to get overall better starting parameters for a global fit.
For a few more details and an example, see the documentation.
Any testing is very welcome.
---
Added a "global" option to msr2data
First, I hope, this major "surgery" does not cause any regressions in the standard features.
If so, please revert to an older version and file a bug report.
This new option is not yet documented and should be considered as experimental.
Also the newly added code still needs some cleanup - many things have simply been written as a proof of concept.
This will be done during further testing and fine-tuning stages.
The purpose of this method is to be able to write heavily modified msr-files using all the msr-handler support.
The further existing method PWriteMsrLogFile can only handle small changes to the msr-file (like changing parameter values or fixing the formatting),
however, it is e.g. not possible to add parameters or run blocks that have not existed before since during the mlog-file writing the original
msr-file is streamed again and then only things are handled which are present in the msr-file.
For writing the output the new method does _not_ read in the originally handled msr-file again!
Only the information stored in the internal data structures are used to recreate a full msr-file (including all changes that might have been made).
Since comments in the original msr-file are not stored internally these are lost.
At the moment it is however possible to add single lines of comments in the FITPARAMETER, THEORY, FUNCTIONS und between different RUN blocks.
This feature could easily be added also to the other blocks, if needed.
For now I skipped all checks for missing tags in the RUN blocks.
Nothing is tested, therefore:
THIS METHOD NEEDS TO BE REVIEWED AND TESTED BEFORE IT CAN BE USED SERIOUSLY!