Script execution
This commit is contained in:
18
script/bpm1s_TimestampTable.py
Normal file
18
script/bpm1s_TimestampTable.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
def after(rec, scan):
|
||||
path = get_exec_pars().group+"/TimeIOC"
|
||||
if rec.index==0:
|
||||
create_dataset(path, 's')
|
||||
nanos = bpm1s_4ch.timestampNanos
|
||||
dt = datetime.datetime.fromtimestamp(nanos/1e9)
|
||||
time_str = str(dt).ljust(26,'0') + str(int(nanos % 1e3)).zfill(3)
|
||||
append_dataset(path, time_str , type = 's')
|
||||
|
||||
mscan(bpm1s_4ch, bpm1s_ch, -1, 1000.0, after_read = after)
|
||||
#mscan(bpm6b, bpm6b, 5)
|
||||
|
||||
#tscan(bpm6a, b5, 2.0)
|
||||
|
||||
Reference in New Issue
Block a user