diff --git a/docs/source/algorithms/QLRun-v1.rst b/docs/source/algorithms/QLRun-v1.rst index a1e15172aed15226ef39673534fa280f4f16fb80..7a333daf2960a72e69cd00c727e9edfd35d1a29b 100644 --- a/docs/source/algorithms/QLRun-v1.rst +++ b/docs/source/algorithms/QLRun-v1.rst @@ -25,24 +25,27 @@ Usage .. testcode:: QLRunExample - # Load in test data - sampleWs = Load('irs26176_graphite002_red.nxs') - resWs = Load('irs26173_graphite002_red.nxs') - - # Run QLRun algorithm - 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") - outputName = 'samp_QLd_Workspace_0' - - # capture first fitted workspace - result_ws = mtd[outputName] - - # Print the result - print "The Y values of the first fitted workspace are:" - print "data : %.5f" %(result_ws.readY(0)[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]) + # Check OS support for F2Py + from IndirectImport import is_supported_f2py_platform + if is_supported_f2py_platform(): + # Load in test data + sampleWs = Load('irs26176_graphite002_red.nxs') + resWs = Load('irs26173_graphite002_red.nxs') + + # Run QLRun algorithm + 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") + outputName = 'samp_QLd_Workspace_0' + + # capture first fitted workspace + result_ws = mtd[outputName] + + # Print the result + print "The Y values of the first fitted workspace are:" + print "data : %.5f" %(result_ws.readY(0)[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: