Monthly Archives: May 2014

Completed work till now.

Last post, I mentioned that I will work on spectra module, but it didn’t go that way. As for now, I have finished integrating these modules:

1) /sunpy/sun/sun.py

2) /sunpy/coords/util.py

3) /sunpy/util/unit_conversion.py

I have also written tests for them, but unfortunately, I could not get the util.py one to work. I will look at it later, when I again get in the mood to write tests( writing tests is not as fun as I thought it would be). I will work on integrating other modules, while keeping the /sunpy/map to the last. 

Usage of astropy.coordinates in SunPy

Going into the technical details a bit, I used only units of astropy into sunpy.sun. Once Cadair pointed out that there is a Latitude, Longitude and Angle classes to represent a quantity with angles, much more cleanly, I thought it would be a good idea to use them for following reasons:

1) Users can easily change the given output of the functions to the unit they desire by using the attributes of the above said class.
For example, if the output is in degrees, and someone wishes to see that in arcsec, they can use
`result = sun.some_function(“2012/11/11″)

       result.arcsec `

    Just by using this attribute the units can be converted.

2) It would be easier to find out errors. For example, an input for the Latitude class cannot exceed 90°, so if the user gives more than       that it would display an error(even though quite obvious). 

3)  And matching with the original intent, it forces the user to be more explicit about their input. Although in this case(sun.py), the input is not in some quantity, the output is explicit about the unit being used.

Thats about it. Perhaps I should post some screenshots of the output next time.
Cheers!

Coding period, beginning

Its been two days since the coding period began. I have started working on the integration of astropy units in Sun module, as I believe it will easier to start with, and to understand the codebase of SunPy. Also I plan to create some weekly, tasks for myself, to get things done and it will act as a deadline for me. These weekly tasks will include completing
certain number of modules for that week. I also hope that integrating the codebase, a certain number of modules which I should decide on, will serve as a good mid-term evalution goal for me.
As for now, I have(hopefully) completed the integration of sunpy.sun package. I have yet to add the necessary doc strings.
I have also started the sunpy.coords module integration.
Also in these coming two weeks I plan to complete the integration of:
sunpy.coords module
-util.py

sunpy.map module
-compositemap.py
-mapbase.py

And if possible:
sunpy.spectra module
-spectrogram.py
-spectrum.py

As for what I have done upto now, here are some links.
1) sun.py

2) test_sun.py

3) util.py

That is all I have done up until now. And the changes I have made, might not be the the best possible approach. So its highly likely that I will be changing it again as I go on learning about it.

Community Period end

This would be my second post here in this blog. As the name of this period implies, this time is used to communicating with my mentors, and other people in SunPy as well as reading docs and other important documents.
My exams finished on 7th May so before that I basically did nothing related to project. But to get up to speed I spent more time  to read the docs, codebase and practice code. Proper references and good materials to read was suggested by David, on a teleconference that we did on 8/05/2014. Unfortunately I missed a SunPy dev meeting thats held on every Monday at 21:30(+5:30gmt). Also it seems like Monday 21:30 would be a bad time for me. 
Reading the docs and codebase, I came across various roadblocks and got to know that there are many things I don’t understand. Fortunately I used this time to level up my knowledge. Although there is still a lot of things I have to know, but that can’t be done just by reading. 
In brief I used this time to go through astropy.units module to know how to integrate it with sunpy codebase. I played around with quantities to get a better idea about it. There was also a wcs tutorial that David gave me to read. Further I used this time to get familiar with git.
This will mark the end of community period(3 days after writing this post). I feel excited as well as nervous as this would be my first big scale project. Hopefully I will have a wonderful summer working on this project!