\(\renewcommand\AA{\unicode{x212B}}\)

AddSampleLogMultiple v1

../_images/AddSampleLogMultiple-v1_dlg.png

AddSampleLogMultiple dialog.

Summary

Add multiple sample logs to a workspace

Properties

Name Direction Type Default Description
Workspace InOut Workspace Mandatory Workspace to add logs to
LogNames Input str list   Comma separated list of log names
LogValues Input str list   Comma separated list of log values
LogUnits Input str list   Comma separated list of log units
ParseType Input boolean True Determine the value type by parsing the string
LogTypes Input str list   Comma separated list of types the log values will be.

Description

This algorithm provides a way of adding multiple sample log entries to a workspace at once by making multiple calls to the AddSampleLog v1 algorithm.

Typically this is for use in workflow algorithms and scripts.

Usage

Example - Add multiple sample logs

# 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:

test
5
1.6e-07

Categories: AlgorithmIndex | DataHandling\Logs