Google Summer of Code 2019, with PSF SubOrg: StarKit

It was an incredible learning experience with GSoC and StarKit! I can’t believe three months have passed so quick that I’m writing this final report, summarizing all the exciting work I did in these Summers (27 May - 26 Aug 2019).

Overview

StarKit Collaboration provides Python packages for astronomers to determine the physical properties of stars. Currently it provides 2 packages - one is StarKit for fitting stars & analysing stellar spectra, and other is WSynPhot for doing synthetic photometry. During Summers, my work mainly revolved around WSynPhot package where I did various improvements to make it steady for use. With each problem I fixed, I learned a variety of things about package development. Thanks to my mentor @wkerzendorf whose guidance was pivotal for upgrading our packages.

Originally my proposed project: Auto-generating Filter Curves & Photometry, was aimed to develop analytical web interfaces that makes it easier for astronomers to access the filter curves and to calculate the photometry of Stars by interacting with data. But before I could add these new features to our package, I needed to resolve several problems present in our packages (specifically WSynPhot) since they were in a very initial phase of development. So for the most part of Summers (10 weeks), I worked on resolving those problems and improving several aspects of our packages. And finally in the last 2 weeks, I got to work on developing a prototypical web interface for interactively plotting star’s spectrum!

What has been done?

During this 3-month period, I got 30+ PRs merged along with some direct commits to our repositories. You can find my weekly progress at my python-gsoc blog wherein I’ve also shared various things I learned each week. In this report, I have summarized my work as following deliverables:

1. Setup of CI/CD Azure pipelines for both packages

Initially we were using Travis for CI(Continuous Integration) and RTD(Readthedocs) for deploying our docs, then we decided to deploy our docs to GH-pages and hence used Doctr. But then we found Azure pipelines to be more promising in terms of its customizability, so we ended up creating both CI and docs CD pipeline on Azure.

2. Remodelling of the data access mechanism of WSynPhot

While imaging stars, astronomical filters are used with telescopes to capture specific wavelengths of starlight. Wsynphot depends on this filter data (which we obtain from SVO FPS), for doing photometric calculations. There’s an interesting story behind how I get into this work which was not even planned. It all started with resolving an issue of unclean data and we ended up with having dedicated I/O modules for getting & caching filter data from SVO. We tried a lot of things and kept switching to better solutions in the process, so I also have some closed PRs for the work we dropped.

Initially wsynphot accessed the filter data, by scraping it from SVO web interface and ingesting it in required format in an HDF file, which was then uploaded on a server. Since SVO keeps on updating, we decided to design a scheduled pipeline to auto ingest the updated filter data HDF file. While developing this, we found that there exists a VO interface (HTTP queries based API) for SVO which can be used to directly fetch data from SVO without ingesting it in HDF. Thus we dropped earlier code and I wrote a module to get data from SVO in real-time. But since it has a time & connectivity limitation, so we decided to create another module to cache the filter data as VOTables on user’s disk. And I also developed a mechanism to update the cached data so that user have access to up-to-date filter data.

3. Other fixes/improvements

4. Development of interactive Interfaces

Since we were done with most fixes so in last 2 weeks, I started exploring and experimenting with several tools that can create interactive web interfaces from Jupyter Notebooks.

TL;DR

All of my work during GSoC (and even pre-GSoC) period can be accessed from this complete list of issues & PRs I created.

What is left to do?

Yet GSoC has ended but my contributions to StarKit won’t end! I’ve planned to develop interactive Photometry interface (part of my proposal) post GSoC. Since no such interface exists yet, therefore I am eager to contribute it to Astronomy community.

Besides it, there are a few more things that can be done:

Conclusion

Summers 2019 were definitely very pleasant and enjoyable for me. I am thankful to Google for organising such a great program that introduced me to FOSS world and increased my knowledge manifold. A big thanks to my mentors at StarKit for letting me become a part of StarKit, and for helping me in improving not only our packages but also myself as a developer. And lastly thanks to all FOSS communities for helping each other and for letting novice developers like me, escalate their skills by working on their cool projects!

Signing off with :heart: to Open Source!