Skip to content

GSoC 2016 Proposal for Ephemerides for Solar System objects in Astropy along with Barycentric Correction by Sharad Mirani

Sharad Mirani edited this page Mar 25, 2016 · 1 revision

#Google Summer of Code 2016 Proposal


Personal Details


University Information

  • University: Indian Institute of Technology Bombay
  • Major: Electrical Engineering
  • Double Minor: Computer Science | Industrial Engineering and Operations Research
  • Current year: 4th, Senior Undergraduate
  • Graduation Date: June 2017
  • Degree: Dual Degree (Bachelor + Master of Technology)
  • Specialization: Communications and Signal Processing

Other GSoC Information

Have you participated previously in GSoC? when? with which project? No. This is my first time.

Are you also applying to other projects? No. I'm applying only to Astropy.

Expected working hours: My work will be done mostly in the night. 21:00 to 05:00 (IST) are ideal working times for me. But in general I can sleep and stay awake at any time of the day making it easier for me to work with people from different time zones.

Holiday/Travel Plans and Availability: None. I will be available throughout the period of GSoC.

Work Hours: Approximately 40 hours per week or the amount of time required to finish the tasks allocated for the week (whichever is higher).


Background

I am a 20 year old mainly interested in Data Analysis and Astronomy. In my free time, I play nearly every racket sport, cricket and volleyball and binge watch TV series.

Astronomy: I have represented India at :

  • International Olympiad on Astronomy and Astrophysics 2011 and 2012 held in Poland and Brazil, respectively, bagging a Gold Medal at each event. In 2011, Team India was also awarded the Silver Medal in the team competition.
  • Internation Astronomy Olympiad (Jr.) held in Ukraine where I got a Gold Medal with an International Rank 3.

Owing to this experience, I have served thrice as Student Facilitator for the Orientation-Cum-Selection Camp, handling academic arrangements and evaluation to select the Indian teams for International Astronomy Olympiads. Last year, the Indian team to the IOAA won 3 golds and the Best Team Award.

I have significant knowledge of theoretical astronomy, including astrometry, general relativity, positional astronomy and theoretical astrophysics, including high-energy phenomena, cosmology and so on. I have been working with Astropy for a course project in Astrophysics, and am familiar with the basic structure and coding style. I have worked on analyzing high energy spectra and ASM light curves from RXTE for fitting diskbb models to binary X-ray sources. Find the detailed report here. I'm currently working on using Fermi and Astrosat CZTI data for detecting and localizing short gamma-ray bursts.

I have also been an integral part of Krittika - the Astronomy Club of IIT Bombay, leading a team of 5 dedicated members to organize 20 club sessions throughout the year 2014-15.

Programming: I have decent programming skills. I know and can code in Python efficiently and neatly. Writing readable and neat code, in my opinion, is very important especially in large codebases. I am currently learning how to use pytest and Sphinx so that once we start off, I can use it well.

Unfortunately, I do not have much experience with open source. But in my summer internship at Morgan Stanley - Strats & Modeling Division, I had the perfect experience required for this project. Essentially, I had to replicate and speed up the algorithm of pricing of financial products from C++ to Scala in a huge codebase. Writing tests for all the functions, devoting time to come up with the right API (and even variable names), experience with Git version control and writing the code in a sustainable and manageable manner is something I inculcated very well during this time.

On the lines of linear programming, I have also done an internship in the Production & Quantitative Methods department of IIM - A wherein I formulated & solved a constrained programming problem of survivable networks using IBM-ILOG CPLEX solver. In addition to that, I have a strong background in theoretical basics of optimization as I have been pursuing the wide range of courses as a part of my Operations Research Minor.

All this being said, I am willing to learn about and implement algorithms that are new to me, and am usually enterprising and enthusiastic about work. I think I will make a good candidate for this project. Also, you can find the details of the projects mentioned above and more in my CV here.


Project Information

Proposal Title: Ephemerides for Solar System objects in Astropy along with Barycentric Correction

Abstract:

An often-requested missing feature in Astropy is the ability to compute ephemerides: the on-sky location of Solar System objects like the planets, asteroids, or artificial satellites. I would start with implementing a get_moon and get_planet functions similar to the existing get_sun to familiarize myself with the major concepts in the astropy.coordinates subpackage. The later and more interesting part of the project will involve using the orbital elements that the JPL Solar System dynamics group has already complied (there is already a package to read these files: JPLEphem), and translate those into the Astropy coordinates framework. I plan to implement these algorithms and also collaborate with the mentors and Astropy community to develop an API to access this machinery. Also, with a good head start, extend it to other solar system objects (asteroids, etc.) and use the ephemeris parts to implement high-accuracy barycentric correction.

