Mentors: Ruchika Joshi, David Bellot
Organization: Boost C++
Hi, my name is Sarthak Singhal and I have been working on astronomy library to integrate coordinate system with Boost.Units and creating the parser for FITS files, in Google Summer of Code 2019. This gist describes all the work that I have done during this period.
https://summerofcode.withgoogle.com/projects/#5400051436748800
Earlier the coordinate system had no support for units with coordinates which could leave scientific calculations prone to errors. Boost.Units helped out in integrating units with the existing coordinate system. The functionality for FITS file handling was not complete. The parser for ASCII table extension and binary table extension was to be created.
My work was mainly divided into 3 tasks:
The coordinate system had no support for units along with coordinates so it was of limited use. My task was to integrate euclidean and astronomical coordinate systems with units. I used Boost.Units for this purpose. I stored the units as the template parameters and stored just the values of the coordinates in the Boost.Geometry.Point. Defining any object became complicated due to several template parameters, so I created separate make
functions to create objects to provide easy APIs for user to deal with any coordinate system. All the code for euclidean and astronomical coordinate systems both were merged.
Functionality for FITS file system was not complete as it supported only the parser for primary_hdu and the image extension. So, I created the parser for ASCII table extension which involved storing the meta data about the fields and the data unit in ASCII table extension and also extracting it efficiently.
New tests need to be created as the whole coordinate system was changed. Similarly, documentation needed to be updated. I created tests for cartesian and spherical coordinate systems. I updated the documentation meeting the new requirements.
The code that was merged can be seen here
I am thankful to my mentor Ruchika Joshi for her guidance throughout the project. I would also like to thank Pranam Lashkari who helped me whenever I had questions and any doubts. Interacting with them and working on this project together made this a great learning experience for me and I gained a lot of knowledge of Template Meta Programming and other aspects of object oriented programming. It was a great experience and fun working with them.
I’ve had a wonderful time during these 3 months and have learned plenty of things. Google Summer of Code was an awesome learning experience for me and I gained a lot of knowledge by working on this project.