Sunday, June 1, 2014

Week Two is done!


The past two weeks have been a lot of fun! This will sound cliché, but man time flew by. For the first week, I was traveling back to Pakistan so I couldn't get a lot of work done during the first two days. Once I was back home, I kicked into working mode and had several tasks to get done. I mainly spent my first week familiarizing myself with the tools I will need for my project.

I first experimented with the existing WCSAxes code and plotted different images to see what features the package currently has. I also learned how to set up different environments so that I can work with different versions of Python and different Astropy versions, which will be really important when I have to check the compatibility of WCSAxes with different environments. I then started working on implementing a feature that will allow users to set the units of the axes on their image plots.

I haven't really talked about what WCSAxes does yet so I'll do that now. WCSAxes is a package that is intended to allow astronomers to produce high quality plots of astronomical images for publication purposes. Currently there are several packages in Python out there that do this, but as Astropy aims to produce a single core package in Python for Astronomy, we want to add this to Astropy as well. Generally, astronomical images are stored in FITS files containing other information such as the scientific coordinate systems. An example illustrating the initial implementation of WCSAxes is



This is an image of a data cube with the x-axis representing the velocity and the y-axis representing the coordinates. As seen, the x-axis has ticks labeled of 10,000 and 20,000 m/s and it would be useful to give the user flexible control over this. After implementing this feature, WCSAxes now allows users to produce an image like this
                                         

In this image, the x-axis now has ticks labeled 10 and 20 km/s!

Another issue that came up was that with the latest release of Astropy coming up soon, some of the code in WCSAxes which depended on the astropy coordinates package would stop working. I then had to identify what was causing WCSAxes to fail in a situation and use the new coordinates package accordingly.

My task for next week is writing unit tests for WCSAxes. As the code is largely based on matplotlib's plotting functionality, we might be able to reuse some of the functions from matplotlib.


So far I've really enjoyed working on my project! My mentors have been extremely encouraging and helpful so doing all the work has been a lot of fun! And since I'm a hopeful astronomer, I spend a good ten minutes every day thinking about how cool my project is and geek out. That's it for this blog post. 

No comments:

Post a Comment