GSoC 2014 Rishabh Sharma
A Proposal to Refactor LightCurve
Personal Information:
Name |
Rishabh Sharma |
Time zone |
+530 hrs GMT |
IRC Handle |
|
Github |
gunner272 |
Skype |
rishabh.sharma108 |
Blog |
|
Blog Feed | rishabhsharmagunner.wordpress.com/feed |
Abstract:
LightCurve object needs to move away from pandas DataFrame to Astropy Table. This would be step in coherence with Factory based Implementation being currently worked on.
Reasoning:
--Astropy table allows specifically for individual elements to be multi-dimensional array with comfortable ease. This would prove to be helpful for astronomy community whose data comes in multi-dimensional format ( FITS ).
--Astropy Table makes provision for meta information to be stored alongside data proving to be wrapper itself. It has a column sub class better suited to sunpy needs. It has data members such as units,description adding more semantic knowledge.
Detailed Description:
--I would like to address the issue of indexing LightCurve object based on timestamps. No specific solution is provided by Astropy , as to pandas which implements an Index class to do a label to indices mapping using Cython. I propose the following methods
1)Creation of Indexed Table subclass which allows indexing based on any column whose values are is hashable and unique. A `OrderedDict
` would internally map labels to indices. This method provides for exact access ,it is also generalizable allowing for tables to be indexed on basis of any object and future implementation in Astropy could be based on this. This class would have an additional .loc method . Cases for .loc method.
table.loc(label)-> row of table with corresponding label
table.loc(label1,label2) -> returns list of rows (slicing)
table.loc([label1,label2....])-> returns list of rows corresponding to labels
2)Create a LightCurve class with Indexed Table as base data structure. As with the case solar data, input data can be sorted according to time. This column can be named the index. This would allow usage of numpy.searchsorted on Table.index and provide non-exact access required for truncate method.
Timeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Deliverables:
- genericlightcurve.py, test_genericlightcurve.py
- index.py(Table sub class)
- eve.py, test_eve.py
- goes.py, test_goes.py/alternative
- logical.py, test_logical.py
- norh.py, test_norh.py
- lyra.py, test_lyra.py
- Corresponding documentation
Contributions to Sunpy
Ongoing Pull Requests
-
https://github.com/sunpy/sunpy/pull/892
Solved issue #841, hanged LightCurve meta data member to return an Ordered Dict instance, with special attention to EVE LightCurve object header.
-
https://github.com/sunpy/sunpy/pull/887
Added ability to parse time as measured from 1 Jan 1958 (TAI Format).
Merged Pull Requests
-
https://github.com/sunpy/sunpy/pull/889
Solved issue #861, missing data value ( sans the hard coding ) converted to NaN .
* https://github.com/sunpy/sunpy/pull/894
Filed bug #882, and solved it as a moral obligation. Small issue of repetition in EVE LightCurve header.
Also made a small change to developer guide.
These Pull Request have helped me immensely. They have given me an opportunity to interact with community, gain experience contributing open source project, familiarize with code. I now use git with added confidence.
About Me:
I am Rishabh Sharma studying in second year of undergraduate program at International Institute of information Technology pursuing Computer Science and Engineering degree. I plan to complete my honors in the area of Information Extraction and Retrieval. The feature I like about python is the simplicity and readability of the language which allows for rapid development. I have worked previously with python based web framework web2py, using it to develop a web service which would group twitter users based on the context of their tweets using techniques borrowed from NLP and information extraction. For over two years now I've been coding on a Linux workstation. I have written a lot of scripts which make my life easier ,ranging from transferring music to my smartphone automatically at plugging of the mobile ,getting updates of matches from certain site. Currently I am working on project of creating a terminal based chat client allowing for peer to peer communication, trying to take my interest in socket programming to some final product. I have previously developed a wave file equalizer with accompanying GUI in python which helped me gain experience in GUI designing.
Motivation:
The only related course work I have undertaken is Science 1 course. I believe the college curriculum will not teach me further. Thus it would amazing to learn about something different. SunPy offers me more than this, the opportunity to contribute to FOSS seems to entice me more day by day so does working in a team of individuals having similar principles seem interesting.
Summer Schedule:
I am free to code away this summer (40 hrs per week if required more).As of now I do not have any travel plans for summer.