Pulsars

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

class Pulsar(psrname, query=None, **kwargs)

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()

Return a list of the class attribute values.

keys()

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

name

Return the pulsar name

class Pulsars

Bases: object

Class to contain multiple Pulsar objects.

add_pulsar(psr)

Add a pulsar into the object.

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

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)

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

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