Ticket #10046 (assigned)
Fix DET/MERGE(D) Command
Reported by: | Peter Parker | Owned by: | Peter Parker |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | SANS | Keywords: | |
Cc: | stephen.king@… | Blocked By: | |
Blocking: | Tester: |
Description (last modified by Peter Parker) (diff)
There are several problems here. Some comments from Steve:
I have a user file that starts
LOQ PRINT This is a LOQ user file for Mantid merging detectors DET/MERGEDTo which Mantid quietly (ie, no red text) reports
THIS IS A LOQ USER FILE FOR MANTID MERGING DETECTORS setDetector: Detector not found setDetector: Detector set to main-detector-bank in LOQeven though it has set the Detector Bank in the Reduction tab to ‘merged’…
Actually there is a slight correction to what I said previously:
If you put DET/MERGED in the user file, which is what http://www.mantidproject.org/SANS_User_File_Commands#FIT says you should put, then it does not set merged detectors, it does indeed default to the main only.
If you put DET/MERGE in the user file it sets merged detectors.
I’ve only just found this.
Can we make the script command parser insensitive to the ‘D’ on MERGED?
Actually I think I may have a handle on where the
setDetector: Detector not found setDetector: Detector set to main-detector-bank in LOQits not just the DET/MERGE, it’s any incorrect use of the DET >command; eg, a DET/RESCALE, with a simple typo and so on.
Right, let me see if I can be more definitive:
- On first running Mantid:
- If the user file contains DET/MERGED (what the wiki says you should type) the results log returns
setDetector: Detector not found setDetector: Detector set to main-detector-bank in LOQand does not set merged detectors in the GUI (it defaults to the main detector)
- If the user file contains DET/MERGE the results log returns
setDetector: Detector not found setDetector: Detector set to main-detector-bank in LOQand does not set merged detectors in the GUI (it defaults to the main detector)
- If you specifically reload the user file after starting the ISIS SANS GUI:
a) And the user file contains DET/MERGED (what the wiki says you should type) the results log returns
setDetector: Detector not found setDetector: Detector set to main-detector-bank in LOQbut does set merged detectors
- And the user file contains DET/MERGE the results log returns
setDetector: Detector not found setDetector: Detector set to main-detector-bank in LOQbut does set merged detectors
So contrary to what I thought yesterday the parser does seem to be agnostic to the ‘D’ on MERGED, but >currently the only way to get a user file to set merged detectors is to specifically reload the user file.
- Interestingly, if the user file contains a DET/RESCALE/FIT (in my example after the DET/MERGE(D)) that is correctly implemented when the user file is initially loaded.
- Likewise, if the user file contains a DET/SHIFT/FIT (again, after the DET/MERGE(D)) that is correctly implemented when the user file is initially loaded.
So there is something odd about the way the GUI is treating the DET/MERGE(D) command on initially loading of the user file which is different to how it treats other qualifiers on the DET command.
After a quick look at the code, this boils down to three issues as far as I can tell:
- We don't parse the input correctly.
- We don't cope with merged/both options correctly.
- We store the result of parsing in a couple places, that don't all get updated in all circumstance.