CorrectLogTimes v1

../_images/CorrectLogTimes-v1_dlg.png

CorrectLogTimes dialog.

Summary

This algorithm attempts to make the time series property logs start at the same time as the first time in the proton charge log.

Properties

Name Direction Type Default Description
Workspace InOut Workspace Mandatory Input workspace
LogNames Input string   Experimental log values to be shifted. If empty, will attempt to shift all logs

Description

Sometimes the clocks controlling different sample environments or other experimental log values are not synchronized. This algorithm attempts to make all (some) time series property logs start at the same time as the first time in the proton charge log. It uses ChangeLogTime.

See also ShiftLogTime and ChangeLogTime.

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.

w=Load('CNCS_7860')
print "Original start time for 'proton_charge':", str(w.getRun()['proton_charge'].times[0]).strip()
print "Original start time for 'Speed5':", str(w.getRun()['Speed5'].times[0]).strip()
#Change the log times
CorrectLogTimes(w)
#there should be almost 10 seconds different than before
print "Corrected start time for 'Speed5':", str(w.getRun()['Speed5'].times[0]).strip()

Output:

Original start time for 'proton_charge': 2010-03-25T16:08:37
Original start time for 'Speed5': 2010-03-25T16:09:27.780000000
Corrected start time for 'Speed5': 2010-03-25T16:08:37

Categories: Algorithms | PythonAlgorithms | DataHandling | Logs