ChangeLogTime v1

../_images/ChangeLogTime-v1_dlg.png

ChangeLogTime dialog.

Summary

Adds a constant to the times for the requested log.

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory A workspace
OutputWorkspace Output MatrixWorkspace Mandatory The name to use for the output workspace
LogName Input string   Name of the log to add the offset to
TimeOffset Input number 0 Number of seconds (a float) to add to the time of each log value. Required.

Description

Adds a constant to the times for the requested log. See also ShiftLogTime and CorrectLogTimes

Usage

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
w=Load('CNCS_7860')
#get the log times for a particular variable
original=w.getRun()['Speed5'].times
#Change the log times
w=ChangeLogTime(w,LogName='Speed5',TimeOffset='10')
#get the log times for a particular variable, after change
modified=w.getRun()['Speed5'].times
#print times
print "OriginalTimes: ", original
print "ModifiedTimes: ", modified

Output:

OriginalTimes:  [2010-Mar-25 16:09:27.780000000,2010-Mar-25 16:10:01.560998229,2010-Mar-25 16:10:31.514001159,2010-Mar-25 16:11:25.498002319]
ModifiedTimes:  [2010-Mar-25 16:09:37.780000000,2010-Mar-25 16:10:11.560998229,2010-Mar-25 16:10:41.514001159,2010-Mar-25 16:11:35.498002319]

Categories: Algorithms | DataHandling\Logs

Source

C++ source: ChangeLogTime.cpp

C++ header: ChangeLogTime.h