Skip to content

Google Summer of Code 2015 Project Ideas

ejeschke edited this page Mar 22, 2015 · 8 revisions

Background

Welcome to the project ideas page for the Astropy project! Astropy is a community effort to develop a single core package for Astronomy in Python and foster interoperability between Python astronomy packages. The project was started in 2011. Because it is a young project, there are many opportunities to make a big impact on the package by developing new features that will be used in day-to-day work by professional Astronomers.

Astropy will be participating in the Google Summer of Code 2015 under the Python umbrella organization. See here for information about participating as part of the Python organization, in particular the guidelines for prospective students, which include that students will need to:

  • Demonstrate to your prospective mentor(s) that you are able to complete the project you've proposed
  • Blog for their GSoC project. Free blogs are available at http://www.blogger.com/
  • Contribute at least one patch to the project(s) you're applying to work with

Students are expected to work (remotely) on the project full time this summer, and receive a $5,500 stipend, so this is a great opportunity to contribute to Astropy, have fun, and get rewarded for it!

If you are interested in applying, please read over our Student Application Guidelines!

Project Ideas for the Astropy Core package

Implement Distribution Support for Quantity

Suggested Mentor(s): Erik Tollerud

Difficulty: Beginner to Intermediate

Astronomy knowledge needed: none, but statistics knowledge/background useful

Programming skills: Python

Description

The Quantity class is powerful but doesn’t have particularly useful support for uncertainties on quantities or other statistical approaches to thinking about numbers. A very straightforward way to make progress on this would be to create a subclass of Quantity called “Distribution” (or similar) that represents a probability density function of a quantity as Monte-Carlo-sampled arrays. This project would involve implementing this subclass, propagating operations while combining distributions, as well as tools for extracting useful information from such distributions. If there is time, this could also involve expanding this system to support common analytically-representable distributions such as Gaussian and Poisson distributions.

Implement image rasterization methods for models

Suggested Mentor(s): Christoph Deil

Difficulty: Intermediate

Astronomy knowledge needed: Basic

Programming skills: Python, Cython

Description

When fitting models to binned data, evaluating the model at the bin centers leads to incorrect results if the model changes significantly within a bin. E.g. think of an image where the point spread function (PSF) only has a width slightly above the pixel size and you want to distinguish small Galaxies from stars.

Currently Astropy models have an evaluate method that can be used to evaluate them on a grid of pixel centers, there’s also an oversampling function to get a better representation of the expected flux in pixels. It would be useful to add methods that allow fast and precise rasterization of models, similar to what graphics libraries do (sparse subsampling or resampling of models evaluated on grids that are appropriate for each model, or anti-aliasing).

There are different options for how to proceed with this project, e.g. possibly add optional extension, sampling grid and bounding box information to the Astropy model classes, or contribute rasterisation code to astropy.modeling or photutils, or expand the existing resampling code in the reproject package. The student should be interested in model fitting and image rasterisation as well as profiling and extensive testing of a given method to make it “just work” for the end user.

Add indexing capability to Table object

Suggested Mentor(s): Tom Aldcroft (Astropy), Stuart Mumford (SunPy)

Difficulty: Intermediate

Astronomy knowledge needed: none

Programming skills: Python, Cython, familiarity with database algorithms

Description

The Table class is the core astropy class for storing and manipulating tabular data. Currently it supports a limited set of database-like capabilities including table joins and grouping. A natural extension of this is to provide the ability to create and maintain an index on one or more columns as well as a table primary key. With these indexed columns available then certain selection and query operations could be highly optimized. The challenge is to maintain the integrity of the indexes as column or table properties change, using state of the art algorithms for high performance.

There are various uses of this functionality, such as supporting time series data, where the index column would allow you to sort the Table correctly as well as performing operations such as truncations and merges while maintaining the integrity of the time series. Other uses include catalogs of positions in the night sky where an index column of astropy coordinate objects would maintain the uniqueness of every position.

To summarize:

  • Add method to create an index for a specified column
  • Add code to maintain these indexes when the table is modified
  • Add method to designate a column as a primary key (possibly maintaining table in sort order for that key)
  • Optimize existing table operations to use indexes where possible
  • Add new methods to select table rows based on column values

Unify and improve file handling

Suggested Mentor(s): Michael Droettboom

Difficulty: Intermediate to Expert

Astronomy knowledge needed: none

Programming skills: Python, Unix features

Description

We have a number of packages that read and write data to files and file-like objects. While there was some initial effort to unify this code in get_readable_fileobj and others, in general each package is handling its own file I/O. This sort of code is notoriously difficult to get right across versions of Python and the different platforms we support, so it would be beneficial to remove this duplication. This also means that some features, such as gzip handling or URL handling, are not universally available or inconsistent across packages. Once this is unified, we can move on to some more advanced features that don’t exist anywhere in astropy, such as HTTP Range fetching (see astropy/#3446, and OS-level file locking to make multiprocessing applications that write to files more robust.

Implement missing astropy.modeling functionality

Suggested Mentor(s): Christoph Deil

Difficulty: Intermediate to expert

Astronomy knowledge needed: Basic

Programming skills: Python

Description

Implement some basic features are still missing in the astropy.modeling package:

  • Fit parameter errors (symmetric and profile likelihood)
  • Poisson fit statistic
  • PSF-convolved models
  • model parameter and fit result serialisation, e.g. to YAML or JSON or XML (e.g. some astronomers use XML)

For the parameter error and Poisson fit statistic part some statistics background is needed, as well as interest in discussing and finding a good API for these things.

An optional fun application at the end of this project (if model and fit result serialisation is implemented) could be to develop an interactive image fitting GUI (e.g. with IPython widgets in the web browser) for common 2D Astropy models, showing data, model and residual images and letting the user adjust model parameters and display fit statistics and results interactively.

Implement framework for handling velocities and velocity transforms in astropy.coordinates

Suggested Mentor(s): Adrian Price-Whelan & Erik Tollerud

Difficulty: Intermediate to Expert

Astronomy knowledge needed: understanding of coordinate transformations, some knowledge of astronomical coordinate systems would be useful

Programming skills: Python

Description

The coordinates subpackage currently only supports transforming positional coordinates, but it would be useful to develop a consistent framework for also transforming velocities (e.g., proper motion to proper motion, or proper motion to cartesian) with full support for barycentric, galactocentric, and LSR motion. This project could be:

  1. working with us to develop a consistent API for handling velocities within coordinates,
  2. developing a trial implementation of an API,
  3. actually doing core development to implement the new features, or
  4. some combination of all of the above.

Implement Public API for ERFA

Suggested Mentor(s): Erik Tollerud

Difficulty: Intermediate to Expert

Astronomy knowledge needed: None required, but may be helpful for understanding ERFA functionality

Programming skills: Python, Cython, C

Description

Some of the major functionality for Astropy uses the ERFA C library (adapted from the IAU SOFA library) as the back-end for computational "heavy-lifting". Members of the community have expressed a desire to use this lower-level python wrapper around ERFA for other purposes that may not be directly relevant for Astropy. So this project would involve making the necessary changes to make the ERFA python API public. This includes:

  • Getting the documentation up to the astropy standard (currently it is mostly auto-generated verbatim from the C comments).
  • Implementing a more complete test suite for the python side of the code.
  • Possibly moving it to a separate package as part of the liberfa GitHub organization. This would also include making the necessary changes to ensure everything continues to work in Astropy.
  • Any other steps necessary to ensure the resulting package (or sub-package of Astropy) is stable and relatively easy to use.

Project ideas for Astropy-affiliated packages

Develop an affiliated package for observation planning / scheduling

Suggested Mentor(s): Christoph Deil, Erik Tollerud, Erik Jeschke

Difficulty: Beginner

Astronomy knowledge needed: Intermediate

Programming skills: Python

Description

Now that Astropy can transform from horizontal (altitude/azimuth) to sky coordinates it’s possible to develop tools for observation planning / scheduling (see here for an example). It would be nice to start developing an affiliated package that can be used by observers and observatories to plan and schedule observations. This project could go in a few different directions, including:

  • creating typical tables and plots for observation planning
  • optimising scheduling of observations for given target lists and telescope slew speed / exposure lengths for a given night or even month / year
  • contribute sun / moon rise / set functionality to astropy coordinates
  • a desktop or web GUI

The project could start with a look at the functionality of existing tools and then gather some input on the astropy mailing list what the community wants. The student should have an interest in coordinates, observations planning / scheduling and plotting / GUIs.

Contribute gamma-ray data analysis methods to Gammapy

Suggested Mentor(s): Christoph Deil, Axel Donath

Difficulty: Intermediate

Astronomy knowledge needed: Intermediate

Programming skills: Python

Description

Gammapy is an Astropy-affiliated package to simulate and analyse data from gamma-ray telescopes such as Fermi, H.E.S.S. and CTA. A lot of basic functionality is still missing, specifically we are offering projects on source detection, spectra and background modeling as briefly described here.

Astropy Acknowledgement/Citation Generator

Suggested Mentor(s): Erik Tollerud

Difficulty: Beginner to Intermediate

Astronomy knowledge needed: none, although some experience with astronomy citation practices might be useful

Programming skills: Python and LaTeX/BibTeX

Description

Some parts of Astropy and affiliated packages use algorithms or tools that have been published in the scientific literature (this includes Astropy itself). To encourage citing these works, it would be useful if Astropy had a feature to allow attaching citations to methods, functions, or packages. This would then allow a user to simply run a function along the lines of “write_citations” and have it print or write a file that tells them what papers to cite. Bonus points if this actually can show BibTeX or LaTeX bibliography entries that can be just dropped into papers with minimal effort on the part of the user.

Adding further spectral standards to specutils

Suggested Mentor(s): Adam Ginsburg & Wolfgang Kerzendorf

Difficulty: Intermediate

Programming skills: Python

Description

Specutils is a package within the astropy collection that deals with operations with spectra. Apart from imaging, spectra are the second main data product in astronomy. While imaging data is collected by hooking a giant DSLR at the end of telescope and sticking coloured glass between telescope and DSLR (a filter), spectra are obtained by breaking light up into its components and then observing the resulting distribution. These data are saved in a variety of formats.

Currently, we are able to read and write a subset of standards that are out there. As a project, we suggest to implement the remaining unsupported standards. All of the code is in Python and a good understanding of classes is needed for this project.

Improve pyregion and pyds9

Suggested Mentor(s): Christoph Deil

Difficulty: Intermediate

Astronomy knowledge needed: Basic

Programming skills: Python

Description

The pyregion package is very useful to work with ds9 and CIAO region files. It is now at https://github.com/astropy/pyregion but it is unfinished … someone has to improve and polish it. In particular the region file parser is very slow (see pyregion#48 and someone interested in parsing should find out why and make it fast. There are several other things to do, e.g. using astropy coordinates everywhere and implementing tests so that it is compatible with ds9 to a very high accuracy. The package could also be extended with Python functions to read / write / visualise MOC files or to unify and [improve the existing Python interfaces to ds9. The student should be interested in sky coordinates and regions, parsing, visualisation, writing tests and docs, and for the ds9 interfaces some Cython coding is probably needed.

Revamp astropython.org web site

Suggested Mentor(s): Tom Aldcroft

Difficulty: Intermediate

Astronomy knowledge needed: Basic / none

Programming skills: Python, web development (javascript etc)

Description

The http://www.astropython.org site is one of the top two generic informational / resource sites about Python in astronomy. This site uses Google App Engine and is basically all custom code built around the bloggart engine. Currently it is getting a bit stale for a few reasons:

  • There is no good mechanism for guest posting to expand the community of people contributing.
  • It is painful to add content because of the antiquated entry interface which now seems to work only on firefox.
  • The comment system is lacking (no feedback to comment authors etc).
  • The website code itself is convoluted and difficult to maintain / improve

The proposal is to start over with all modern tools to bring fresh energy and involvement into this project. All details of how to do this to be determined, but one requirement is to migrate all the current content. Part of this would be re-evaluating current resources as well as digging around to freshen up the resource list.

Enhancements to Ginga: A Toolkit for Building Astronomical Image Viewers

Suggested Mentor(s): Eric Jeschke

Difficulty: Intermediate

Astronomy knowledge needed: Basic / none

Programming skills: Python, GUI toolkit and event-driven programming

Description

Ginga is an astropy-affiliated project that implements a toolkit for building astronomical image viewers. It provides a widget that can display and navigate numpy-based 2D data arrays with highly interactive performance. This project would cover a number of enhancements to the basic widget or to the example reference viewer that comes with the package. A project might cover one or more of the following areas depending on the knowledge and interests of the applicant:

  • Enhance region analysis capabilities.
    Ginga provides a number of geometric shapes that can be drawn on an image canvas, such as boxes, ellipses, polygons, etc. This subproject would add the ability to cut out numpy data arrays corresponding to one or more drawn shapes with the non-contained pixels masked out. The project would also create a basic plugin to allow a user's custom python analysis routines to be easily registered that operate on such shapes and cutouts.

  • Support ds9 region files. ds9 is a popular FITS viewer for astronomical data. This subproject would add support for importing compatible ds9 region files via the pyregion module. This would create ginga geometric shapes corresponding to the ds9 regions. Part of this work would probably involve adding support to the plugin described above to load and save such region files.

  • Improve astropy-affiliated code base This project would bring the ginga codebase into PEP-8 compliance, add additional unit tests and update the setup/installation to be closer to the astropy affiliated package standard.

Clone this wiki locally