Skip to content

GSoC 2015 Application: "Astropy: Observation Planning and Scheduling Toolbox"

Jazmin Berlanga Medina edited this page Mar 26, 2015 · 5 revisions

Background

Academic

My bachelor's and master's degrees are in physics and my research interests have always been in astronomy. My undergraduate and master's thesis work has involved the study of spiral galaxies.

My most recent project involved running N-body simulations Milky Way-based models and looking at the pitch angle, an indicator of spiral arm tightness that has been tied to mass distribution in galaxies.

I've taught three semesters of Introduction to Astronomy lab as a graduate TA. This involves, among other things, leading night-time labs and teaching lab activities using planetarium software.

Programming

Although I initially dabbled in code while working on my undergraduate honors thesis, I didn't really learn until I started working on my master's project. Since then, I've worked mostly in Linux, primarily using bash scripting and Python (including various Astropy and related packages). I've also used Matlab, R and LaTeX, as well tweaked and run code in IDL, Fortran, C and C++.

Some examples of research or academic-related coding include:

  • Automated pipeline for measuring galaxy spiral arm pitch angles, including analysis and multi-step format conversions from initial simulation output to final data. This included use of Python packages such PyRAF and Astropy.
  • Wrote Python program to digitally overlay images of galaxies with spirals of given pitch angle to aid in visual check of measurements.  This included use of various Astropy functions.
    
  • Designed preliminary C++ code with another student to determine density profiles of dark matter halos.
    
  • Created Python plotting utility to look at various parameters of interest for extra-solar planetary system databases.
    

Please see following link for samples: LINKLINKLINKLINK

I've taken classes in:

  • Scientific Computing (using Matlab)
    
  • Cluster Computing (using bash, MySQL, etc. on a supercomputer)
    
  • Introduction to Computing with Java (HKUSTx: COMP102x; Summer 2014 online via EdX)
    
  • Summer School for Astrostatistics 2013 (week-long workshop; included instruction in R)
    

Other

Co-PI - XSEDE Allocation TG-AST140017. Awarded on SDSC’s Gordon. January 2014 - June 2015.

Proposal Abstract

Planning telescope observations using Python presently requires non-trivial amounts of coding in order to calculate rise/set times, airmass, parallactic angle and moon separation. We'd like to build a flexible tool set or API by defining classes, methods and I/O, as well as documentation. This would allow the user to produce tables, plots and scheduler input with just a few lines of code. Additional products may include IPython notebooks and a GUI to showcase the functionality of the toolbox.

Proposal Details

In order to plan and schedule telescope observations, one needs to have various pieces of information, including rise/set times for the Sun and moon, airmass/parallectic angle vs. time data, moon and target object separation, etc. Astronomers need this information both on a short-term (nightly) and long-term (month/year) basis in order to pick out the best dates and times for individual observers and for scheduling use of shared telescopes.

Currently, designing and implementing a Python-based workflow for planning observation runs is limited by:

  • The time/programming experience it takes to code.

  • The lack of inclusion of all necessary tools/functions in one package (namely Astropy).

  • The diversity of needs among observatories and astronomers, including scientific goals and existing software/hardware systems.

Consequently, there is need in the community for a set of tools that allows individual observation projects to quickly pick out the information they need and write short scripts that produce this data, whether it be tables or plots.

We propose to build this tool set as an Astropy-affiliated package. It would be organized around an API defining the various classes, methods, object attributes, input and output formats, etc.

For instance, if an astronomer needs to know whether the moon will be too close to a relatively faint target object on a given night, she would compute their separation in the sky. This could be accomplished via the API by creating two instances of objects of class "body", one each for the moon and the target. Each "body" object would have attributes related to location, velocity, etc. given an input date/time and selection of a coordinate system. The astronomer could then easily pull location information from each object, and produce tables giving the spatial or angular separation over the night in question. These tables could then be fed to plotting scripts, queue schedulers or GUIs.

The end products of this project would include this API, complete with documentation. Possible classes include body (to be used with "planetary" bodies such as the moon or Sun), site (to be used for information related to specific observing sites and telescopes) and tables (to be used for output data). Methods will make use of existing Astropy functionality (such as astropy.coordinates). Additional products may include a set of IPython notebooks showing how to use this package from the command line, as well as a simple desktop GUI written in PyQT.

Milestones

April 27 - May 25

  •  Identify existing tables/plots for airmass, parallectic angle, etc., for use in testing code.
    
  •  Set up repository framework on GitHub and announce call for testers.
    

May 25 - June 1

  •  Determine all necessary calculations/parameters and identify which ones are already in Astropy, affiliated packages, or non-affiliated packages.
    
  •  Get familiarized with object-oriented conventions in Python/Astropy.
    
  •  Plan out API framework.
    

June 1 - June 8

  •  Make working example that duplicates functionality of astropy.coordinates.get_sun() for the moon to evaluate feasibility of creating get_moon() function.
    

June 8 - June 15

  •  Design site and body classes.
    
  •  Write methods connecting site and body objects.
    

June 15 - June 22

  • Test site and body classes.
    
  • Incorporate fixes and tester feedback.
    
  • Update docs.
    

June 22 - June 29

  • Continue testing site and body classes.
    
  • Continue to incorporate fixes and tester feedback.
    
  • Update docs.
    
  • Write up IPython examples on use of site/body classes.
    

June 29 - July 3

  • Design table (and perhaps plot) class.
    
  • Write methods connecting site/body to table objects.
    
  • Submit Python midterm evaluation by July 1.
    
  • Submit Google midterm evaluation by July 3.
    

July 4 - July 12

  • 4th of July Holiday break & travel.
    

July 13 - July 20

  • Test table (and perhaps plot) class.
    
  • Incorporate fixes and tester feedback.
    
  • Update docs.
    

July 20 - July 27

  • Test site/body to object class workflow.
    
  • Incorporate fixes and tester feedback.
    
  • Update docs.
    

July 27 - Aug 3

  • Test workflow of body/site to table objects.
    
  • Incorporate fixes.
    
  • Update docs.
    

Aug 3 - Aug 10

  • Continue to test body/site to table objects.
    
  • Continue to incorporate fixes and tester feedback.
    
  • Update docs.
    
  • Write up IPython examples on use of table objects.
    

Aug 10 - Aug 17

  • Test all IPython example notebooks.
    
  • Design simple GUI.
    

Aug 17 - Aug 28

  • Test GUI with worked examples.
    
  • Update docs.
    
  • Submit Python midterm evaluation by Aug 26 
    
  • Submit Google midterm evaluation by Aug 28.
    

Patch sample

Link to a patch/code sample, preferably one you have submitted to your sub-org (*)

Added a test to astropy/coordinates/tests (test_sun_02 in test_funcs.py): https://github.com/astropy/astropy/pull/3626

Clone this wiki locally