Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs #11414
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
Code/Mantid/docs/source/algorithms/AddSampleLogMultiple-v1.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.. algorithm:: | ||
|
||
.. summary:: | ||
|
||
.. alias:: | ||
|
||
.. properties:: | ||
|
||
Description | ||
----------- | ||
|
||
This algorithm provides a way of adding multiple sample log enteries to a | ||
workspace at once by making multiple calls to the :ref:`algm-AddSampleLog` | ||
algorithm. | ||
|
||
Typically this is for use in workflow algorithms and scripts. | ||
|
||
Usage | ||
----- | ||
|
||
**Example - Add multiple sample logs** | ||
|
||
.. testcode:: AddSampleLogMultipleExample | ||
|
||
# Create a host workspace | ||
demo_ws = CreateWorkspace(DataX=range(0,3), DataY=(0,2)) | ||
|
||
# Add sample logs | ||
log_names = ['x', 'y', 'z'] | ||
log_values = ['test', 5, 1.6e-7] | ||
AddSampleLogMultiple(Workspace=demo_ws, | ||
LogNames=log_names, | ||
LogValues=log_values) | ||
|
||
# Print the log values | ||
run = demo_ws.getRun() | ||
print run.getLogData('x').value | ||
print run.getLogData('y').value | ||
print run.getLogData('z').value | ||
|
||
Output: | ||
|
||
.. testoutput:: AddSampleLogMultipleExample | ||
|
||
test | ||
5 | ||
1.6e-07 | ||
|
||
.. categories:: |