Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
Workspace | Input | Workspace | Mandatory | The workspace to check. |
LogNames | Input | string | Names of the logs to look for | |
Result | Output | string |
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
Note
To run these usage examples please first download the usage data, and add these to your path. In MantidPlot this is done using Manage User Directories.
#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 {}".format(sampleLogs))
sampleLogs="DJIA"
result=CheckForSampleLogs(ws,sampleLogs)
print(result.strip())
Output:
We found logs for Phase1,Phase3
Property DJIA not found
Categories: Algorithms | Utility\Workspaces
Python: CheckForSampleLogs.py (last modified: 2016-10-12)