Open rbauststfc opened 1 year ago
[ ] The first 5 improvements listed on issue #35981 should be made to the SANSTubeCalibration
algorithm to support easy use of a config file.
[ ] The StripWidth
parameter of SANSTubeCalibration
can be removed and set as a constant in the algorithm, as the same width of strip is always used.
[ ] Ideally, there should be one config file that includes the parameters for both the front and rear detector calibrations (which require two separate runs of the SANSTubeCalibration
algorithm), and for running the SANSTubeMerge
algorithm (which combines the two separate front and rear calibrations) to avoid having lots of separate settings files to keep track of. The calibration process currently requires quite a bit of manual interaction to choose the appropriate threshold, and it's a long running algorithm. So although all the settings are in a single file, it still needs to be possible to run each algorithm one at a time and potentially repeat each rear or front detector calibration a few times as part of finding the correct threshold (note there is a long-term plan to automate threshold finding to improve this). One way of doing this could be for the user to somehow specify the algorithm definition that they want to run from the config file (I think this would probably be useful to include even if other options are made available). However, if possible, the system should be able to run through them all automatically and just check with users whether to continue before we start each algorithm run in the file (I'm not sure if we can offer this sort of interaction from an algorithm without a GUI). The final solution must support the following type of user workflow:
[ ] Once written, the scientists will produce a config file for a new calibration by copying an old one and updating relevant values. Most parameters will remain the same, the only ones that are likely to be changed regularly are the DataFiles
, Threshold
and OutputFile
parameters for the two calibration definitions, and all the filepaths for the SANSTubeMerge
algorithm definition. There is some concern about the risk of accidentally overwriting previous output files, so we should think about whether there is any way of providing useful validation to help avoid this from happening (perhaps we could add calibration and merge algorithm parameter validation to check that output filepaths don't point to existing files and provide a warning if they do?). Any solution we provide needs some thought, as being able to overwrite files is probably valid in some circumstances, particularly given the need to re-run calibrations a few times to find the right threshold.
Is your feature request related to a problem? Please describe.
Sans2d currently use the
SANSTubeCalibration
andSANSTubeMerge
algorithms to perform their calibration. AlgorithmSANSTubeCalibration
takes a large number of parameters and the scientists would like an easy way to both save a record of the parameters used for each calibration, and to be able to easily pass and troubleshoot those parameters to the algorithm without entering them all individually. The algorithm will be run infrequently, so there needs to be an easy way to run it again using the correct parameter values. It should be possible to see both front and rear detector values together in a file for ease of use.See precise requirements for this here.
Describe the solution you'd like
They would like a human-readable file format. A TOML user file, similar to what they are already familiar with, would be ideal.
Describe alternatives you've considered
We discussed whether Mantid history could be useful for this in any way, as it would be stored with the output calibration file and show the parameters that were used. Our scientists felt that it wasn't sufficiently easy to read and that they would find it easier to work with a TOML user file, which is more consistent with their existing ways of working.
Additional context
There is other upcoming work that we expect to require a TOML config file for inputting parameters to algorithms. If we can set this up in a way that may be useful for other algorithms then that would be beneficial.