You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the tm_delay function in timing.py is not returning the expected residuals due to an additional sorting.
To calculate the TM deviation residuals, the code subtracts the new residuals (from the new TM set of parameters) and the old residuals (from the parfile solution) using residuals[isort] - new_res[isort].
However, the residuals array comes from the enterprise pulsar object property and is already sorted via _residuals[isort]. Reordering it again using [isort] results in incorrect ordering and, consequently, inaccurate TM deviation residuals.
As demonstrated below with the example of a 1 sigma F0 deviation for PSR J0030+0451, the get_delay function returns residuals that do not match the expected outcome (a straight line in the case of a F0 deviation).
Replacing residuals[isort] - new_res[isort] with residuals - new_res[isort] solves this issue and produces the anticipated straight line.
Note: new_res must be sorted (to match enterprise ordering) since it is constructed using the tempo2 pulsar object.
The text was updated successfully, but these errors were encountered:
It appears that the
tm_delay
function intiming.py
is not returning the expected residuals due to an additional sorting.To calculate the TM deviation residuals, the code subtracts the new residuals (from the new TM set of parameters) and the old residuals (from the parfile solution) using
residuals[isort] - new_res[isort]
.However, the residuals array comes from the enterprise pulsar object property and is already sorted via
_residuals[isort]
. Reordering it again using[isort]
results in incorrect ordering and, consequently, inaccurate TM deviation residuals.As demonstrated below with the example of a 1 sigma F0 deviation for PSR J0030+0451, the
get_delay
function returns residuals that do not match the expected outcome (a straight line in the case of a F0 deviation).Replacing
residuals[isort] - new_res[isort]
withresiduals - new_res[isort]
solves this issue and produces the anticipated straight line.Note:
new_res
must be sorted (to match enterprise ordering) since it is constructed using the tempo2 pulsar object.The text was updated successfully, but these errors were encountered: