# Pulsars and neutron stars/Modelling timing residuals

## Glitch events

In tempo/tempo2, glitch events are modelled as an offset in pulse phase, ${\displaystyle \Delta \phi }$ and the permanent increments in the pulse frequency ${\displaystyle \Delta \nu _{p}}$ and first frequency time derivative ${\displaystyle \Delta {\dot {\nu }}_{p}}$. In addition it is sometimes necessary to in a transient frequency increment ${\displaystyle \Delta \nu _{d}}$ which decays exponentially to zero with a timescale of ${\displaystyle \tau _{d}}$. The phase model (caused by the glitch) is therefore taken as:

${\displaystyle \phi _{g}=\Delta \phi +\Delta \nu _{p}(t-t_{g})+{\frac {1}{2}}\Delta {\dot {\nu }}_{p}(t-t_{g})^{2}+\left[1-e^{-(t-t_{g})/\tau _{d}}\right]\Delta \nu _{d}\tau _{d}}$

where ${\displaystyle t_{g}}$ is the glitch epoch and ${\displaystyle t}$ is the current time.