Final Summary

The end is here! After a three months of thinking and coding it has finally come to an end. I must say this was the best thing I have ever done in terms of programming. Though I don’t plan to leave it at the best thing for long! 😛 
My project involved integrating astropy into sunpy. Though I can’t say I achieved what I hoped I would, but regardless there was 3 PR I created from which one is merged, other one is pending and the third one requires me to work with my fellow gsoc student in a common branch(which involved both of our work). I plan to work with SunPy further to make any suitable changes.

PR:
1) Units

2) Spectra

3) Maps

Progress, 2 weeks after mid term

Hey all. Again a mandatory post. The PR I created, is done, only needs merging now. I made a hell at my local git repo when a commit was corrupted. It did not end there as it was followed by a weird error even after removing the corrupted empty files. I tried to fix it but failed so I had no choice but to clone it once again. Which again led to an error while compiling “python.h cannot compile” even after install all python-dev updates. I don’t remember how exactly but it was a problem with pyc files hanging around. I removed them mannualy and it worked.

As for now what I will be doing next, I think I will go with the wcs module. I have yet to start that and I think it will be much more interesting than my previous tasks.

But still I have yet to merge the changes of maps and spectra, but I think it can wait till I get comments on how to improve it.

I guess thats all for now. I am not good at writing about the stuff I do, so check out the PR or my forked repo for details!

Thanks!

Progress mid term

After a month into gsoc coding period, I have learnt many new things about python and git and also how OSS community work. This has been a great experience for me to work with people who are so willing to help a beginner! 
Currently I have created a PR to merge various files that has been quantified which includes:

1) sunpy/image/coalignment.py

2) sunpy/image/tests/test_coalignment.py

3) sunpy/instr/rhessi.py

4) sunpy/physics/transforms/differential_rotation.py

5) sunpy/physics/transforms/tests/test_differential_rotation.py

6) sunpy/sun/sun.py

7) sunpy/sun/tests/test_sun.py

8) sunpy/util/tests/test_unit_conversion.py [will be removed soon]

9) sunpy/util/unit_conversion.py [will be removed soon]

There were many roadblocks and mistakes that took consumed many hours but they were interesting. I messed up and pushed a error branch to master which could have deleted all my progress. I learnt the hard way that I should not mess with git without thinking! 

Also the spectra integration(which I have done, and i will create a PR soon) was quite tough to understand for me. On the bright side I learnt many new features of python going through that code! 
My next tasks would be to integrate maps and wcs with astropy. 

PR link

Progress/roadblocks after 2 weeks of coding

A compulsory post as instructed by the python umbrella. My project involves integrating the astropy.units into sunpy, which also means that I don’t have much to create something new. It involves understanding a module, its relation to other modules, and changing it accordingly with astropy.units. As I have mentioned in the last post, I have completed these three modules.

1) /sunpy/sun/sun.py

2) /sunpy/physics/transforms/differential_rotation.py

3) /sunpy/util/unit_conversion.py

I have also written their tests.

As for the roadblocks, I am facing quite a few now. Probably because I completed the easier part, and now comes the tougher part.

I now have to integrate classes, which are used in various other parts of SunPy. This makes it a little bit more ‘lengthy’ to figure out what changes should be made. I  plan to complete this integration part within the mid term evalution. Even if not, the wcs integration(the second part of my project) will be smaller in scale, so I should be able to make up for it.
As for what is left now is:

1) sunpy/image/coalignment.py

2) sunpy/spectra/spectrogram.py

3) sunpy/spectra/spectrum.py

4) sunpy/map (I will do this at the end)

The biggest problem I face is that I have to read many lines of code, and from where they are imported from, to make out what it is really doing. Rather than building something new, I have to make improvements, which takes a lot of…reading.

 

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! 

Getting selected for GSoC 2014

Even now I have a hard time believing that I was actually selected for GSoC. Regardless, I am in great joy that it actually happened.
I first got to know about SunPy whilst I was searching for an organisation that I could contribute after looking in the accepted groups under Python umbrella. I have an interest in astronomy, especially related to all the mysterious objects found in universe. But I hardly have any knowledge about all the technical details. Still I decided to contribute and make some connection with the people in SunPy.
Days passed and I learnt many new things, which I couldn’t have if it was not for people there. I started to realize the amazing capabilities of python and learnt so many new features about python. As GSoC came closer, they released the idea page and I immediately started researching about it. It took me atleast 20 days to prepare the proposal and finalize it.
Looking at other proposals, I realized I very less chance to actually make it, but fortunately because of the number of seats, I made it. Although me and one more student have been assigned the same project, but its probably better if we do different projects.