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
1b3261b3
Commit
1b3261b3
authored
10 years ago
by
Nick Draper
Browse files
Options
Downloads
Patches
Plain Diff
re #9908 Load IsawPeaks and ConjoinFiles
parent
856b2b51
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Mantid/docs/source/algorithms/ConjoinFiles-v1.rst
+43
-0
43 additions, 0 deletions
Code/Mantid/docs/source/algorithms/ConjoinFiles-v1.rst
Code/Mantid/docs/source/algorithms/LoadIsawPeaks-v1.rst
+18
-0
18 additions, 0 deletions
Code/Mantid/docs/source/algorithms/LoadIsawPeaks-v1.rst
with
61 additions
and
0 deletions
Code/Mantid/docs/source/algorithms/ConjoinFiles-v1.rst
+
43
−
0
View file @
1b3261b3
...
@@ -12,4 +12,47 @@ Description
...
@@ -12,4 +12,47 @@ Description
Conjoin two workspaces, which are file based. Uses
Conjoin two workspaces, which are file based. Uses
:ref:`algm-ConjoinWorkspaces` to do the heavy-lifting.
:ref:`algm-ConjoinWorkspaces` to do the heavy-lifting.
The files are expected to be in a GSAS format, loadable by LoadGSS, with a .gsa or .txt extension.
.. hint:: The filename is expected to be of the format:
[instrument]_[run_no].[extension]
Usage
-----
**ConjoinFiles Example**
.. testcode:: ConjoinFilesEx
import os
#Create an absolute path by joining the proposed filename to a directory
#os.path.expanduser("~") used in this case returns the home directory of the current user
savePath = os.path.expanduser("~")
ws1Path = os.path.join(savePath, ConfigService.getInstrument().shortName() + "_1234.gsa")
ws2Path = os.path.join(savePath, ConfigService.getInstrument().shortName() + "_4567.gsa")
ws1 = CreateSampleWorkspace(WorkspaceType="Histogram", NumBanks=2, BankPixelWidth=1, BinWidth=10, Xmax=50)
print "Number of spectra in first workspace", ws1.getNumberHistograms()
SaveGSS(ws1, ws1Path, SplitFiles=False, Append=False)
ws2 = CreateSampleWorkspace(WorkspaceType="Histogram", NumBanks=3, BankPixelWidth=1, BinWidth=10, Xmax=50)
print "Number of spectra in second workspace", ws2.getNumberHistograms()
SaveGSS(ws2,ws2Path, SplitFiles=False, Append=False)
wsOutput = ConjoinFiles(RunNumbers=[1234,4567], Directory= savePath)
print "Number of spectra after ConjoinWorkspaces", wsOutput.getNumberHistograms()
os.remove(ws1Path)
os.remove(ws2Path)
Output:
.. testoutput:: ConjoinFilesEx
Number of spectra in first workspace 2
Number of spectra in second workspace 3
Number of spectra after ConjoinWorkspaces 5
.. categories::
.. categories::
This diff is collapsed.
Click to expand it.
Code/Mantid/docs/source/algorithms/LoadIsawPeaks-v1.rst
+
18
−
0
View file @
1b3261b3
...
@@ -17,4 +17,22 @@ NOTE: The instrument used is determined by reading the 'Instrument:' and
...
@@ -17,4 +17,22 @@ NOTE: The instrument used is determined by reading the 'Instrument:' and
latest `Instrument Definition File <Instrument Definition File>`__ is
latest `Instrument Definition File <Instrument Definition File>`__ is
used.
used.
Usage
-----
.. include:: ../usagedata-note.txt
**Example**
.. testcode:: LoadIsawPeaksEx
peaks = LoadIsawPeaks('TOPAZ_1204.peaks')
print "Number of peaks entries", peaks.getNumberPeaks()
Output:
.. testoutput:: LoadIsawPeaksEx
Number of peaks entries 36
.. categories::
.. 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