Skip to content

Commit

Permalink
refs #9916. LoadReflTbl docs and test.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Aug 27, 2014
1 parent d3cdcab commit 3504c26
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
Expand Up @@ -448,7 +448,7 @@ namespace Mantid
* @param monitorIndex : Monitor index
* @param wavelengthMinMax : Wavelength min max for detector workspace
* @param backgroundMinMax : Wavelength min max for flat background correction of monitor workspace
* @param wavelengthStep : Wavlength step size for rebinning.
* @param wavelengthStep : Wavelength step size for rebinning.
* @return Tuple of detector and monitor workspaces
*/
ReflectometryWorkflowBase::DetectorMonitorWorkspacePair ReflectometryWorkflowBase::toLam(
Expand Down
37 changes: 31 additions & 6 deletions Code/Mantid/docs/source/algorithms/LoadReflTBL-v1.rst
Expand Up @@ -13,12 +13,37 @@ LoadReflTBl is loads ascii files in Reflectometry TBL format into a
tableworkspace. Format accepted is strict to only allow 17 columns of
data.

The 17 columns are split up into rows of 8, so a single row in the TBL
file would be split into 3 colums like so: (Where Z is the newly created
stitch group index) A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q
The ascii format contains up to runs per row. The in-memory table workspace puts each run on its own row, with a 'StitchGroup' id used to determine which runs should be
stitched together. The columns in the table workspace schema are **Run(s),ThetaIn,TransRun(s),Qmin,Qmax,dq/q,Scale,StitchGroup** in that order.

becomes
Usage
-----

A, B, C, D, E, P, Q, Z F, G, H, I, J, P, Q, Z K, L, M, N, O, P, Q, Z
**Example - Simple loading**

.. categories::
.. testcode:: LoadReflTBL1

table = Load(Filename="INTER_NR.tbl")

first_row = table.row(0)
second_row = table.row(1)

print "Rows:", table.rowCount()
print "Columns:", table.columnCount()
print "Column names:", table.getColumnNames()
print "First run:", first_row['Run(s)']
print "Second run:", second_row['Run(s)']

Output
------

.. testoutput:: LoadReflTBL1

Rows: 2
Columns: 8
Column names: ['Run(s)','ThetaIn','TransRun(s)','Qmin','Qmax','dq/q','Scale','StitchGroup']
First run: 13460
Second run: 13462


.. categories:: LoadReflTBL1

0 comments on commit 3504c26

Please sign in to comment.