Ticket #10046 (assigned)

Opened 6 years ago

Last modified 5 years ago

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/MERGED

To 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 LOQ

even 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 LOQ

its 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:

  1. On first running Mantid:
  1. 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 LOQ
    

and does not set merged detectors in the GUI (it defaults to the main detector)

  1. If the user file contains DET/MERGE the results log returns
setDetector: Detector not found
setDetector: Detector set to main-detector-bank in LOQ

and does not set merged detectors in the GUI (it defaults to the main detector)

  1. 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 LOQ

but does set merged detectors

  1. And the user file contains DET/MERGE the results log returns
setDetector: Detector not found
setDetector: Detector set to main-detector-bank in LOQ

but 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.

  1. 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.
  1. 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:

  1. We don't parse the input correctly.
  2. We don't cope with merged/both options correctly.
  3. We store the result of parsing in a couple places, that don't all get updated in all circumstance.

Change History

comment:1 Changed 6 years ago by Nick Draper

  • Status changed from new to assigned

comment:2 Changed 6 years ago by Peter Parker

  • Keywords SANS removed
  • Component changed from Framework to SANS
  • Description modified (diff)

comment:3 Changed 6 years ago by Nick Draper

Moved to the backlog at the code freeze of R3.3

comment:4 Changed 6 years ago by Nick Draper

  • Milestone changed from Release 3.3 to Backlog

comment:5 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10888

Note: See TracTickets for help on using tickets.