Skip to content

Instantly share code, notes, and snippets.

@lpranam
Created August 25, 2019 05:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lpranam/4958a0a7d188f2be6d85aebd66d4c167 to your computer and use it in GitHub Desktop.
Save lpranam/4958a0a7d188f2be6d85aebd66d4c167 to your computer and use it in GitHub Desktop.
Google Summer of Code 2019 Experience

I worked with Boost C++ Libraries in GSoC 2019 to extend my implementation of new Astronomy Library in C++ using various Boost Libraries and standard libraries which originally started in GSoC 2018. The goal of the GSoC project was to bring this library closer to its first formal review for acceptance in Boost C++ library collection.

Aim of The Library

Development of this library started targeting not only professional C++ developers but also to the scientists and physicists. With simple APIs, this library will help users to speed-up their development process.

Astronomy Library will provide basic functionalities which are required daily in the astronomy like the coordinate system and FITS file handling.

Features Developed/Enhanced During GSoC 2019

GitHub Link: https://github.com/BoostGSoC19/astronomy

  • Phase 1
    • Phase 1 was entirely focused on integrating euclidean geometry with the unit system. Boost.Geometry and Boost.Units are two primary libraries used for this purpose and modified systems are as listed below:
      • Cartesian
      • Spherical
      • Spherical Equatorial
    • Besides, arithmetic operations separated from base classes and more functional approach is used to provide flexibility to the user. Available arithmetic operations are as below:
      • Cross product
      • Dot product
      • Magnitude of the vector
      • Unit vector
      • Sum of vectors
      • Mean of vectors
    • Ultimately resultant euclidian geometry system is an integration of Boost.Geometry and Boost.Units. Boost.Units help this library to detect all the units error at compile time with almost no run time overhead.
  • Phase 2
    • In this phase, we dedicated time to Astronomical Coordinate Systems which are as listed below:
      • Alt-Az
      • ICRS
      • CIRS
      • GeoCentric
      • HelioCentric
      • Galactic
      • Super Galactic
    • All these systems use euclidian Geometry classes as their underlying storage classes. With the change in all the euclidean class APIs of the astronomical system had to change to accommodate Units.
  • Phase 3
    • FITS File Handling
      • This was one of the most challenging parts of the entire project. We had to define a structure and policy for the APIs and FITS module which could make development easy for the user.
      • As FITS file can use many different data types and which can not be defined at compile time TMP would fail, unlike Coordinate Module.
      • Keeping in mind that polymorphism affects the performance and in some cases increases the complexity of the code, we have tried to provide clean and simple APIs with limited use of polymorphism.

Additional Work apart from the proposed project

  • Untile GSoC 2019 started, Boost.Astronomy provided not configuration fie for the project. As the project started growing with multiple contributors, configuration files were an essential need for the project. As a consequence, new Cmake structure was created for the project source files, examples and tests.
  • With growing project it was important to test the code on the different environment with a different compiler which makes CI/CD integration a need of the project. To satisfy this need TravisCI, Appveyor and Azure pipelines were configured.
  • Aiming to be the part of Boost library, Boost build system had to be configured for the library which was done during the period of GSoC 2019 which also benefited as it provided ease for CI configuration.
  • I would like to thank Mateusz Łoskot for helping me configure CMake, CI/CD and Boost Build system.

Links To the work:

Future Work on This Project

  • Define Different classes like Affine Transform and Matrix Transforms for Astronomical Coordinate System conversion
  • Editing Existing FITS file and Validation of FITS standards
  • Different operations on Data(image, binary table, ASCII table) of HDU
  • Memory mapping for big FITS file
  • Creating simple light Curves

Acknowledgements

My mentor Ruchika Joshi and colleague Sarthak Singhal helped me out in finding mistakes in my codes as well as whenever I am stuck with any problem. My interaction with them was productive and important for the success of the project. They reviewed my code on a regular interval which led me to write code with better quality.

Directory Structure

The GitHub link contains the directory of the source code of the project, along with tests and procedure to use the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment