Skip to content

GSoC 2014 Rishabh Sharma

Nabil Freij edited this page Mar 17, 2023 · 3 revisions

A Proposal to Refactor LightCurve

Personal Information:

Name

Rishabh Sharma

Time zone

+530 hrs GMT

IRC Handle

rishabh@irc.freenode.net

Github

gunner272

Skype

rishabh.sharma108

Blog

rishabhsharmagunner.wordpress.com

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

APR 21 ---- MAY 18 ( Community bonding period )

Decide on final implementation detail with mentors, research about various sources and
corresponding web api, Read Astropy documentation ( code wherever required ), pandas code to look
scope of improvement. Become a Git PowerUser.
MAY 19 ---- JUN 1

( 2 weeks )

Start working on IndexedTable (sub class of Table) which allows timestamp based indexing.This class
will have .loc method and would internally use a dict to map labels to indices.Ensure the
implementation is generalizable so as to be included in Astropy.Dict based implementation should
help.
JUN 2 ---- JUN 15

( 2 weeks )

Implement the Generic LightCurve class with the required plot, extract, truncate methods.
JUN 16 ---- JUN 22

( 1 week )

Write test cases and test the same for the Generic LightCurve class.Ensure quality, error free code
, squashing any related bugs.
JUN 23 ---- JUN 29

( Buffer Period Week long)

Finish any leftover work from previous week, score high in mid term evaluation.Finish documentation
of work done up till now.
JUN 30 ---- JUL 6

( 1 week )

Implement all the required sub classes of various sources.
JUL 7 ---- JUL 13

(1 week )

Add test cases for all the sub classes, finish any left over work.If finished early move on to the
next stage.
JUL 14 ---- JUL 20

( 2 weeks)

Tailor IndexedTable subclass to Astropy needs.
JUL 28 ---- AUG 3

( 1 week )

I hope to finish documentation Sprint early and then continue working on integrating with Astropy
AUG 4 ---- AUG 18

( Buffer Period )

Fix any unresolved bugs, try make optimisations.

>AUG 18

I plan to an active sunpy developer even after GSoC time-period and continue the work I would
undertake this summer .

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

Merged Pull Requests

* 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.


Clone this wiki locally