ska_pst.testutils.pulsar

Submodule providing data and utility functions for pulsars that can be used in testing.

class ska_pst.testutils.pulsar.Pulsar(*, name: str, ra: str, dec: str, dm: float)[source]

Data class providing name, RA/Dec and dispersion measure of a pulsar.

All coordinate values are J2000.0

property coordinates: astropy.coordinates.SkyCoord

Get the coordinates of the pulsar.

This returns an Astropy SkyCoord object that parses the ra and dec values of the current pulsar object.

Returns

the RA/Dec coordinates of object.

Return type

SkyCoord

dec: str

The declination (Dec) of the pulsar, in degrees.

dm: float

The dispersion measure of the pulsar, in (cm^-3 pc).

name: str

The name of the pulsar (e.g J0002+6216)

ra: str

The right acession (RA) of the pulsar, in hour angle.

ska_pst.testutils.pulsar.pulsar_data() List[Pulsar][source]

Get a list of pulsar objects.

This function can be use to get a list of Pulsar objects that can be use as source objects during testing.

Returns

a list of pulsar objects

Return type

List[Pulsar]

ska_pst.testutils.pulsar.random_pulsar() Pulsar[source]

Get a random pulsar.