nicer.sigmaz
Compute the sigma_z timing-stability statistic.
Can also be run as a script: python sigmaz.py parfile timfile.
Functions
|
Compute sigma_z from the timing residuals of a pulsar. |
|
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
nsegsegments; 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 than1/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.