GSoC Progress Report? Almost Done!

With only 2 weeks into the coding period, it feels good to say that the bulk of the work associated with the 2 milestones is almost done. Almost because the newly added functionality is yet to be battle-tested and while there is always room for change and improvements, my focus will be shifting from the main objective to the optional objectives.

The Project

Scientific jargon ahead!

The study and interpretation of time-series data have become an integral part of modern-day astronomical studies and a common approach for characterizing the properties of time-series data is to estimate the power spectrum of the data using the periodogram. But the periodogram as an estimate suffers from being:

  1. Statistically inconsistent (that is, its variance does not go to zero as the number of data samples reach infinity),

2. Biased for finite samples, and

3. Suffers from spectral leakage.

Stingray is a spectral-timing software package for astrophysical X-ray (and other) data.

My project aimed at implementing and integrating a superior spectral estimation technique, known as the Multitaper periodogram, into a Software Package called Stingray, a sub-organization of OpenAstronomy.

This Multitaper algorithm uses windows or tapers (bell-shaped functions), which are multiplied with the time-series data before finding its frequency domain estimate. These windows, called the discrete prolate spheroidal sequences (DPSS), help mitigate the problems mentioned above.

Any more technical stuff and this blog will start taking the shape of my proposal, so I’ll leave it here, but for anyone more interested, here is the proposal.

The Process

I started working on the project in early March, before submitting the proposal, and it initially included writing a wrapper around an external package to make the use of this tool coherent with the rest of the project. While a proof-of-concept implementation was put together, it was later decided to use SciPy to do the grunt work, as it already was a dependency, somewhat changing the initial milestones.

So in a way, I was already working on the project before the results were announced and ended up opening a pull request with the newly added method 1 week into the coding period and it got merged a week later, which happened to be fairly early in the GSoC program coding timeline. Perks of open-source?!

So while there are sure to be improvements and additions in terms of coherency and features, this does give a bit more breathing room and time for experimentation and exploration, and I’ll try and make good use of it, primarily by working on the optional but quite good-to-have features.

For anyone interested, here is the PR.