Skip to content
Snippets Groups Projects
Commit 303de1fc authored by Elliot Oram's avatar Elliot Oram
Browse files

Updated doc test to only run on Windows

Refs #13826
parent 771516c0
No related branches found
No related tags found
No related merge requests found
...@@ -25,24 +25,27 @@ Usage ...@@ -25,24 +25,27 @@ Usage
.. testcode:: QLRunExample .. testcode:: QLRunExample
# Load in test data # Check OS support for F2Py
sampleWs = Load('irs26176_graphite002_red.nxs') from IndirectImport import is_supported_f2py_platform
resWs = Load('irs26173_graphite002_red.nxs') if is_supported_f2py_platform():
# Load in test data
# Run QLRun algorithm sampleWs = Load('irs26176_graphite002_red.nxs')
QLRun(Program="QL", SampleWorkspace=sampleWs, ResolutionWorkspace=resWs, MinRange=-0.547607, MaxRange=0.543216, SampleBins=1, ResolutionBins=1, Elastic=False, Background="Sloping", FixedWidth=False, UseResNorm=False, WidthFile="", Loop=True, Save=False, Plot="None") resWs = Load('irs26173_graphite002_red.nxs')
outputName = 'samp_QLd_Workspace_0'
# Run QLRun algorithm
# capture first fitted workspace QLRun(Program="QL", SampleWorkspace=sampleWs, ResolutionWorkspace=resWs, MinRange=-0.547607, MaxRange=0.543216, SampleBins=1, ResolutionBins=1, Elastic=False, Background="Sloping", FixedWidth=False, UseResNorm=False, WidthFile="", Loop=True, Save=False, Plot="None")
result_ws = mtd[outputName] outputName = 'samp_QLd_Workspace_0'
# Print the result # capture first fitted workspace
print "The Y values of the first fitted workspace are:" result_ws = mtd[outputName]
print "data : %.5f" %(result_ws.readY(0)[0])
print "fit.1 : %.5f" %(result_ws.readY(1)[0]) # Print the result
print "diff.1: %.5f" %(result_ws.readY(2)[0]) print "The Y values of the first fitted workspace are:"
print "fit.2 : %.5f" %(result_ws.readY(3)[0]) print "data : %.5f" %(result_ws.readY(0)[0])
print "diff.2: %.5f" %(result_ws.readY(4)[0]) print "fit.1 : %.5f" %(result_ws.readY(1)[0])
print "diff.1: %.5f" %(result_ws.readY(2)[0])
print "fit.2 : %.5f" %(result_ws.readY(3)[0])
print "diff.2: %.5f" %(result_ws.readY(4)[0])
Output: Output:
......
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