Ticket #2081 (closed: fixed)
NormaliseToMonitor changes input monitor workspace
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | major | Milestone: | Iteration 26 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Steve Williams |
Description
If a separate monitor workspace is passed to NormaliseToMonitor, it gets changed during the internal calculations of that algorithm.
Change History
comment:2 Changed 10 years ago by Russell Taylor
- Status changed from accepted to verify
- Resolution set to fixed
comment:3 Changed 10 years ago by Nick Draper
- Milestone changed from Iteration 26 to Iteration 27
Bulk move of tickets to iteration 27, if your ticket is essential for Iteration 26 then move it back.
comment:4 Changed 10 years ago by Nick Draper
- Milestone changed from Iteration 27 to Iteration 26
Sorry I didn't mean to move these ones reverting back to It 26
comment:5 Changed 10 years ago by Michael Whitty
- Status changed from verify to verifying
- Tester set to Michael Whitty
comment:6 Changed 10 years ago by Michael Whitty
- Status changed from verifying to reopened
- Resolution fixed deleted
I'm going to assume that this is undesired behavoir, though I'm not really sure what this ticket was meant to accomplish, but I'm reopenning it because NormaliseToMonitor will still modify the input MonitorWorkspace.
Script example:
LoadRaw('irs21360.raw', 'irs21360') ExtractSingleSpectrum('irs21360', 'monitor', 0) NormaliseToMonitor('irs21360', 'normed', MonitorWorkspace='monitor')
You'll see that the ws 'monitor' has been normalised to ~1.
comment:7 Changed 10 years ago by Russell Taylor
- Status changed from reopened to accepted
I think you must have tested this on an old version because it's definitely fixed in changeset [8160] that I now see I checked in under #2014 by mistake.
The behaviour was not OK because algorithms should never change the data in input workspaces (only InOut or Output ones). Some time ago I attempted to enforce this programatically, but retrofitting const in notoriously difficult.
comment:8 Changed 10 years ago by Russell Taylor
- Status changed from accepted to verify
- Resolution set to fixed
comment:9 Changed 10 years ago by Steve Williams
- Status changed from verify to verifying
- Tester changed from Michael Whitty to Steve Williams
comment:10 Changed 10 years ago by Steve Williams
- Status changed from verifying to closed
The problem seems to have gone away, for example this:
LoadRaw('c:/mantid/test/data/irs21360.raw', 'irs21360') ExtractSingleSpectrum('irs21360', 'monitor', 0) ExtractSingleSpectrum('irs21360', 'monitor1', 0) NormaliseToMonitor('irs21360', 'normed', MonitorWorkspace='monitor') CheckWorkspacesMatch("monitor", "monitor1")
works.
comment:11 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 2928