diff --git a/script/bpm1s_TimestampTable.py b/script/bpm1s_TimestampTable.py new file mode 100644 index 0000000..4338162 --- /dev/null +++ b/script/bpm1s_TimestampTable.py @@ -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) +