That these did not surface earlier can only be due to the musrgui/musredit interface which has additional safeguards.
Obviously no one uses this program from the command line (my guess).
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.
(i) It was not always possible to zoom the x-range down below some threshold. The reason was that on overlay histogram frame is needed which is invoked by DrawFrame from the DataTheory Pad. This by default has only 1000 'bins'. If the plotted histogram had more bins (e.g. 16000 bins) zooming was only possible down to the relative ratio (16 for the example). This is fixed now by increasing the 'bins' of the overlay histogram frame.
(ii) When toggling between data view and difference view, the x-range was subtly shrinking.
Files that are newly generated through msr2data from now on will only write two successive empty lines (at any occurence).
Any further empty lines will be deleted.
* Functions in the RUN blocks are now correctly ignored
* Function lines which contain parameters with adjacent characters (+-*/()\t) should now be handled correctly [-> more tests are needed here]
---
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!