Skip to content

Commit

Permalink
Refs #9570 Changed fixed width formatting
Browse files Browse the repository at this point in the history
LoadLog now has a usage example

Most text which needs to be fixed width is now in code blocks. Those remaining using the double backtick (``) style are supposed to be like that as they're supposed to be inline
  • Loading branch information
keithnbrown committed Jun 11, 2014
1 parent d513d17 commit 272a8f9
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 16 deletions.
84 changes: 72 additions & 12 deletions Code/Mantid/docs/source/algorithms/LoadLog-v1.rst
Expand Up @@ -36,21 +36,81 @@ Load SNS text log file
If the file is determined to be a SNS text log file it should be of the
form

| ``655747325.450625   0.000000    24.000000   26.000000   0.000000``
| ``655747325.716250   0.296875    24.000000   26.000000   0.000000``
| ``655747325.997500   0.593750    24.000000   26.000000   0.000000``
| ``655747326.263125   0.906250    24.000000   26.000000   0.000000``
| ``655747326.544375   1.093750    24.000000   26.000000   0.000000``
| ``655747326.825625   1.406250    24.000000   26.000000   0.000000``
| ``655747327.091250   1.703125    24.000000   26.000000   0.000000``
| ``655747327.372500   2.000000    24.000000   26.000000   0.000000``
| ``655747327.638125   2.203125    24.000000   26.000000   0.000000``
| ``655747327.919375   2.500000    24.000000   26.000000   0.000000``
| ``655747328.200625   2.796875    24.000000   26.000000   0.000000``
| ``655747328.466250   3.093750    24.000000   26.000000   0.000000``
::

655747325.450625 0.000000 24.000000 26.000000 0.000000
655747325.716250 0.296875 24.000000 26.000000 0.000000
655747325.997500 0.593750 24.000000 26.000000 0.000000
655747326.263125 0.906250 24.000000 26.000000 0.000000
655747326.544375 1.093750 24.000000 26.000000 0.000000
655747326.825625 1.406250 24.000000 26.000000 0.000000
655747327.091250 1.703125 24.000000 26.000000 0.000000
655747327.372500 2.000000 24.000000 26.000000 0.000000
655747327.638125 2.203125 24.000000 26.000000 0.000000
655747327.919375 2.500000 24.000000 26.000000 0.000000
655747328.200625 2.796875 24.000000 26.000000 0.000000
655747328.466250 3.093750 24.000000 26.000000 0.000000

The first column is the number of seconds since January 1, 1990, then
the other columns (space delimited) are the log values. For this mode
the *name* and *units* parameters must be specified.

Usage
-----

**Example - Adding logs from a log file:**

.. testcode:: ExLoadLogSimple

# create histogram workspace
dataX1 = [0,1,2,3,4,5,6,7,8,9] # or use dataX1=range(0,10)
dataY1 = [0,1,2,3,4,5,6,7,8] # or use dataY1=range(0,9)
dataE1 = [1,1,1,1,1,1,1,1,1] # or use dataE1=[1]*9

ws = CreateWorkspace(dataX1, dataY1, dataE1)

#get the log data out of the Workspace's run object
run = ws.getRun()
logs= run.getLogData()
print "Logs before adding:"
for i in range(0,len(logs)):
print logs[i].name
#ExampleForLog.log is taken from a NIMROD run
LoadLog(ws,"ExampleForLog.log")
print ""

run = ws.getRun()
logs= run.getLogData()
print "Logs after adding:"
for i in range(0,len(logs)):
print logs[i].name

Output:

.. testoutput:: ExLoadLogSimple

Logs before adding:
run_title

Logs after adding:
run_title
beamcurrent
coupled_methane_temp
j5cx
j5cy
j6cx
j6cy
julabo_external
julabo_internal
moderator_horizontal
moderator_vertical
sample
sample_horizontal
sample_vertical
temp1
temp2
temp3
ts1beamcurrent
ts2beamcurrent

.. categories::
27 changes: 27 additions & 0 deletions Code/Mantid/docs/source/algorithms/LoadSPE-v1.rst
Expand Up @@ -17,4 +17,31 @@ have units of either `Momentum transfer / Q <Unit_Factory>`__ or
degrees, depending on the label in the input file. The workspace will be
flagged as a distribution.

File Format
###########

The expected file format is detailed on the :ref:`algm-SaveSPE` page.

Usage
-----

**Example - Load an SPE file:**

.. testcode:: ExLoadSPE

#run the loader by pointing it at the appropriate file.
#If it's in your managed user directories there's no need for an absolute path
ws1 = LoadSPE("Example.spe")

print "Number of Spectra:", ws1.getNumberHistograms()
print "Number of Bins:", ws1.blocksize()

Output:

.. testoutput:: ExLoadSPE

Number of Spectra: 32
Number of Bins: 195


.. categories::
11 changes: 7 additions & 4 deletions Code/Mantid/docs/source/algorithms/SaveReflTBL-v1.rst
Expand Up @@ -13,13 +13,16 @@ Saves a TableWorkspace at least 8 columns wide into an ASCII file in 17-column R

The 8 columns are grouped into rows of 17 according to stitch index, so up to 3 rows in the table would become a single row in the TBL file like so: (Where Z is an identical stitch group index, and - is ignored as only the first instance of P and Q are used in the file)

| ``A, B, C, D, E, P, Q, Z``
| ``F, G, H, I, J, -, -, Z``
| ``K, L, M, N, O, -, -, Z``
::

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

becomes
::

``A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q``
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q

Limitations
###########
Expand Down
File renamed without changes.
Empty file.

0 comments on commit 272a8f9

Please sign in to comment.