Skip to content
Snippets Groups Projects
Commit 25a8e140 authored by Joseph Ramsay's avatar Joseph Ramsay
Browse files

Re #20816 Tidied up QueryMDWorkspace test

parent f17aebe6
No related branches found
No related tags found
No related merge requests found
......@@ -29,18 +29,18 @@ Usage
.. testcode:: ExQueryMDWorkspace
# create sample inelastic workspace for MARI instrument containing 1 at all spectra
ws1=CreateSimulationWorkspace(Instrument='MAR',BinParams='-10,1,10',UnitX='DeltaE')
AddSampleLog(ws1,'Ei','12.','Number')
ws2=ws1*2;
ws1 = CreateSimulationWorkspace(Instrument='MAR', BinParams='-10,1,10', UnitX='DeltaE')
AddSampleLog(ws1, 'Ei', '12.', 'Number')
ws2 = ws1 * 2;
# Convert to MD
mdWs1 =ConvertToMD(InputWorkspace=ws1,QDimensions='|Q|',QConversionScales='Q in A^-1',SplitInto='10,10',MaxRecursionDepth='1')
mdWs1 = ConvertToMD(InputWorkspace=ws1, QDimensions='|Q|', QConversionScales='Q in A^-1', SplitInto='10,10', MaxRecursionDepth='1')
# get the query
table = QueryMDWorkspace(InputWorkspace=mdWs1)
# look at the output:
col_names=table.keys();
name0=col_names[0];
col_names = table.keys();
name0 = col_names[0];
nRows = len(table.column(name0));
print("Table contains {0} rows".format(nRows))
print("first 11 of them are:")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment