Skip to content
Snippets Groups Projects
Commit 14d53c6f authored by Nick Draper's avatar Nick Draper
Browse files

xrange -> range and sorting indentation

re #20869
parent 024d4906
No related branches found
No related tags found
No related merge requests found
......@@ -93,21 +93,21 @@ Usage
.. testcode:: UnwrapMonitor
# Create a raw data workspace.
ws = CreateSampleWorkspace()
# Create a raw data workspace.
ws = CreateSampleWorkspace()
# The result variable will contain a tuple: (OutputWorkspace, JoinWaveLength)
# To access individual outputs use result[i] where i is the index of the required output.
result = UnwrapMonitor(InputWorkspace=ws,LRef=11)
# The result variable will contain a tuple: (OutputWorkspace, JoinWaveLength)
# To access individual outputs use result[i] where i is the index of the required output.
result = UnwrapMonitor(InputWorkspace=ws,LRef=11)
print("JoinWaveLength is: " + str(result[1]))
print("JoinWaveLength is: " + str(result[1]))
Output:
.. testoutput:: UnwrapMonitor
:options: +ELLIPSIS
JoinWaveLength is: 1.4241722...
JoinWaveLength is: 1.4241722...
.. categories::
......
......@@ -83,7 +83,7 @@ Usage
# get first 10 detectors using detector ID
print("{0} {1} instrument".format(instr_type, instr.getName()))
for i in xrange(0,10):
for i in range(0,10):
if i<3:
detBase = 1
else:
......@@ -111,7 +111,7 @@ Usage
# prepare through each spectra in the test workspace and change its detector calibration parameters
f.write(' Test calibration file \n')
f.write(' detID theta delay source_dist detector_dist\n')
for i in xrange(0,6):
for i in range(0,6):
f.write('{0} {1} {2} {3} {4} {5}\n'.format(i+1,(i+1)*3.1415926/200,0.5,100,(i+1)*3.1415926/5,10))
f.close();
......
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