Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
70d305b4
Commit
70d305b4
authored
10 years ago
by
Anders Markvardsen
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/feature/10107_xtend_lfpr_usage_example'
parents
a5a0bfd3
cfdc9e02
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/docs/source/algorithms/LoadFullprofResolution-v1.rst
+29
-4
29 additions, 4 deletions
...ntid/docs/source/algorithms/LoadFullprofResolution-v1.rst
with
29 additions
and
4 deletions
Code/Mantid/docs/source/algorithms/LoadFullprofResolution-v1.rst
+
29
−
4
View file @
70d305b4
...
...
@@ -37,25 +37,50 @@ Usage
.. testcode:: ExLoadFullprofResolutionSimple
# We run LoadFullprof Resolution with both the OutputTable workspace
# and an appropriate output workspace (group of 2)
# selecting 2 banks from the IRF file
ws = Load("MUSR00015189")
# Run algorithm. MUSR_01.irf has NPROF=13 in 2nd line, so IkedaCarpenterPV will be used.
tws = LoadFullprofResolution("MUSR_01.irf",Banks="3,5", Workspace="ws")
#Print first four rows
#Print first four rows of output table workspace
print "First 4 rows of OutputTableWorkspace"
for i in [0,1,2,3]:
row = tws.row(i)
print "{'Name': '%s', 'Value_3': %.2f, 'Value_5': %.2f}" % ( row["Name"], row["Value_3"], row["Value_5"] )
# Get the instrument with the parameters
inst = ws[0][0].getInstrument()
# demonstrate that the type of parameters saved are fitting parameters
print "Type of 3 parameters got from instrument in workspace"
print "Alpha0 type =", inst.getParameterType('Alpha0')
print "Beta0 type =", inst.getParameterType('Beta0')
print "SigmaSquared type =", inst.getParameterType('SigmaSquared')
# As of the time of writing,
# fitting instrument parameters cannot be
# accessed through the python API.
# They can be accessed via the file in the lext line, if uncommented:
#SaveParameterFile(ws[0][0], "instParam.xml")
#This file should contain the lines shown next and similar for other parameters:
# <parameter name="Alpha0">
# <value val="0 , IkedaCarpenterPV , Alpha0 , , , , Alpha0= , 1.5971070000000001 , , TOF , linear ; TOF ; TOF"/>
# </parameter>
Output:
.. testoutput:: ExLoadFullprofResolutionSimple
First 4 rows of OutputTableWorkspace
{'Name': 'BANK', 'Value_3': 3.00, 'Value_5': 5.00}
{'Name': 'Alph0', 'Value_3': 1.60, 'Value_5': 1.61}
{'Name': 'Alph1', 'Value_3': 1.50, 'Value_5': 1.30}
{'Name': 'Beta0', 'Value_3': 33.57, 'Value_5': 37.57}
Type of 3 parameters got from instrument in workspace
Alpha0 type = fitting
Beta0 type = fitting
SigmaSquared type = fitting
.. categories::
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment