Skip to content

GSoC 2015 Application Shahnawaz Ahmed: Implement framework for handling velocities and velocity transforms in astropy.coordinates

Shahnawaz Ahmed edited this page Mar 27, 2015 · 8 revisions

Link to final application : http://www.google-melange.com/gsoc/proposal/public/google/gsoc2015/sahmed95/5629499534213120

Sub-organization information

Astropy

Student Information

Name -Shahnawaz Ahmed
IRC - sahmed95
Github username - sahmed95
Email - shd339@gmail.com
Blog - http://gsoc2015sahmed95.blogspot.in/

University Information

University: BITS Pilani K K Birla Goa Campus
Major: Physics, Electrical and Electronics Engineering
Current Year and Expected Graduation date: 2nd Year, August 2018
Degree: M.sc.(Hons.) in Physics, B.E.(Hons.) in Electrical and Electronics Engineering

Programming experiences

Languages : Python, Java, C, Octave I started exploring Machine Learning last summer and have used Python as my preferred programming language ever since. I have ported a few octave implementations of machine learning algorithms like SVM, Neural Networks etc to python using Numpy and Matplotlib. As part of my summer project, I worked on a neural network model to predict malignancy of breast cancer masses based on data from around 900 patients.

For collecting data related to real estate price fluctuations I developed scripts for web scrapping using BeautifulSoup and Regular Expressions.

I run an automated service for lawyers which notifies them of their cases via an SMS after searching a list of cases from the website of the High Court. This involved a fair use of regular expressions and I learnt the basics of NLTP while developing the service. This was my first experience of implementing a real world service using python and I managed to grow a customer base of over 80 lawyers who tested my service. This project also introduced me to Google App Engine and scheduling.

I prefer sublime text for writing code and use Ubuntu 14.04.

With regards to Astropy, I am familiar with the coordinates package, its use and structure. I have also fixed some issues (3495,3505) for Astropy and I am getting familiar with the workflow for Astropy developers.

My physics background suits perfectly for the project I intend to take up. I have dealt with coordinate transformations in Classical Mechanics using Euler angles and other transformation matrices. I have also completed one semester of Introductory Astronomy and hence have beginner level knowledge of astronomical coordinate systems. More on this at the end of the application.

Project Proposal Information

Abstract

The coordinates subpackage in Astropy currently only supports transforming positional coordinates. Astropy intends to develop a consistent framework for also transforming velocities (e.g., proper motion to Cartesian) with full support for barycentric, galactocentric and LSR motion. This project aims to develop a package to handle velocities and carry out transformations in a similar way as defined in the existing module for coordinates (SkyCoord). It will provide an easy interface to store and work with velocities and can be a precursor to the long term goal of creating a unified framework that handles both position and velocity.

Title

Astropy : Implement framework for handling velocities and velocity transforms in astropy.coordinates Detailed Description/Timeline

Deliverables

  • Create a subclass to store velocity which inherits SkyCoord. Methods will closely follow those in SkyCoord for easy integration to it later.
  • Following modular class hierarchy define functions for handling velocity conversions, calculation of relative velocities, transformations etc.
  • Write an Ipython notebook explaining the use of the package developed

Inspiration: ~~~~~~~~~~~

SkyCoord will act as the super class and serve as the inspiration for the structure of this subclass. This is necessary for easy integration of this framework with the coordinates framework later. The same concept of “transformation graph” will be used to search for the shortest path from the starting velocity to the target. The representation classes for frames will be inherited Like the coordinate transformations, this allows only the simplest transformations to be defined, and the package will automatically determine how to combine those transformations to get from one system to another. This is implemented in the transformation module which will be followed for defining velocity transformations.

Implementation: ~~~~~~~~~~~~~~ STAGE I ~~~~~~~

The first part of the project will deal with making the data representation classes and “low-level” container classes to store velocity information. These classes will store the actual spatial information of the velocity (proper motion, cartesian) and position (coordinates) as Quantity subclasses (e.g., radial velocity, angular velocity). This will use the the representation classes provided in the coordinates package (Galactic, Alt-Az, ICRS). Initially, the position information will be directly passed as an input of the object type SkyCoord. The velocity subclass will inherit all the methods of SkyCoord and use them to manipulate coordinates. This will be followed by testing all the cases and dealing with invalid inputs and warnings for mis-match/incorrect units etc. using the "warnings" class. The next step will be working on including barycentric, galactocentric, and LSR corrections. The user should now be able to store velocities by simply creating an object in the following manner. v = SkyVel(radial = 0*u.km/s, angular = 0.3*u.rad/s, coord = SkyCoord_object)

The frame information will be accessed from the SkyCoord_object. Functions like pairwise_velocity, relative_velocity will be added next.

STAGE-II

The second part of the project is implementation of the transformations. A good way to start can be to look at how coordinate transformations are already implemented in Astropy and use them. The velocity transformation will be the time derivative of the position and will involve differentiation of the coordinate transformation matrices. Finite difference method will be explored to approximate the derivative of the transformation matrices. In the case of Galactic space velocity a matrix multiplied with the coordinate transformation matrix does the trick as it can be seen in the paper by Johnson, D. R. H. & Soderblom, D. R. "built_in frames" in the coordinates package contains all the transformation functions. (Glactic, CIRS, ICRS) and can be used directly. An alternate resort is defining the transformation matrices from scratch (Last resort). A number of papers have been published in this regard. Proper motion to cartesian :http://www.astronexus.com/a-a/motions-long-term

Galactic space velocities given proper motion, parallax and radial velocity : Johnson, D. R. H. & Soderblom, D. R.

Transformation from FK4 system to FK5 system : Soma, M. & Aoki, S.

The objective will be to define these transformations so that the user can call a simple “.transfom_to(‘FK4’)” or “.cartesian()” to get the velocity in the representation required. Examples such as the following can be a good start. http://idlastro.gsfc.nasa.gov/ftp/pro/astro/gal_uvw.pro

http://www.lpl.arizona.edu/~ianc/python/_modules/astrolib.html

This will be followed by rigorous testing and fixing any bugs/loopholes.

STAGE-III

The last part of the project will include documentation and writing an Ipython notebook which explains the use of the package.

Physics background

I am in my 2nd year of a 5 year dual degree in Physics (M.sc.) and Electrical & Electronics Engineering (B.E.). I am very passionate about Physics and plan to make a career in academics and research. I started exploring scientific computing after doing a project for my Introductory Astronomy course which dealt with Quantification of dark matter in the solar system using Galaxy Rotation Curves. I realized the importance of having good programming skills as a physicist and ever since I have tried to learn more about scientific computation. I have completed a semester of Classical Mechanics using both Lagrangian and Hamiltonian formulations and have dealt with coordinate and velocity transformations (using Euler angles). This is one of the reasons that draws me to the project. I am currently working on a project in statistical analysis in which I am trying to study the time evolution of a network representing the relationship between real estate price fluctuations among different suburbs of Mumbai city.

Clone this wiki locally