Pulsars

The classes defined here are hold information on an individual pulsar or an interable list of pulsars.

class Pulsar(psrname, query=None, **kwargs)[source]

Bases: object

An object to hold a single pulsar. The class requires a pulsar name. The pulsar parameters are set as attributes of the class.

Parameters:
  • psrname (str) – a string containing a pulsar name
  • query (psrqpy.QueryATNF) – a query

Additional keyword arguments are any of the valid queriable pulsar parameters.

items()[source]

Return a list of the class attribute values.

keys()[source]

Return a list of the class attribute names for allowed pulsar parameters.

name

Return the pulsar name

class Pulsars[source]

Bases: object

Class to contain multiple Pulsar objects.

add_pulsar(psr)[source]

Add a pulsar into the object.

Parameters:psr (Pulsar, Pulsars) – a Pulsar object, or Pulsars object
pop(psrname)[source]

Remove a pulsar from the object and return the removed pulsar.

Parameters:psrname (str) – a string with the name of a pulsar
remove_pulsar(psrname)[source]

Remove a pulsar from the object. Only do one at a time.

Parameters:psrname (str) – a string with the name of a pulsar