Detailed Description

  • To start with, I would try to replicate the get_sun function to add the get_planet. The erfa.plan94 provides us with the heliocentric positions and velocities of the planets. Using this data along with earth's position and velocity obtained from erfa.epv00, we can find the position of planets including the relativistic effects of apparent directions due to the relative velocity and finally return a SkyCoord. The erfa.plan94 also provides us with the position of the Earth-Moon Barycentre which can be further exploited to add the get_moon function. I will add tests and make sure that this works fine for an array of times.

  • For higher precision, we would have to resort to the computaions already compiled by the JPL Solar System dynamics group. Since this part need the user to have data files, I plan to create a separate module (with the permission of the community) to let the user choose on the basis of his needs. The one with more precision will need to load big data files which might take a bit more time than the current erfa routines.

  • There already exists a JPLEphem framework to use this data efficiently. I would like to start with replicating the same API for the Astropy framework just to get an idea of its working. Later, we can come up with a more suitable API and I will make the tweaks accordingly.

  • The JPL Solar System dynamics group has also generated similar files for:

  • All these objects can be easily inculcated in the module once we have a generalized, robust and well working model of the implementation of JPLEphem in the Astropy framework.

  • The other accuracy I would like to incorporate in the calculation is the Barycentric Correction. Recently, it has been implemented for the position of earth and our velocity in the barycentric framework. I plan to improve the accuracy in the following ways:

    • We use the more precise location and speed of earth using the JPLEphem.
    • We also add the effect due to position of the observatory and its rotation about the earth axis to get better results.
    • We have many libraries (some even in Python) like PINT or the pulsar timing packages tempo to compare our performance.

Delivarables

  1. get_moon and get_planets using the current erfa functions.
  2. get_object_precise module to implement the JPLEphem's algorithm of extracting the datafiles in the Astropy framework primarily for our moon and other planets.
  3. Extend the get_object_precise function to all the other Solar System objects, namely asteroids, comets, satellites of other planets and our own artificial satellites.
  4. Improve upon the recently implemented barycentric corrections to include the better calculations of earth's parameters along with the effects of obervatory's topometric corrections.
  5. Develop extensive and exhaustive tutorials and documentation for all the added modules.

Detailed Timeline

This is a conservative sketch of how the project will proceed. I plan on keeping in touch with the mentor throughout the week and on getting code reviewed on a timely basis. This feedback has been incorporated in the schedule below.

Time Period Task
0 Pre-GSoC Polish the pull request to include some tests for the ``get_moon`` function. Document the functions properly along with the change log.
1 Community Bonding Period Get to know my mentors and people I'll be working with well, and set up a working timetable. Also, make firm the theoretical ideas which are to be implemented in the project. Get used to the Astropy code structure.
2 May 23 - May 27 Implement the ``get_planet`` function along with writing the tests and proper documentation.
3 May 30 - Jun 3 Understand and replicate the JPLEphem API in the Astropy framework.
4 Jun 6 - Jun 10 Create the separate module which calculates the
5 Jun 13 - Jun 17 Testing the working of the more precise JPL Ephem Calculations.
6 Jun 20 Midterm evaluation starts. Have an exhaustive chat with mentors regarding the evaluation and parts of code that I might need to improve upon
7 Jun 20 - Jun 24 Buffer time, submit midterm mentor evaluation once satisfactory progress is made
8 Jun 27 Midterm evaluation deadline
9 Jun 27 - Jul 1 Extend the JPL Ephem to calculate the position of more Solar System Objects like Moons of Other Planets and Asteroids.
10 Jul 4 - Jul 8 Extend the JPL Ephem to calculate the position of the satellites of Earth.
11 Jul 11 - Jul 15 Extensively test the implementation of JPL Ephem computations for all the applicable objects.
12 Jul 18 - Jul 22 Implement the barycentric corrections.
13 Jul 25 - Jul 29 Get acquainted to pulsar timing packages tempo and PINT to use it as a reference for the barycentric corrections.
14 Aug 1 - Aug 5 Check the working of barycentric corrections as compared to the results from pulsar timing packages and PINT.
15 Aug 8 - Aug 12 Put in more tests to check the working of the API as a whole.
16 Aug 15 - Aug 19 _Final week_. Have an exhaustive chat with mentors to obtain a feedback regarding any changes needed. Tidy up the code, improve documentation and submit code sample. Write and submit the final mentor evaluation. Write a to-do list for future GSoCs.

Note: The documentation for each week's code shall be done while writing the code. In any case, any code shall not stay undocumented for more than 2 weeks.


References

Clone this wiki locally