pqc.detect.step_changes

Detect achromatic and DM-like step changes in timing residuals.

This module fits single changepoint step models using weighted two-segment means and a likelihood-ratio-style statistic expressed as \(\Delta\chi^2\). It supports:

  • achromatic steps (constant amplitude after t0), and

  • DM-like chromatic steps scaling as \(1/f^2\).

Notes

Statistic

For a split at index \(i\), let weighted means before/after be \(\mu_1, \mu_2\) with variances \(1/W_1, 1/W_2\). The step contrast is \(\delta=\mu_2-\mu_1\) and score is \(\Delta\chi^2 = \delta^2/(1/W_1+1/W_2)\).

Why used here

Step discontinuities are common signatures of timing-model offsets or abrupt propagation/instrument changes.

Assumptions
  • One dominant changepoint in the tested series.

  • Gaussian errors with known/estimated sigma.

  • Sorted times and enough points on each side of split.

References

Functions

detect_dm_step(df, *[, mjd_col, resid_col, ...])

Detect chromatic step offsets consistent with DM-like scaling.

detect_step(df, *[, mjd_col, resid_col, ...])

Detect a single achromatic step-like offset and annotate rows.