Residuals

The timing residual corresponding to a TOA can be computed using the form_residual function. This function also returns the DM residual in the case of wideband data.

Vela.form_residualFunction
form_residual(::TimingModel, ::TOA, params::NamedTuple, tzrphase::GQ)::GQ

Compute the timing residual corresponding to a single narrowband TOA.

source
form_residual(::TimingModel, ::WidebandTOA, params::NamedTuple, tzrphase::GQ)::Tuple{GQ, GQ}

Compute the timing and DM residuals corresponding to a single wideband TOA.

source

Under the hood, it calls the correct_toa method for each component, and computes the phase residual, which is the computed phase modulo 1 (this is done using the phase_residual function). The timing residual is the phase residual divided by the topocentric spin frequency (computed using doppler_shifted_spin_frequency).

The form_residuals function computes the residuals for a collection of TOAs.

Vela.form_residualsFunction
form_residuals(::TimingModel, ::Vector{TOA}, params::NamedTuple)::Vector{GQ}

Compute the timing residuals corresponding to a collection of narrowband TOAs.

source
form_residuals(::TimingModel, ::Vector{WidebandTOA}, params::NamedTuple)::Vector{Tuple{GQ, GQ}}

Compute the timing and DM residuals corresponding to a collection of wideband TOAs.

source