Virgo: A Versatile Spectrometer for Radio Astronomy

For the past few decades, radio astronomy has been a rapidly developing area of observational astronomy. This is due to the fact that a variety of celestial objects emit electromagnetic radiation at radio wavelengths, which has led to the development of radio telescopes capable of revealing the otherwise-hidden astrophysical properties of the universe. An important requirement that makes radio astronomy observations and analysis possible is an appropriate software pipeline compatible with the spectrometers with which radio observatories are equipped. In this work, we present Virgo: a versatile software solution for radio telescopes.


Introduction
For the past few decades, radio astronomy has been a rapidly developing area of observational astronomy. This is due to the fact that a variety of celestial objects emit electromagnetic radiation at radio wavelengths, which has led to the development of radio telescopes capable of revealing the otherwise-hidden astrophysical properties of the universe. An important requirement that makes radio astronomy observations and analysis possible is an appropriate software pipeline compatible with the spectrometers with which radio observatories are equipped. In this work, we present Virgo: a versatile software solution for radio telescopes.

Statement of Need
Virgo is a Python package for the acquisition, processing and analysis of data from radio telescopes. It is an easy-to-use open-source spectrometer and radiometer based on the GNU Radio framework (https://www.gnuradio.org), and is conveniently applicable to any radio telescope working with a GNU Radio-supported software-defined radio (SDR; a radio receiver architecture where some conventional hardware-based steps are replicated in software, Markus Dillinger (2003)). Although in-house acquisition solutions have been independently created by many, composing their own software for simple observations, these are not comparable in terms of installation count, ease of use, cross-platform support, functionality, reproducibility, maintenance and level of documentation that this package has to offer. Designed to be used by students, educators and amateurs in the field of radio astronomy, Virgo has already been adopted by a number of small and large-aperture radio telescopes, permitting both spectral and continuum observations with great success. These instruments include the ISEC TLM-18 (18m), the ACRO RT-320 (3.2m), the JRT (1.9m), and the PICTOR Telescope (1.5m), among others.
Although the hardware aspect of a radio telescope is generally handled by newcomers with relative ease, the skill set needed to integrate a complete software pipeline to support observations is not something most users are equipped with. Virgo tackles this problem by providing non-experts with a tool to collect and interpret data from radio telescopes, without requiring expertise in digital signal processing and software engineering. An example use case is classroom experiments in which students build a small-aperture antenna connected to a low-noise amplifier followed by an SDR, and with the help of Virgo, obtain data to map out the galactic distribution of neutral hydrogen and/or derive the rotation curve of the Milky Way. An example observation of the 21-cm hydrogen line acquired and processed with Virgo is shown in Figure 1. The package's versatility also provides a convenient solution for researchers wishing to rapidly deploy low-cost radio telescopes with commercial hardware.

Features
One of the key features of Virgo is its implementation of a four-tap weighted overlap-add (WOLA) Fourier transform (FT) spectrometer, offering a significant reduction in spectral leakage compared to a simple FT filterbank spectrometer that does not make use of the WOLA method, with a minimal increase in computational requirements (Crochiere & Rabiner, 1996) 1 . In addition to its data-acquisition functionality that performs data reduction by time-averaging spectra in real time, Virgo also carries out automated analysis of the recorded samples. The time-averaged spectrum, the calibrated spectrum, the dynamic spectrum (waterfall), the time series (power vs time) and the total power distribution of the observation are all automatically computed and plotted with the help of the Numpy (Harris et al., 2020) and Matplotlib (Hunter, 2007) packages.
Because of the nature of the RF instrumentation that radio telescopes are equipped with, the spectra acquired by SDRs have an unwanted frequency-dependant sensitivity, also known as the bandpass shape. In general, this frequency response makes it difficult to distinguish true signals, originating from the sky, from instrumentation artifacts. For that reason, Virgo performs bandpass calibration by taking the ratio of the observed spectrum over the calibration spectrum. However, because this ratio is arbitrarily scaled (due to the difference in the noise floor levels), the power axis is automatically rescaled to units of signal-to-noise ratio. In case the resulted spectrum has an unwanted slope due to e.g. inconsistent conditions between the calibration and the observation, the software can also automatically correct poorly-calibrated spectra using linear regression.
Furthermore, Virgo supports optional median operations, both in the frequency and time domain, for the suppression of narrowband and/or short-duration radio frequency interference (RFI), while allowing the user to export the raw observation data as a FITS (Pence et al., 2010) or csv-formatted file. Frequencies contaminated with RFI may also be stamped out with the software's built-in channel masking capability.
Lastly, the package may also be used for the detection of giant pulses (irregularly intense bursts of radio emission by pulsars). Due to the frequency-dependent dispersion caused by the plasma distribution in the interstellar medium (ISM), observed pulses naturally appear smeared in time, depending on the dispersion measure (integrated column density of free electrons from the observer to the source). To prevent implied degradations of the signal-to-noise ratio, incoherent dedispersion is optionally applied to dynamic spectra of pulsar observations, compensating for the unwanted dispersive effects of the ISM.
By additionally providing the observer with an important set of utilities, Virgo also makes for a great tool for planning (radio) observations. This includes the ability to compute the position of astronomical sources in the sky for a given date (see Figure 2), and conversely, to estimate the right ascencion and declination given the observer's coordinates along with the altitude and azimuth the telescope is pointing to, with the help of the Astropy package (Astropy Collaboration et al., 2018, 2013. On top of that, the package comes with a basic set of calculators for quickly carrying out a variety of computations involving the theoretical sensitivity and performance of a given instrument. Likewise, the software provides a handy tool for retrieving HI profiles based on the Leiden/Argentine/Bonn (LAB) Survey of Galactic HI (Kalberla et al., 2005). These spectra (see Figure 3 for an example) can be correlated with the integrated 21 cm all-sky map previewer shown in  (Kalberla et al., 2005) All-Sky Map (21 cm) Moreover, the package comes with an integrated frequency-domain RFI measurement pipeline, allowing observers to rapidly carry out a survey outlining the compatibility of the telescope's environment with radio observation standards.
Last but not least, the software's modularity allows users to effortlessly integrate Virgo's functionalities into other pipelines, permitting a variety of automation applications invloving the acquisition and/or processing of telescope data.

Future Work
As Virgo gets adopted by more and more radio telescopes, the need for expanding the software's capabilities grow. Additional features that have been proposed include but are not limited to a more robust and intelligent system for the detection and mitigation of RFI, and the support for a data acquisition/analysis pipeline for pulsar astronomy, both of which offer the potential of appealing to a broader user audience.