enterprise package

Subpackages

Submodules

enterprise.constants module

Declares physical constants for use in enterprise. Depends on numpy for base mathematical constants, and scipy.constants for physical constants.

enterprise.pulsar module

Class containing pulsar data from timing package [tempo2/PINT].

class enterprise.pulsar.BasePulsar[source]

Bases: object

Abstract Base Class for Pulsar objects.

filter_data(start_time=None, end_time=None)[source]

Filter data to create a time-slice of overall dataset.

set_flags(flagname, values)[source]

Set value of existing or new flags.

sort_data()[source]

Sort data by time.

to_pickle(outdir=None)[source]

Save object to pickle file.

property Mmat

Return ntoa x npar design matrix.

property backend_flags

Return array of backend flags.

Not all TOAs have the same flags for all data sets. In order to facilitate this we have a ranked ordering system that will look for flags. The order is group, g, sys, i, f, fe`+`be.

property dm

Return DM parameter from parfile.

property dmx

Return a dictionary of DMX-parameter values and stoa ranges from parfile.

property flags

Return a dictionary of tim-file flags.

property freqs

Return array of radio frequencies in MHz.

property iisort

Return inverse of sorting indices.

property isort

Return sorting indices.

property pdist

Return tuple of pulsar distance and uncertainty in kpc.

property phi

Return azimuthal angle of pulsar in radians.

property planetssb

Return planetary position vectors at all timestamps

property pos

Return unit vector from SSB to pulsar at fiducial POSEPOCH.

property pos_t

Return unit vector from SSB to pulsar as function of time.

property residuals

Return array of residuals in seconds.

property stoas

Return array of observatory TOAs in seconds.

property sunssb

Return sun position vector at all timestamps

property telescope

Return telescope vector at all timestamps

property theta

Return polar angle of pulsar in radians.

property toaerrs

Return array of TOA errors in seconds.

property toas

Return array of TOAs in seconds.

class enterprise.pulsar.PintPulsar(toas, model, sort=True, drop_pintpsr=True, planets=True)[source]

Bases: BasePulsar

class enterprise.pulsar.Tempo2Pulsar(t2pulsar, sort=True, drop_t2pulsar=True, planets=True)[source]

Bases: BasePulsar

deflate()[source]
destroy()[source]
inflate()[source]
enterprise.pulsar.Pulsar(*args, **kwargs)[source]
enterprise.pulsar.get_maxobs(timfile)[source]

Utility function to return number of lines in tim file. :param timfile:

Full path to tim-file. For tim-files that use INCLUDEs this should be the base tim file.

Returns

Number of lines in tim-file

enterprise.pulsar_inflate module

Defines PulsarInflater class: instances copy a numpy array to shared memory, and (after pickling) will reinflate to a numpy array that refers to the shared data.

class enterprise.pulsar_inflate.PulsarInflater(array)[source]

Bases: object

destroy()[source]
inflate()[source]
class enterprise.pulsar_inflate.memmap[source]

Bases: ndarray