Ticket #9545 (closed: fixed)
Add setting of internal monitor workspace to LoadEventNexus
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | #9541 | |
Blocking: | #9540 | Tester: | Michael Wedel |
Description
...and possibly other loaders.
This is just setting the new internal pointer to the same workspace that will be added to the ADS with the "_monitors" suffix. It gives people the option of doing things either in the new or old way and hopefully might lead people to prefer the better 'new' way.
Change History
comment:1 Changed 6 years ago by Russell Taylor
- Status changed from new to assigned
- Blocked By 9541 added
comment:3 Changed 6 years ago by Russell Taylor
- Status changed from assigned to inprogress
Re #9545. Set internal monitor workspace pointer.
This is in addition to the existing ways of adding the workspace separately to the ADS with a "_monitors" suffix and returning it as an output property. This will allow the new way to be used going forward without breaking the old way.
Changeset: 22401766e1c578f1c120919a02e4d1f01c172e5f
comment:4 Changed 6 years ago by Russell Taylor
Re #9545. Add setting of the monitor workspace pointer.
This is in addition to the existing way of an additional ADS entry with "_monitors" suffix. It allows clients to use ExtractMonitorWorkspace on the main output workspace and not need to worry about the name of the workspace (it will work if LoadPreNexus was run as a subalgorithm, which is not the case for old way).
Changeset: 4988ec885f07c4ec9eb927fd8ba08916dfbd64f0
comment:5 Changed 6 years ago by Russell Taylor
Re #9545. Doxygen fix.
Changeset: 6de53295998d17c562f1c032ea3b07128c59d7f5
comment:6 Changed 6 years ago by Russell Taylor
- Status changed from inprogress to verify
- Resolution set to fixed
The three algorithms that currently load monitors into a "_monitors" ADS entry are LoadEventNexus, LoadPreNexus & LoadRaw. I've added the internal pointer for the first two. I'm not going to do LoadRaw because the logic in that algorithm is just too convoluted for me to easily put it in.
To test: Load a file using LoadEventNexus or LoadPreNexus. Make sure that LoadMonitors is checked. Run ExtractMonitorWorkspace on the main (not the "_monitors") output workspace and observe that (a) it succeeds, and (b) the workspace is the same as the "_monitors" one.
comment:7 Changed 6 years ago by Michael Wedel
- Status changed from verify to verifying
- Tester set to Michael Wedel
comment:8 Changed 6 years ago by Michael Wedel
- Status changed from verifying to closed
I tested this with the following small script, using data from systemtests:
import numpy as np data_7860, data_7860_monitors = LoadEventNexus(Filename='CNCS_7860_event.nxs',LoadMonitors='1') monitors = ExtractMonitorWorkspace(data_7860) assert(monitors.getNumberHistograms() == data_7860_monitors.getNumberHistograms()) for i in range(1, data_7860_monitors.getNumberHistograms()): yMonitorLoad = data_7860_monitors.readY(i) yMonitorExtract = monitors.readY(i) assert(np.array_equal(yMonitorLoad, yMonitorExtract))
It works as described, the arrays are identical. Executing the loading and extracting through the GUI dialogs also worked, I checked instrument and logs of the workspaces.
comment:9 Changed 6 years ago by Michael Wedel
Merge remote-tracking branch 'origin/feature/9545_loadeventnexus_add_internal_monitor'
Full changeset: 106853ecc28b1e5de826a4f762b48687c3aa3116
comment:10 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 10388