Summer with SunPy ☀️

Jeffrey Paul
3 min readJun 3, 2021

--

A couple of months ago, I was introduced to the world of open source by a few peers of mine and despite having the many unanswered questions about why open source software exists, eventually I decided to try my hand at it.

In my previous post I had mentioned how I’d continue to be a contributor to SunPy regardless of the outcome of GSOC.

“I made a promise to myself that regardless of the outcome of my proposal, I will continue to contribute to this organization that taught me so much.”

With that in mind, this showed up a couple of weeks later :

Turns out things went my way and this gave me the motivation I was lacking for this summer.

Well, my project is quite simple actually. SunPy allows for visualization of spatially-aware data by means of Map objects. These objects have extensive 2D visualization capabilities for plotting various coordinate objects.

My responsibility will be experimenting and tinkering around with these visualization capabilities and converting them into 3D with some extra added functionality! Seems pretty cool right? Well, it is!

Here’s an example of what I’d be doing :

Converting this
To this!

The entire project involves using Pyvista, a python api for using the Visualization Toolkit. The entire project is part of a separate package affiliated with SunPy and you can find it here.

My first 2 weeks with SunPy went great! It involved learning and tinkering around with Sphinx for documentation which I had never used before, figuring out what goes where and how it happens was pretty interesting.

We’ve finally decided on how we’d go about producing unit tests for these plots, we uncovered an issue with PyVista as well. The project mentors and I had a few discussions on how to render these 3D plots for display in our documentation, how this would impact the continuous integration builds as our current one seemed to be having a few issues with XVFB server and displaying the plots correctly. These issues are yet to be fixed and a concrete solution is to be decided on.

A few pull requests with the initial code to set up the package and provide basic plotting functionality was merged in and the package finally produces a 3D plot for any map in Sunpy!

This marked the end of the community bonding phase of the project and in the coming weeks, I’ll be working on experimenting with rotation and AstroPy’s SkyCoord. I’ll also be working on some plotting field lines from PfssPy which would add some extra functionality to the library. I’ve finally gotten into getting my hands dirty with the code and I’m loving it.

Well, that’s pretty much it for the first fortnight with SunPy, looking forward to see how this project turns out, everything seems to be going well and I’m grateful to be working on this project with my mentors.

--

--

Jeffrey Paul
Jeffrey Paul

Written by Jeffrey Paul

An aspiring Software Engineer with a new found interest for open source contribution.