Ticket #9205 (closed: fixed)
Extend "Instrument" Property of LoadMask to Accept Filenames
Reported by: | Peter Parker | Owned by: | Peter Parker |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #9204 | Tester: | Jay Rainey |
Description (last modified by Peter Parker) (diff)
There is a problem with the current state of LoadMask/SaveMask, whereby date information corresponding to the run being masked does not survive the "roundtrip" of being written out and then read back in. This is problematic for runs which use an older version of an instrument's IDF.
Try the following:
- Load EMU00018846 from the archive. (Runs 18846 and earlier for Emu all use an outdated IDF with 32 detectors.)
- Open up the Instrument View, mask some detectors, then do "Apply and Save".
- Use LoadMask to read the mask file back in to Mantid.
- The loading process uses the latest version of the IDF (with 96 detectors), and so you will find that viewing the mask in the Instrument View will show a change in the instrument layout.
Hopefully this hole will be addressed as part of the masking redesign (see #8914), but in the meantime Martyn proposed that we simply allow the Instrument property of LoadMask to accept file paths as well as Instrument names. I.e., if a file path is given that points to an existing IDF then we will use that when loading the mask, else we will treat the property as an instrument name and simply use the old behaviour.
Change History
comment:2 Changed 6 years ago by Peter Parker
- Status changed from assigned to inprogress
Refs #9205 - While we're revisiting the property, add a validator.
(This change is a safe one to make as the property was essentially mandatory anyway -- previously we were just checking in the exec portion of the alg rather than in init.)
Changeset: 314338295d26304e0686f5ff25cc322dd15a3c7a
comment:3 Changed 6 years ago by Peter Parker
Refs #9205 - Change existing unit tests to use ScopedFiles.
Changeset: 7c55d111bac5de399143b00acf46bd2766f5adb3
comment:4 Changed 6 years ago by Peter Parker
Refs #9205 - Allow loading of masks by IDF as well as by name.
Changeset: de48fa3b0136371681dd30cd729fb1ab4f7d1197
comment:5 Changed 6 years ago by Peter Parker
Refs #9205 - Remove commented-out line.
Changeset: eb086efe437f30c36e2662fd4350fd83336778f8
comment:6 Changed 6 years ago by Peter Parker
- Status changed from inprogress to verify
- Resolution set to fixed
- type changed from defect to enhancement
Tester:
- Make sure that the unit test covers the new functionality of "load by IDF".
- Try it for yourself. Follow the steps listed in the ticket description, but when running LoadMask specify the old version of the IDF. Doing this with Emu data is not mandatory -- any instrument with multiple IDFs over its history will do.
comment:7 Changed 6 years ago by Peter Parker
- Status changed from verify to reopened
- Resolution fixed deleted
comment:9 Changed 6 years ago by Peter Parker
- Status changed from reopened to verify
- Resolution set to fixed
comment:11 Changed 6 years ago by Jay Rainey
- Status changed from verify to verifying
- Tester set to Jay Rainey
comment:12 Changed 6 years ago by Jay Rainey
- Status changed from verifying to closed
Changes made address the issue, and improvements to unit test are good. Code is clean, and build servers are green. Closing.
comment:13 Changed 6 years ago by Jay Rainey
Merge remote-tracking branch 'origin/feature/9205_extend_instrument_prop_of_loadmask_to_accept_idfs'
Full changeset: c419ca4fa20dee69c0fc4f36b90ec9ab62457c51
comment:14 Changed 6 years ago by Owen Arnold
comment:15 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10048