Ticket #5670 (closed: fixed)
New algorithm: CopyInstrumentParameters
Reported by: | Anders Markvardsen | Owned by: | Karl Palmen |
---|---|---|---|
Priority: | critical | Milestone: | Release 2.3 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Anders Markvardsen |
Description
Parameters
InputWorkspace OutputWorkspace
Simply just transfer the instrument from one workspace (InputWorkspace) to another (OutputWorkspace).
Before doing any transfer the algorithm should check that the in and out workspaces belong to the same instrument.
Change History
comment:1 Changed 8 years ago by Anders Markvardsen
- Status changed from new to assigned
- Owner set to Karl Palmen
comment:2 Changed 8 years ago by Karl Palmen
May be as simple as
i = InputWorkspace.getInstrument() OutputWorkspace.setInstrument(i)
but perhaps instrument i should be copied and the copy used in the 2nd step.
comment:4 Changed 8 years ago by Karl Palmen
I've found that copying the instrument i won't work for a parameterised instrument. So I'll try just copying the parameters. This will require interating through the parameters.
comment:5 Changed 8 years ago by Karl Palmen
Added code compilable but not tested re #5670
Changeset: f70366738f645d9e0e5a103ab501740ea4a7733c
comment:6 Changed 8 years ago by Karl Palmen
Tidied up code and did some testing re #5670
Changeset: 8b0bf2ea75bf84fcd7231c1a25f9729b28fe3a6e
comment:7 Changed 8 years ago by Karl Palmen
Algorithm now available for the next nightly release for use by Robert Bewley.
Unit tests will be need for the algorithm and the new function ExperimentInfo::ReplaceInstrument() .
comment:8 Changed 8 years ago by Karl Palmen
- Status changed from accepted to verify
- Resolution set to fixed
comment:9 Changed 8 years ago by Karl Palmen
Added code compilable but not tested re #5670
Changeset: f70366738f645d9e0e5a103ab501740ea4a7733c
comment:10 Changed 8 years ago by Karl Palmen
Tidied up code and did some testing re #5670
Changeset: 8b0bf2ea75bf84fcd7231c1a25f9729b28fe3a6e
comment:11 Changed 8 years ago by Gesner Passos
- Status changed from verify to verifying
- Tester set to Gesner Passos
comment:12 Changed 8 years ago by Gesner Passos
- Status changed from verifying to verify
- Tester Gesner Passos deleted
comment:13 Changed 8 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:14 Changed 8 years ago by Martyn Gigg
#5904 renamed this to CopyInstrumentParameters
comment:15 Changed 8 years ago by Martyn Gigg
- Status changed from verifying to closed
Checked with the following script that the moved detector was transferred to the ws2 but that an error was raised when trying to transfer to ws3, which is a different instrument
ws1 = Load(Filename='MAR11001.raw') ws2 = Load(Filename='MAR11001.raw') ws3 = Load(Filename='IRS38633.raw') MoveInstrumentComponent(ws1,DetectorID=4101,X=1,Y=1,Z=1,RelativePosition=0) ws2 = CopyInstrumentParameters(ws1,ws2) ws3 = CopyInstrumentParameters(ws1,ws3)
comment:16 Changed 8 years ago by Karl Palmen
- Status changed from closed to reopened
- Resolution fixed deleted
The algorithm was not found in the Algorithms drop down box when copy... is typed in it. This is because it has no category. Category the same as similar algorithm needs to be added.
comment:17 Changed 8 years ago by Karl Palmen
- Status changed from reopened to accepted
- Summary changed from New algorithm: TransferInstrument to New algorithm: CopyInstrumentParameters
comment:18 Changed 8 years ago by Karl Palmen
Enabled appearance in GUI re #5670
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 154ea4d25b85dc22f68b7b27eec1fc587858c96f
comment:19 Changed 8 years ago by Karl Palmen
- Status changed from accepted to verify
- Resolution set to fixed
To test, load two workpsaces with same base instrument, then run algorithm from GUI.
comment:20 Changed 8 years ago by Anders Markvardsen
- Status changed from verify to verifying
- Tester changed from Martyn Gigg to Anders Markvardsen
comment:21 Changed 8 years ago by Anders Markvardsen
- Status changed from verifying to closed
I have tested that CopyInstrumentParameters works including show up in MantidPlot
comment:22 Changed 8 years ago by Karl Palmen
Enabled appearance in GUI re #5670
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 154ea4d25b85dc22f68b7b27eec1fc587858c96f
comment:23 Changed 8 years ago by Karl Palmen
Enabled appearance in GUI re #5670
Signed-off-by: Karl Palmen <karl.palmen@…>
Changeset: 154ea4d25b85dc22f68b7b27eec1fc587858c96f
comment:24 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 6516