EQUAD/T2EQUAD inconsistent application in combination with EMAX

Issue #69 new
Former user created an issue

Please note that tempo2 is inconsistent with the order in which it applies EQUADs and evaluates EMAX.

Specifically, if you use an EQUAD and an EMAX, then the EQUAD gets added before the EMAX bound is evaluated. In other words, the resulting maximum ToA uncertainty ends up being identical to the EMAX value.

However, if you use a T2EQUAD instead, then the EMAX gets evaluated first and the T2EQUAD gets added afterwards. The resulting maximum ToA uncertainty ends up being sqrt(EQUAD^2+EMAX^2).

I'm not sure which of these two is meant to be implemented (I presume whatever tempo1 does, although in principle I would think that the former approach makes more sense regardless of tempo1's behaviour), but this inconsistency is probably not intentional.

Comments (1)

  1. Michael Keith

    This bug was discussed a bit by email - the 'EMAX' parameter is not widely used so the expected behaviour is hard to define. Nevertheless, the issue boils down to the fact that EFAC/EQUAD/EMAX/EMIN are applied when the tim file is read (because their application is determined by where in the tim file the labels are), whereas T2EFAC/T2EQUAD are applied later as they apply globally even if e.g the T2EFAC appears at the end.

    I think that at the moment the answer is that the combination of the “T2” error parameters and the old ones are “not supported”. If there were a manual I am pretty sure it would say something like “Tempo2 does not support the use of both T2EFAC/T2EQUAD and EFAC/EQUAD/EMIN/EMAX at the same time”.

    This could be solved by adding EFAC/EQUAD/EMIN/EMAX “Flags” to each ToA and computing the errors all at once at the end. Not impossible but probably not a high prioirty (for me) right now. Happy to help if someone wants do develop a patch for this new ‘feature’.

  2. Log in to comment