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
35e34a90
Commit
35e34a90
authored
9 years ago
by
Lynch, Vickie
Browse files
Options
Downloads
Patches
Plain Diff
Refs #11436 doc test for SCDCalibratePanels
parent
f3f480a2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/Testing/Data/DocTest/MANDI_801.peaks.md5
+1
-0
1 addition, 0 deletions
Code/Mantid/Testing/Data/DocTest/MANDI_801.peaks.md5
Code/Mantid/docs/source/algorithms/SCDCalibratePanels-v1.rst
+34
-12
34 additions, 12 deletions
Code/Mantid/docs/source/algorithms/SCDCalibratePanels-v1.rst
with
35 additions
and
12 deletions
Code/Mantid/Testing/Data/DocTest/MANDI_801.peaks.md5
0 → 100644
+
1
−
0
View file @
35e34a90
eca8af9c1ce4bd2b534f00ee50ab8ae7
This diff is collapsed.
Click to expand it.
Code/Mantid/docs/source/algorithms/SCDCalibratePanels-v1.rst
+
34
−
12
View file @
35e34a90
...
...
@@ -96,16 +96,38 @@ the InputWorkspace and the workspace you want to copy the calibration
to, the OutputWorkspace.
Usage
------
**Example - SCDCalibratePanels:**
LoadIsawPeaks(Filename='MANDI_801.peaks', OutputWorkspace='peaks')
SCDCalibratePanels(PeakWorkspace='peaks',DetCalFilename='mandi_801.DetCal',XmlFilename='mandi_801.xml',a=74,b=74.5,c=99.9,alpha=90,beta=90,gamma=60)
Load(Filename='MANDI_801_event.nxs', OutputWorkspace='MANDI_801_event')
CloneWorkspace(InputWorkspace='MANDI_801_event', OutputWorkspace='MANDI_801_event_xml')
LoadParameterFile(Workspace='MANDI_801_event_xml', Filename='mandi_801.xml')
RenameWorkspace(InputWorkspace='MANDI_801_event_xml', OutputWorkspace='MANDI_801_event_DetCal')
LoadIsawDetCal(InputWorkspace='MANDI_801_event_DetCal', Filename='mandi_801.DetCal')
-----
.. testcode:: SCDCalibratePanels
#Calibrate peaks file and load to workspace
LoadIsawPeaks(Filename='MANDI_801.peaks', OutputWorkspace='peaks')
#TimeOffset is not stored in xml file, so use DetCal output if you need TimeOffset
SCDCalibratePanels(PeakWorkspace='peaks',DetCalFilename='mandi_801.DetCal',XmlFilename='mandi_801.xml',a=74,b=74.5,c=99.9,alpha=90,beta=90,gamma=60,usetimeOffset=False)
LoadEmptyInstrument(Filename='MANDI_Definition_2013_08_01.xml', OutputWorkspace='MANDI_801_event_DetCal')
CloneWorkspace(InputWorkspace='MANDI_801_event_DetCal', OutputWorkspace='MANDI_801_event_xml')
LoadParameterFile(Workspace='MANDI_801_event_xml', Filename='mandi_801.xml')
LoadIsawDetCal(InputWorkspace='MANDI_801_event_DetCal', Filename='mandi_801.DetCal')
det1 = mtd['MANDI_801_event_DetCal'].getInstrument().getDetector(327680)
det2 = mtd['MANDI_801_event_xml'].getInstrument().getDetector(327680)
if det1.getPos() == det2.getPos():
print "matches"
.. testcleanup:: SCDCalibratePanels
DeleteWorkspace('peaks')
DeleteWorkspace('MANDI_801_event_xml')
DeleteWorkspace('MANDI_801_event_DetCal')
import os,mantid
filename=mantid.config.getString("defaultsave.directory")+"mandi_801.xml"
os.remove(filename)
filename=mantid.config.getString("defaultsave.directory")+"mandi_801.DetCal"
os.remove(filename)
Output:
.. testoutput:: SCDCalibratePanels
matches
.. 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