Ticket #4276 (closed: fixed)
SliceViewer: read XML from multislice to open the slice viewer at a particular point
Reported by: | Janik Zikovsky | Owned by: | Janik Zikovsky |
---|---|---|---|
Priority: | major | Milestone: | Release 2.0 |
Component: | Mantid | Keywords: | |
Cc: | reuterma@…, owen.arnold@… | Blocked By: | |
Blocking: | #4310 | Tester: | Owen Arnold |
Description
Interpret the XML to open the slice viewer on the same slice being viewed in the VATES simple gui.
Change History
comment:2 Changed 9 years ago by Michael Reuter
OK, here is the XML that will be generated by the slice from the simple interface:
<MDInstruction><MDWorkspaceName>TOPAZ_3680</MDWorkspaceName><DimensionSet><Dimension ID="Q_lab_x"><Name>Q_lab_x</Name><Units>Angstroms^-1</Units><UpperBounds>15.0000</UpperBounds><LowerBounds>-15.0000</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="Q_lab_y"><Name>Q_lab_y</Name><Units>Angstroms^-1</Units><UpperBounds>15.0000</UpperBounds><LowerBounds>-15.0000</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="Q_lab_z"><Name>Q_lab_z</Name><Units>Angstroms^-1</Units><UpperBounds>15.0000</UpperBounds><LowerBounds>0.0000</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><XDimension><RefDimensionId>Q_lab_x</RefDimensionId></XDimension><YDimension><RefDimensionId>Q_lab_y</RefDimensionId></YDimension><ZDimension><RefDimensionId>Q_lab_z</RefDimensionId></ZDimension><TDimension><RefDimensionId/></TDimension></DimensionSet><Function><Type>PlaneImplicitFuction</Type><ParameterList><Parameter><Type>NormalParameter</Type><Value>1 0 0</Value></Parameter><Parameter><Type>OriginParameter</Type><Value>4.84211 0 0</Value></Parameter></ParameterList></Function></MDInstruction>
comment:3 Changed 9 years ago by Janik Zikovsky
Can you give me an example of XML that would come if someone where viewing a slice in a 4D workspace?
comment:4 Changed 9 years ago by Michael Reuter
Here is a 4D XML:
<MDInstruction><MDWorkspaceName>fe_demo_sqw</MDWorkspaceName><DimensionSet><Dimension ID="Q_\zeta"><Name>Q_\zeta</Name><Units>Ang</Units><UpperBounds>5.7415</UpperBounds><LowerBounds>-1.5197</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="Q_\xi"><Name>Q_\xi</Name><Units>Ang</Units><UpperBounds>6.7070</UpperBounds><LowerBounds>-6.6071</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="Q_\eta"><Name>Q_\eta</Name><Units>Ang</Units><UpperBounds>6.6071</UpperBounds><LowerBounds>-6.6071</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="E"><Name>E</Name><Units>MeV</Units><UpperBounds>150.0000</UpperBounds><LowerBounds>0.0000</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><XDimension><RefDimensionId>Q_\zeta</RefDimensionId></XDimension><YDimension><RefDimensionId>Q_\xi</RefDimensionId></YDimension><ZDimension><RefDimensionId>Q_\eta</RefDimensionId></ZDimension><TDimension><RefDimensionId>E</RefDimensionId></TDimension></DimensionSet><Function><Type>PlaneImplicitFuction</Type><ParameterList><Parameter><Type>NormalParameter</Type><Value>1 0 0</Value></Parameter><Parameter><Type>OriginParameter</Type><Value>3.98234 0 0</Value></Parameter></ParameterList></Function></MDInstruction>
comment:5 Changed 9 years ago by Janik Zikovsky
Thank you - but I think it is missing the information of what is the current "Time" value for the 4th dimension (Energy in this example).
comment:6 Changed 9 years ago by Michael Reuter
- Cc owen.arnold@… added
Yes, that is an important piece of information. However, the current XML schema doesn't support it and I'm not sure where to place that type of information. That's why I'm including Owen on this ticket. What we could do in the meantime is have an optional argument in the function that takes the XML for a time parameter. 4D datasets could pass their initial time that way. We'd also need a mechanism for updating the SliceViewers when the animation controls are used. Alternatively, we can make the user open a new instance.
comment:7 Changed 9 years ago by Owen Arnold
How about adding an extra element to <TDimension>? Something like <Value></Value>, so the current xml would change from <TDimension><RefDimensionId>E</RefDimensionId></TDimension> to <TDimension><RefDimensionId>E</RefDimensionId><Value>10.1</Value><TDimension>
Just make sure that the Schema in the Vates ADD is kept up to date. Alas, Poco xml isn't sophisticated enough to understand or work with schemas, so all the xml processing is manual. I think everything else should just work. In any case, the exising functionality is heavily unit-tested/gui-tested so you should easily identify anything that breaks as a result of this change.
comment:8 Changed 9 years ago by Michael Reuter
OK, here is the XML for a 4D dataset with the timestep value inserted:
<MDInstruction><MDWorkspaceName>fe_demo_sqw</MDWorkspaceName><DimensionSet><Dimension ID="Q_\zeta"><Name>Q_\zeta</Name><Units>Ang</Units><UpperBounds>5.7415</UpperBounds><LowerBounds>-1.5197</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="Q_\xi"><Name>Q_\xi</Name><Units>Ang</Units><UpperBounds>6.7070</UpperBounds><LowerBounds>-6.6071</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="Q_\eta"><Name>Q_\eta</Name><Units>Ang</Units><UpperBounds>6.6071</UpperBounds><LowerBounds>-6.6071</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><Dimension ID="E"><Name>E</Name><Units>MeV</Units><UpperBounds>150.0000</UpperBounds><LowerBounds>0.0000</LowerBounds><NumberOfBins>10</NumberOfBins></Dimension><XDimension><RefDimensionId>Q_\zeta</RefDimensionId></XDimension><YDimension><RefDimensionId>Q_\xi</RefDimensionId></YDimension><ZDimension><RefDimensionId>Q_\eta</RefDimensionId></ZDimension><TDimension><RefDimensionId>E</RefDimensionId><Value>60</Value></TDimension></DimensionSet><Function><Type>PlaneImplicitFuction</Type><ParameterList><Parameter><Type>NormalParameter</Type><Value>1 0 0</Value></Parameter><Parameter><Type>OriginParameter</Type><Value>3.90749 0 0</Value></Parameter></ParameterList></Function></MDInstruction>
comment:10 Changed 9 years ago by Janik Zikovsky
Refs #4276: Accidentally committed too many files. making test pass
Changeset: dc5779f5a101a6ee7c97d2046d35ad39f57b411e
comment:11 Changed 9 years ago by Janik Zikovsky
Refs #4276: test disabled for RHEL5
Changeset: 9fa84f36431e18bfea3ab512b23cff820efaf3a2
comment:12 Changed 9 years ago by Michael Reuter
When a rebinner is used from within the simple interface via MantidPlot, the output workspace name is now: __wsName_mdhisto where wsName is that given in the XML.
comment:13 Changed 9 years ago by Janik Zikovsky
refs #4276: reading XML from MultiSlice in SliceViewer
Also make the sip code generate several .cpp files for parallel compilation
Changeset: 8ae3779074315920fe989a055c29cd3b8d59e610
comment:14 Changed 9 years ago by Janik Zikovsky
Refs #4276 unsplit sip file
Changeset: c123635211b7e80e6fb0250fa1ba8a7bd8668c0b
comment:15 Changed 9 years ago by Janik Zikovsky
Refs #4276 trying to undo
Changeset: 5b4551979f25ab936be0830e00ec3ef8a2c9c3b5
comment:16 Changed 9 years ago by Janik Zikovsky
Refs #4276 Open SliceViewer from MultiSlice. Fun!
Looks like it works well on the original workspace at least. Not yet tested on rebinned version (i'm not yet looking for the rebinned name)
Changeset: 004e39919dd05690044cf035a9655112478699c7
comment:17 Changed 9 years ago by Janik Zikovsky
Refs #4276: MultiSlice will open the rebinned view in sliceviewer
If the workspace exists. Also a plotSlice() fix.
Changeset: 1a1b18cbc294e73e3c77d9b46d9c9158ff9b624b
comment:18 Changed 9 years ago by Janik Zikovsky
Refs #4276: test disabled for RHEl5
Changeset: a38a0322fc6c918236d997c2ea090613b1f28b34
comment:19 Changed 9 years ago by Janik Zikovsky
- Status changed from accepted to verify
- Resolution set to fixed
comment:20 Changed 9 years ago by Owen Arnold
- Status changed from verify to verifying
- Tester set to Owen Arnold
comment:21 Changed 9 years ago by Owen Arnold
- Status changed from verifying to closed
Works nicely off the right-click menu on each slider.
Numeric value for slice position reported accurately.
comment:22 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 5123