And so the journey begins!

During Spring 2021, I got to know about GSOC, which was something that had the badge “Google” attached on it, while providing a generous amount of money that is equivalent to my already-generous scholarship stipend. I jumped into the application, only to be shocked by the sheer competition in every corner of every organization, where the Indian CS Gods flexed their shinny CVs and backgrounds. I backed up. Like a coward. No excuse.

Read more…

My GSoC Journey - Part 1

What Is Google Summer of Code (GSoC)

Google Summer of Code(shortly known as GSoC) is a global, online program(organized by…..you guessed it! Google) focused on bringing new contributors into open source software development. GSoC Contributors work with an open source organization on a 12+ week programming project under the guidance of mentors. You can think of GSoC as an incubator for nurturing future open source developers.

Read more…

Google Summer of Code- Final Evaluation

Topic: Implement JAX based automatic differentiation to Stingray

The project involved the study of modern statistical modelling to augment the accuracy, speed, and robustness of the likelihood function, into a software package called Stingray. This report demonstrates the experiment done for a combination of different optimizers to fit the scipy.optimize function. Another emphasis is to investigate the gradient calculation using JAX and compare it with scipy.optimize.

Introduction:

The proposed milestone was to investigate the room for improvement to enhance the overall performance of modelling to Stingray, using JAX. However, the current stage of the model is still a sandbox model. Stingray is astrophysical spectral timing software, a library in python built to perform time series analysis and related tasks on astronomical light curves. JAX is a python library designed for high-performance numerical computing. Its API for numerical functions is based on NumPy, a collection of functions used in scientific computing. Both Python and NumPy are widely used and familiar, making JAX simple, flexible, and easy to adopt. It can differentiate through a large subset of python’s features, including loops, ifs, recursion, and closures, and it can even take derivatives of derivatives. Such modern differentiation packages deploy a broad range of computational techniques to improve applicability, run time, and memory management.

JAX utilizes the grad function transformation to convert a function into a function that returns the original function’s gradient, just like Autograd. Beyond that, JAX offers a function transformation jit for just-in-time compilation of existing functions and vmap and pmap for vectorization and parallelization, respectively.

Read more…

GSoC - 4

Radis

Today is the last day of GSoC-21. The entire journey was a rollercoaster ride and I learnt a lot of new things along the way. I started out with hardly knowing any of the shortcomings of pandas and as we dug in, I was surprised to see so many loopholes it contains. This will be the final blogpost of my gsoc journey and I hope you like it.

Pandas and Vaex

Read more…

Google Summer of Code Work Product Submission

This blog post is a consolidated report of my GSoC ’21 project. I’ve been contributing to ndcube - a sunpy affiliated package, which is itself a part of the umbrella organization called openastronomy. Phew, that’s quite some hierarchy.

Here’s a list of pull requests that I’ve opened during the coding period:

  1. Initial implementation for validating two WCS: Merged
    Implements a function to check if two given WCS objects are compatible with each other for reprojecting the NDCube.
  2. Reproject implementation: Merged
    Adds a method to reproject an NDCube using the astropy package called reproject.
  3. Reproject NDCube Documentation: Merged
    Documentation for the above PR.
  4. Combine cubes from NDCubeSequence using reproject: Unmerged
    Stacks the data of all cubes in an NDCubeSequence together into one cube. This PR is ready to merge but awaits testing from the community.
  5. Reproject NDCubeSequence Documentation: Unmerged
    Documentation for the above PR. This will be merged after the code.
  6. Support adaptive and exact algorithms for reproject: Unmerged
    This PR is completed and is ready to merge.
  7. Make reproject more efficient by identifying invariant axes: Unmerged
    This PR is a work in progress and might need some time until it’s ready. The last commit on this PR as of writing this post can be found here.

I’ve also been writing blog posts throughout the coding period. Here are links to the 4 parts I’ve written so far: Part 1, Part 2, Part 3, and Part 4. They contain a more technical description of the work along with some obstacles that we faced.

Read more…

GSoC 2021 — Final Report

GSoC 2021 — Final Report

Summer of 2021 held quite a few surprises for me. I’d have never imagined working with SunPy as a GSoC student and here I am concluding it with the final report. Before I summarize all the 30+ pull requests I’ve made to Sunkit-Pyvista, I just want to take a moment to than the brilliant mentors I’ve gotten to work with. The were not only patient and understanding but also extremely helpful with making me understand how everything works.

Coming to Sunpy, or should I say Sunkit-Pyvista.

Sunkit-Pyvista was created with the intention of extending Sunpy’s extensive plotting capabilities to 3D with the help of a VTK wrapper for Python — Pyvista.

Read more…

About my Google Summer of Code Project: Part 4

The last few days haven’t been as productive as earlier. We fixed some issues with the NDCubeSequence’s stacking PR and it looks like it’s ready to merge now. With some feedback from the community, I think it will happen soon. There have also been some minor updates to the PR that brings reproject’s other algorithms to NDCube.

A new task that I’ve taken up now is identifying invariant axes in a cube. Let’s say there’s a 3D data cube where one of the axes corresponds to a quantity like time, which you don’t want to reproject onto another grid. Identifying this axis would let us reproject at only one point along this axis and then apply it throughout. This will speed up the execution significantly and require a lesser amount of memory. It’s a tricky path though and the first implementation might not be very efficient. What we’re trying to do is convert pixel coordinates to world coordinates using the source WCS, and convert it back from world to pixel using the target WCS. If the original and final pixel coordinates match, we can conclude that the axis is invariant.

I shall update its progress soon, but this is all for now. GSoC is officially coming to an end, but as I said in the previous post, it doesn’t matter much for continuing my contributions to this community. I’ve been fascinated by this open-source environment and culture and learned so much along the way. I guess GSoC did serve its purpose for me.

Read more…