Thanks for reporting. I am already checking...
So in https://git.km3net.de/km3py/km3mon/blob/master/scripts/live_royfit.jl#L83 the time residual is calculated via:
for hit in hits
Δt = hit.t - ccalc(hit.pos.z)
write(fobj, "$(event.run_id),$(event.timestamp),$(hit.du),$(hit.floor),$(hit.dom_id),$(Δt),$(fit.Q)\n")
end
Then the time_residuals.py
is used to do the actual plotting and it looks like I put in a minus sign: https://git.km3net.de/km3py/km3mon/blob/master/scripts/time_residuals.py#L56
for du in np.unique(df.du):
_df = df[df.du == du]
t_res = _df[_df.floor == floor].t_res
t_res = t_res[np.abs(t_res) < 500]
print(f" DU {du} floor {floor}: {len(t_res)} entries")
ax.hist(-t_res,
bins=100,
histtype='step',
lw=2,
label=f'Floor {floor} / DU {du}')
For whatever reason ;)