Miscellaneous potentially-helpful functions.


ELL1_check(A1, E, TRES, NTOA[, outstring])

Check for validity of assumptions in ELL1 binary model

FTest(chi2_1, dof_1, chi2_2, dof_2)

Run F-test.

add_dummy_distance(c[, distance])

Adds a dummy distance to a SkyCoord object for applying proper motion

akaike_information_criterion(model, toas)

Compute the Akaike information criterion (AIC).

bayesian_information_criterion(model, toas)

Compute the Bayesian information criterion (BIC).

check_all_partials(f, args[, delta, atol, rtol])

Check the partial derivatives of a function that returns derivatives.


Check whether long doubles have adequate precision.

colorize(text[, fg_color, bg_color, attribute])

Colorizes a string (including unicode strings) for printing on the terminal


Compute a unique hash of a file.

convert_dispersion_measure(dm[, dmconst])

Convert dispersion measure to a different value of the DM constant.

divide_times(t, t0[, offset])

Divide input times into years relative to t0

dmwavex_setup(model, T_span[, freqs, ...])

Set-up a DMWaveX model based on either an array of user-provided frequencies or the wave number frequency calculation.

dmx_ranges(toas[, divide_freq, binwidth, ...])

Compute initial DMX ranges for a set of TOAs

dmx_ranges_old(toas[, divide_freq, offset, ...])

Compute initial DMX ranges for a set of TOAs

dmx_setup(t[, minwidth, mintoas])

Set up DMX bins with a minimal binning strategy

dmxparse(fitter[, save])

Run dmxparse in python using PINT objects and results.

dmxselections(model, toas)

Map DMX selections to TOAs

dmxstats(model, toas[, file])

Print DMX statistics

find_optimal_nharms(model, toas, component)

Find the optimal number of harmonics for WaveX/DMWaveX using the Akaike Information Criterion.

find_prefix_bytime(model, prefixname, t)

Identify matching index(es) for a prefix parameter like DMX

get_conjunction(coord, t0[, precision, ecl])

Find first time of Solar conjuction after t0 and approximate elongation at conjunction

get_prefix_timerange(model, prefixname)

Get time range for a prefix quantity like DMX or SWX

get_prefix_timeranges(model, prefixname)

Get all time ranges and indices for a prefix quantity like DMX or SWX


Return the unit associated with a parameter

get_wavex_amps(model[, index, quantity])

Return the WaveX amplitudes for a timing model.

get_wavex_freqs(model[, index, quantity])

Return the WaveX frequencies for a timing model.


An iterator to step over identical items in a numpy.ndarray


Test whether x has a unit attribute containing an astropy unit.

info_string([prefix_string, comment, detailed])

Returns an informative string about the current state of PINT.

interesting_lines(lines[, comments])

Iterate over lines skipping whitespace and comments.


Iterate over the lines of a file, an open file, or an iterator.


List parameters understood by PINT.

merge_dmx(model, index1, index2[, value, frozen])

Merge two DMX bins

normalize_designmatrix(M, params)

Normalize each row of the design matrix.

numeric_partial(f, args[, ix, delta])

Compute the partial derivative of f numerically.

numeric_partials(f, args[, delta])

Compute all the partial derivatives of f numerically.

open_or_use(f[, mode])

Open a filename or use an open file.

parse_time(input[, scale, precision])

Parse an astropy.time.Time object from a range of input types

pldmnoise_from_dmwavex(model[, ignore_fyr])

Convert a DMWaveX representation of red noise to a PLDMNoise representation.

plrednoise_from_wavex(model[, ignore_fyr])

Convert a WaveX representation of red noise to a PLRedNoise representation.


Compute and return the total proper motion from a model object


Print example terminal colors and attributes for/using colorize()


Removes a dummy distance from a SkyCoord object after applying proper motion


Raise an exception if long doubles do not have enough precision.

sherman_morrison_dot(Ndiag, v, w, x, y)

Compute an inner product of the form

split_dmx(model, time)

Split an existing DMX bin at the desired time


Split a prefixed name.

split_swx(model, time)

Split an existing SWX bin at the desired time

taylor_horner(x, coeffs)

Evaluate a Taylor series of coefficients at x via the Horner scheme.

taylor_horner_deriv(x, coeffs[, deriv_order])

Evaluate the nth derivative of a Taylor series.


Go from a Wave model to a WaveX model


Go from a WaveX timing model to a Wave timing model.

wavex_setup(model, T_span[, freqs, n_freqs, ...])

Set-up a WaveX model based on either an array of user-provided frequencies or the wave number frequency calculation.

weighted_mean(arrin, weights_in[, ...])

Compute weighted mean of input values

woodbury_dot(Ndiag, U, Phidiag, x, y)

Compute an inner product of the form

xxxselections(model, toas[, prefix])

Map DMX/SWX/other selections to TOAs


PosVel(pos, vel[, obj, origin])

Position/Velocity class.

dmxrange(lofreqs, hifreqs)

Internal class for building DMX ranges