The Pulsar Signal Simulator: A Python package for simulating radio signal data from pulsars

1 Physical Sciences Division, University of Washington Bothell, 18115 Campus Way NE, Bothell, WA 98011, USA 2 Department of Physics and Astronomy, West Virginia University, P.O. Box 6315, Morgantown, WV 26506, USA 3 Center for Gravitational Waves and Cosmology, West Virginia University, Chestnut Ridge Research Building, Morgantown, WV 26505, USA 4 Department of Physics and Astronomy, Widener University, One University Place, Chester, PA 19013, USA 5 University of New Hampshire 6 Department of Astronomy, University of Illinois, 1002 West Green Street, Urbana IL 61802, USA 7 School of Physics and Astronomy, Rochester Institute of Technology, Rochester, NY 14623, USA 8 Laboratory for Multiwavelength Astrophysics, Rochester Institute of Technology, Rochester, NY 14623, USA DOI: 10.21105/joss.02757


In partnership with
This article and software are linked with research article DOI 10.3847/1538-4357/abdc29, published in the Astrophysical Journal.

Summary
Pulsar observations have been a hallmark of radio astronomy since Jocelyn Bell Burnell discovered the repeating signal from PSR B1919+21 in 1967 (Hewish et al., 1968). Today, most radio frequency observatories include dedicated equipment for observations of pulsars, e.g., Roshi et al. (2019), Lynch et al. (2019), Stairs et al. (2019), Bailes et al. (2020). The phenomenal precision of pulsar rotational periods has allowed for many notable observations stemming from strong field general relativity, including a Nobel Prize for the discovery of the first binary neutron star (Hulse & Taylor, 1975), which led to the first evidence for gravitational waves (Taylor & Weisberg, 1982).
Pulsars continue to be used as probes of gravity as the constituents of pulsar timing arrays (PTAs). PTAs are collections of highly precise millisecond pulsars regularly monitored for shifts in their pulse arrival times indicative of gravitational waves in the nanohertz regime. See Ransom et al. (2019), Hobbs & Dai (2017) and Burke-Spolaor & others (2019) for a review of pulsar timing arrays and the astrophysics of nanohertz gravitational waves.

Statement of Need
In order to use neutron stars as a galactic-scale gravitational wave observatory, it is important to understand the noise that affects the timing of radio pulses. The pulse times of arrival are modeled deterministically using aspects of the pulse profile, intrinsic flux, orbital parameters of the pulsar (if in a binary system), proper motion across the sky, effects of the interstellar medium (ISM), position of the observatory with respect to the solar system barycenter and various aspects of the telescope and backend processing. Additionally, stochastic noise processes affect the times of arrival.
A number of c/c++-based packages exist which have pulsar signal simulation capabilities. The SigProc package (Lorimer, 2011) has long been publicly available for processing radio-based pulsar observation data and has a simulation module that uses a timing model to reproduce data in its native fb data structure. PSRCHIVE (Hotan et al., 2004;van Straten et al., 2012), another popular software package for processing radio data of pulsars, has the ability to produce simulated pulsar profiles, but not as part of a full simulation pipeline. There are timing packages (Hobbs & Edwards, 2012;Luo et al., 2019) that can simulate noise/signals in the times of arrival of pulses, for instance to simulate gravitational wave signals, but these are a derivative data product making the injection of some noise processes and signals more difficult. The end-to-end simulation of PsrSigSim provides a way to study the covariances of the timing model and noise terms in a physically motivated and controlled manner using the basal data product output from radio observations.
PsrSigSim is the first Python package for general-purpose simulation of radio telescope data from pulsar timing observations, based on the formalism presented in (Shapiro-Albert et al., 2020). It uses standard Python packages, such as NumPy (van der Walt et al., 2011) and Astropy (Astropy Collaboration et al., 2018), to simulate radio pulses from a neutron star and the effects of the interstellar material on the signal propagation. Signal objects are passed to Pulsar objects and Telescope objects to build a realistic pulsar signal from scratch. ISM objects use various signal-processing techniques, such as the Fourier shift theorem and convolution of pulse profiles with decaying exponentials, in order to simulate the frequencydependent effects of the interstellar medium on pulse arrival times. PsrSigSim interfaces with various pulsar data standards, such as PSRFITS (Hotan et al., 2004), to build data products that can be passed to existing data-processing pipelines.
The modularity of the simulation allows enumerable options for investigating the processing of pulsar signals using the built-in features. It also allows users to add new physical effects with ease. The signals from different pulsars can be treated by the same telescope in order to investigate how various pulsars would look using a particular telescope configuration. A user can either use a provided telescope/backend, or build one with their own specifications. This modularity also makes PsrSigSim an excellent tool for educating students about the physics of pulsar signals and how they are observed and processed.
The generic functionality, modularity and the ability to add user-defined signals/noise make PsrSigSim an useful tool for all pulsar researchers.