nicer.sigmaz

Compute the sigma_z timing-stability statistic.

Can also be run as a script: python sigmaz.py parfile timfile.

Functions

psr_sigmaz(parfile, timfile, nseg[, diagplot])

Compute sigma_z from the timing residuals of a pulsar.

sigmaz(t, y, err, nseg[, diagplot])

Compute sigma_z from a set of measurement times and values.

nicer.sigmaz.sigmaz(t, y, err, nseg, diagplot=False)[source]

Compute sigma_z from a set of measurement times and values.

The data span is split into nseg segments; a cubic is fit to the data in each segment, and sigma_z is computed from the weighted mean square of the cubic coefficients. Segments with too few points, or whose data cover less than 1/sqrt(2) of the segment, are skipped.

Parameters:
  • t (array_like) -- Measurement times (days).

  • y (array_like) -- Measurement values (seconds).

  • err (array_like) -- Uncertainties of the measurements (seconds).

  • nseg (array_like of int) -- Numbers of segments to split the data span into; one sigma_z value is computed for each.

  • diagplot (bool, optional) -- If True, plot the polynomial fit to the full set of measurements.

Returns:

  • sz_corr (numpy.ndarray) -- Bias-corrected sigma_z for each segment length.

  • szerr_lower, szerr_upper (numpy.ndarray) -- Lower and upper uncertainties of sz_corr.

  • tz (list of float) -- Segment lengths tau (days).

  • nsegments (numpy.ndarray) -- Number of segments of each length that were used.

nicer.sigmaz.psr_sigmaz(parfile, timfile, nseg, diagplot=False)[source]

Compute sigma_z from the timing residuals of a pulsar.

The residuals are computed with PINT (using the DE430 ephemeris) and passed to sigmaz().

Parameters:
  • parfile (str) -- Timing model (.par) file.

  • timfile (str) -- TOA (.tim) file, in Tempo or Tempo2 format.

  • nseg (array_like of int) -- Numbers of segments to split the data span into.

  • diagplot (bool, optional) -- If True, plot the polynomial fit to the full set of TOAs.

Returns:

tuple -- The same values as sigmaz().