GSoC Summary Post

Hello there,

We are in the final, 12th week of GSoC. Its been a long ride. I have this feeling of regretful longing, the sort of feeling you get after something really good has ended. That is probably because this was my first Summer of Code and was a transformative experience. This post summarises my experience writing code for an organisation that promotes Free Software for Solar Physics (How cool is that ? :D) For those who don’t know, I interned with SunPy (a sub-org under the OpenAstronomy foundation).

I started out writing code for something called Fido Clients. In SunPy parlance, these are downloading clients that help fetch data, specifically Solar Physics data, different types of files of varying formats such as FITS, .TAR.gz etc. This clients weren’t initially that complex. All you had to do earlier (pre-GSoC) was to supply a time-range, the time-range you want to download data for, and the specific client has its own source where it fetches data from, That is all. My project this summer dealt with making Fido clients a bit more complex in operation, in the sense that they take a multitude of other parameters other from time-range such as Wavelength (in any units!), STEREO spacecraft, Physical Observation and a few others. The mixture of arguments are client-specific. Different clients take a different mixture of parameters. I also had to add the functionality for real-time data. Real-time data is data which is updated in real-time. Certain clients have data which is constantly updated at various intervals (1 minute, 5 minutes etc.). So I also had to add the functionality for the user to be able to download real-time data as well.

Coding up the clients and making them complex was needless to say was complex. I had to think exhaustively, think about it, For a client for taking 3 extra arguments, there are 2**3 possible combinations and I have to determine what the client does for each combination. Granted, it wasn’t ever that complex, it still did forced me to think exhaustively and think about each and every possible test case.  I also learnt a lot about writing tests as well. Parametrizing them especially. How tests should accurately convey what the clients do.

I now want to see the clients merged into unidown and get some reviews on the ease of use of the clients. The clients, since they are complex now, I expect the users to be a bit more aware when they use it. If you supply the wrong combination of arguments, then the client can’t make sense of it and users wouldn’t get the correct results.

The second part dealt with building the SRS file reader. This reader can parse the SRS data for a particular date and output the table in form of an astropy.Table along with requisite meta-data. I had to learn the ins and outs of atsropy Table for this. The SRS file consists of three tables taking different attributes/columns. My task was to take these three tables and merge them into one big table. I had to do some pre-processing on the SRS data before I could put them in a table. I am amazed by the breadth of functionality that astropy Table has to offer. It was really impressive, I didn’t have to write anything from scratch since astropy Table already had everything.

The last part dealt with a feature request, #1697. This was fun too. I had to peek(pun intended, SunPy users would know) into the map implementation in SunPy. I had to add some additional parameters to the core map processing module and et voila that was all. And DavidPS was very happy with that. #1697 had been unsolved for quite a few months.

All in all, a pleasant summer spent productively. I’d like to thank my mentors DavidPS, JackIreland and also Cadair (Stuart). David, provided me with the constant and valuable input that was required for me to complete the project. The code-reviews from him were my favorite (although that also caused some minor miscommunication problems, which we gladly resolved) I couldn’t have done with this without him and learnt a lot from him about best practices and general Python stuff and I hope to contribute and learn even more in the near future. Even though Cadair, wasn’t officially my mentor, he helped me countless times in undoing my git screw-ups and also providing valuable input the times when I needed it. Thanks to the SunPy community as well for giving me the opportunity to contribute and be a part of Scientific Python community.

I have a year left in my under-graduate studies and would continue contributing to the Open Source (inclusing SunPy of course) community in the near future, albeit at a slower pace. I need a well deserved break now.

As Bugs Bunny would say That’s all folks!

P.S. My work product submission is here – GSoC 2016 Work Product.