-
-
Notifications
You must be signed in to change notification settings - Fork 577
GSoC 2014 Asish Panda
#Project Title Re-implementation of sunpy.wcs as sunpy.coordinates
Currently the solar coordinate system is implemented in sunpy in sunpy.wcs
file. The current module comes with various shortcomings:
-
There is no feasible way of representing solar coordinates in different coordinate representations.
-
Solar coordinates can only be transformed between each other. There is no way to 'create' them, which limits, its functionality, ability to manipulate them.
This project aims to re-implement the current wcs as sunpy.coordinates
using the idea described in APE5. This can be briefly explained as:
-
Creation of classes for coordinate representation(Cartesian, Spherical, cylindrical) . These classes would inherit from a common base class to avoid code duplication. Also the various methods for transformation between the representation would be present here.
-
Creating coordinate frame class(helio projective, helio-centric and helio graphic). These will be subclasses of a parent coordinate frame class. Much of the transformation algorithm between them would be reusable from the existing
sunpy.wcs
.
- Fully implemented and usable Representation Classes.
- Working classes for solar coordinate system.
- Ability to transform between different coordinate representation and different solar coordinates.
- Transformation of solar frames to other celestial frames(as supported by astropy).
- Integration of astropy.units in sunpy codebase(as much as time permits).
- Successful tests for their implementation.
- Documentation for the new changes.
- Read documentation, practice code, get familiar with
astropy.coordinates
. - Active in IRC channel, communicate with my mentor.
- Make my future goals clear. Get the final idea about the project implementation and approach I should take after discussing thoroughly with my mentor.
Define the parent class of coordinate representation class. Much of this should
be reusable from what is already present in astropy.coordinates.coordsystems.py
.
Define the sub-classes of coordinate representation classes. Further, they would also contain the methods necessary to transform between various representation, and a single method for invoking them. If all is implemented according to plan, a possible transformation would look as
c1 = coords.CartesianRepresentation(x,y)
c2 = c1.represent_as(coords.SphericalRepresentation)
During this period of time, I will make sure the tests are running and make documentations.
Define the main base class for coordinate frame. As for the midterm evaluation I plan to submit the new coordinate representation classes.
Define the subclasses for solar coordinate frame. These classes can be represented in any coordinate representation previously defined. I will also utilise this time for implementing the transformation between the solar coordinates using the transformation graph in astropy.coordinates. If all is implemented according to plan, following would be possible:
`hpc = coord.HPC(coords.CartesianRepresentation(x,y))`
`hcc = hpc.transform_to(coords.HCC)`
And then again represented as spherical representation with
`hcc_sphere = hcc.represent_as(coords.SphericalRepresentation)`
Creating methods for transformation of solar coordinates to different celestial coordinates. This will require time as new algorithms needs to formulated.
Add tests, make documentations and make sure everything is working as planned.
I will use this time to integrate astropy.unit into sunpy codebase. This will add more flexibility to the existing sunpy framework.
Finalise everything, solve any bug that might arise, add missing documentations and making sure tests passes.
I plan to work full summer dedicating it for the project. As for now I have no plans or vacation for summer. If by some unseen circumstances I happen to be absent, I will inform my mentor, also it will not last more than 2 days. Although I should mention that because of my semester exams due on last week of April and will probably last till first week of May(schedule is not out yet) I will not be able to work 40 hours a week for that time, which I will make up for after my exams. (It will be over before the coding time begins).
I created a pull request, adding tests for sun library, for increasing its tests coverage. It can be found here Although not for sunpy, I submitted a patch which was merged later, showing a better error in case of failure of conversion in epoch class. Link
###References