Skip to content

Commit

Permalink
CheckForSampleLogs documentation. Refs #9571
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiSavici committed Jun 25, 2014
1 parent 7dc5e95 commit 0708737
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
Expand Up @@ -24,7 +24,7 @@ def PyInit(self):
"""
self.declareProperty(WorkspaceProperty("Workspace", "",Direction.Input), "The workspace to check.")
self.declareProperty("LogNames","","Names of the logs to look for")
self.declareProperty("Result","",Direction.Output)
self.declareProperty("Result","A string that will be empty if all the logs are found, otherwise will contain an error message",Direction.Output)
return

def PyExec(self):
Expand Down
32 changes: 31 additions & 1 deletion Code/Mantid/docs/source/algorithms/CheckForSampleLogs-v1.rst
Expand Up @@ -9,6 +9,36 @@
Description
-----------

Check if the workspace has some given sample logs
Check if the workspace has some given sample logs. An empty string will be returned if all the logs are found, otherwise the result is an error message


Usage
-----

.. include:: ../usagedata-note.txt

.. testcode:: CheckForSampleLogs

#load a workspace with logs
ws=Load("CNCS_7860")

sampleLogs="Phase1,Phase3"
result=CheckForSampleLogs(ws,sampleLogs)
if len(result)==0:
print "We found logs for "+sampleLogs
sampleLogs="DJIA"
result=CheckForSampleLogs(ws,sampleLogs)
print result

.. testcleanup:: CheckForSampleLogs

DeleteWorkspace('ws')

Output:

.. testoutput:: CheckForSampleLogs

We found logs for Phase1,Phase3
Property DJIA not found

.. categories::

0 comments on commit 0708737

Please sign in to comment.