I'm not quite sure the correct way to get the time, e.g. the RunHeader.RunTime. Here is what I tried
import uproot
from astropy.time import Time
with uproot.open(example) as rootfile:
run = rootfile["run_tree"]
rh = run["RunHeader"]
runtime = rh["fRunTime"].array()[0]
print("RUNTIME=", runtime)
t0 = Time(
runtime.fTime * u.s, val2=runtime.fNanosec * u.ns, scale="utc", format="gps"
)
print(t0.iso)
RUNTIME= {fTime: 3430316129, fNanosec: 0}
2088-09-17 17:35:11.000
So clearly there is an error, as the time should not be in the future... I also tried format="unix", but that also gives the wrong year. So what is going on here? Also, I'm a bit surprised the nanosecond value is exactly 0, so maybe uproot is not reading the Sash::Time object correctly. If so, how should we read it?
I'm not quite sure the correct way to get the time, e.g. the RunHeader.RunTime. Here is what I tried
So clearly there is an error, as the time should not be in the future... I also tried
format="unix", but that also gives the wrong year. So what is going on here? Also, I'm a bit surprised the nanosecond value is exactly 0, so maybe uproot is not reading the Sash::Time object correctly. If so, how should we read it?