Skip to content

Commit

Permalink
Refs #10192 Remove output test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmborr committed Aug 29, 2014
1 parent f53be56 commit 925ebbb
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions Code/Mantid/docs/source/algorithms/DSFinterp-v1.rst
Expand Up @@ -100,23 +100,25 @@ Finally, we load experimental data for these two temperatures so that we can com
LoadNexus(FileName='DSFinterp/{0}.nxs'.format(workspaces[i]), OutputWorkspace=workspaces[i]) #load QENS data
target_temps = [175, 225]
outworkspaces = ['int175K', 'int225K']
DSFinterp(Workspaces=workspaces, ParameterValues=temp_flt, RegressionWindow=0, TargetParameters=target_temps, OutputWorkspaces=outworkspaces)
#Now load experimental data for target temperatures
LoadNexus(FileName='DSFinterp/exp175K.nxs', OutputWorkspace='exp175K')
LoadNexus(FileName='DSFinterp/exp225K.nxs', OutputWorkspace='exp225K')
#Compare one of the predicted spectrum with a fit to experimental data
myFunc= 'name=TabulatedFunction,Workspace=int225K,WorkspaceIndex=8,Scaling=1.00424'
fitStatus, chiSq, covarianceTable, paramTable, fitWorkspace =\
Fit(Function=myFunc, InputWorkspace='exp225K', WorkspaceIndex=8, Output='fit')

print "The fit was: " + fitStatus
print("Fitted Height value is: %.2f" % paramTable.column(1)[0])
print("Chi-square is: %.2f" % paramTable.column(1)[1])
try:
import dsfinterp # Have you installed the dsfinterp module? (pip install dsfinterp)
DSFinterp(Workspaces=workspaces, ParameterValues=temp_flt, RegressionWindow=0, TargetParameters=target_temps, OutputWorkspaces=outworkspaces)
#Now load experimental data for target temperatures
LoadNexus(FileName='DSFinterp/exp175K.nxs', OutputWorkspace='exp175K')
LoadNexus(FileName='DSFinterp/exp225K.nxs', OutputWorkspace='exp225K')
#Compare one of the predicted spectrum with a fit to experimental data
myFunc= 'name=TabulatedFunction,Workspace=int225K,WorkspaceIndex=8,Scaling=1.00424'
fitStatus, chiSq, covarianceTable, paramTable, fitWorkspace =\
Fit(Function=myFunc, InputWorkspace='exp225K', WorkspaceIndex=8, Output='fit')
#print "The fit was: " + fitStatus
#print("Fitted Height value is: %.2f" % paramTable.column(1)[0])
#print("Chi-square is: %.2f" % paramTable.column(1)[1])
except ImportError as exc:
#print("Error: failed to import settings module ({0})".format(exc))
pass

Output:

.. testoutput:: Ex

The fit was: success
Fitted Height value is: 1.00
Chi-square is: 2.27
Expand Down

0 comments on commit 925ebbb

Please sign in to comment.