pint.simulation.zero_residuals

pint.simulation.zero_residuals(ts: TOAs, model: TimingModel, *, subtract_mean: bool = True, maxiter: int = 10, tolerance: Quantity | None = None)[source]

Use a model to adjust a TOAs object, setting residuals to 0 iteratively.

Parameters:
  • ts (pint.toa.TOAs) – Input TOAs (modified in-place)

  • model (pint.models.timing_model.TimingModel) – current model

  • subtract_mean (bool, optional) – Controls whether mean will be subtracted from the residuals when making fake TOAs

  • maxiter (int, optional) – maximum number of iterations allowed

  • tolerance (astropy.units.Quantity) – maximum allowed absolute deviation of residuals from 0; default is 1 nanosecond if operating in full precision or 5 us if not.