[AstroPy] plotting FITS/WCS in Python: APLpy, Pywcsgrid2

Thomas Robitaille thomas.robitaille at gmail.com
Thu Jun 12 02:47:45 EDT 2014


Just to add some more details on WCSAxes - it is the main
Astropy-related effort to develop this kind of functionality. The API
document that was agreed on is here:

  https://github.com/astropy/astropy-api/blob/master/wcs_axes/wcs_api.md

This was an effort by Jae-Joon Lee (author of pywcsgrid2) and myself to
try and write a package as close as possible to Matplotlib while
retaining some of the nice elements from pywcsgrid2 and APLpy.

One of the Astropy GSoC students, Asra Nizami, is working on improving
functionality, tests, and performance, and I anticipate that we will be
able to have a first release of the package later during the summer. The
plan is then to refactor APLpy (which provides a higher-level interface)
to use WCSAxes internally.

In the mean time, let us know if you try it out, and if you run into any
issues! The docs are here:

  http://wcsaxes.readthedocs.org/en/latest/

Cheers,
Tom

Stuart Mumford wrote:
> Hi,
> 
> There is also the WIP WCSAxes pacakge that sounds like it would be close
> to what you are after, http://wcsaxes.readthedocs.org/en/latest/,
> https://github.com/astrofrog/wcsaxes
> 
> Stuart
> 
> 
> On 11 June 2014 23:30, Thøger Emil Rivera-Thorsen <trive at astro.su.se
> <mailto:trive at astro.su.se>> wrote:
> 
>     The Kapteyn package also has some quite nifty looking plotting
>     capabilities (built on matplotlib). Have not actually used it though.
> 
>     http://www.astro.rug.nl/software/kapteyn/maputilstutorial.html#image-objects
> 
> 
> 
>     On Wed 11 Jun 2014 11:50:13 PM CEST, John ZuHone wrote:
>     > The development version (v. 3.0, which is due for release within the
>     > next month or so) of yt (http://yt-project.org) supports FITS images:
>     >
>     >
>     http://yt-project.org/docs/dev-3.0/examining/loading_data.html#fits-data
>     >
>     > These IPython notebooks show how to do plotting, which makes use of
>     > the (also in development) wcsaxes (http://wcsaxes.readthedocs.org)
>     > library for overplotting coordinates:
>     >
>     >
>     http://yt-project.org/docs/dev-3.0/cookbook/fits_radio_cubes.html#radio-cubes
>     >
>     http://yt-project.org/docs/dev-3.0/cookbook/fits_xray_images.html#xray-fits
>     >
>     > On Jun 11, 2014, at 5:45 PM, Tim Jenness <tim.jenness at gmail.com
>     <mailto:tim.jenness at gmail.com>
>     > <mailto:tim.jenness at gmail.com <mailto:tim.jenness at gmail.com>>> wrote:
>     >
>     >> pyast also plots WCS grids and can use matplotlib (but the plotting
>     >> backend is pluggable so you can put your own in as well).
>     >>
>     >> --
>     >> Tim Jenness
>     >>
>     >>
>     >> On Wed, Jun 11, 2014 at 2:44 PM, Leo Singer <lsinger at caltech.edu
>     <mailto:lsinger at caltech.edu>
>     >> <mailto:lsinger at caltech.edu <mailto:lsinger at caltech.edu>>> wrote:
>     >>
>     >>     Hi,
>     >>
>     >>     What are the current options for generating plots in Python from
>     >>     FITS/WCS data? I know of at least two Matplotlib-based projects:
>     >>
>     >>     APLpy, http://aplpy.github.io <http://aplpy.github.io/>
>     >>     Pywcsgrid2, http://leejjoon.github.io/pywcsgrid2/
>     >>
>     >>     Both generate very nice looking output. APLpy is under active
>     >>     development, but Pywcsgrid2 hasn't seen new patches in about
>     a year.
>     >>
>     >>     These two projects have rather different designs. APLpy provides
>     >>     high-level operations built out of Matplotlib calls. On the other
>     >>     hand, Pywcsgrid2 is an Axes subclass that lets you use any
>     >>     Matplotlib plotting command, but in world or pixel coordinates.
>     >>
>     >>     I see the advantages of both approaches. The latter works better
>     >>     for me, because I often find that my plots involve delving into
>     >>     what I consider relatively esoteric Matplotlib techniques, such
>     >>     as insets, z-order, and annotation styles. For me, Pywcsgrid2
>     >>     works well because in almost every respect I am dealing with an
>     >>     ordinary Matplotlib figure.
>     >>
>     >>     Pywcsgrid2 needs some patches to work with the latest version of
>     >>     Astropy. I am working on getting them upstream, but I am
>     >>     considering forking the project if it is not being maintained. It
>     >>     looks like APLpy and Astropy have many of the same committers, so
>     >>     I thought I would ask here: would there be any interest in
>     >>     incorporating a Pywcsgrid2-like axes subclass into APLpy, to
>     >>     support either paradigm?
>     >>
>     >>     Are there other Python-based astronomical plotting projects
>     >>     should I be aware of?
>     >>
>     >>     Leo
>     >>     _______________________________________________
>     >>     AstroPy mailing list
>     >>     AstroPy at scipy.org <mailto:AstroPy at scipy.org>
>     <mailto:AstroPy at scipy.org <mailto:AstroPy at scipy.org>>
>     >>     http://mail.scipy.org/mailman/listinfo/astropy
>     >>
>     >>
>     >> _______________________________________________
>     >> AstroPy mailing list
>     >> AstroPy at scipy.org <mailto:AstroPy at scipy.org>
>     <mailto:AstroPy at scipy.org <mailto:AstroPy at scipy.org>>
>     >> http://mail.scipy.org/mailman/listinfo/astropy
>     >
>     >
>     >
>     > _______________________________________________
>     > AstroPy mailing list
>     > AstroPy at scipy.org <mailto:AstroPy at scipy.org>
>     > http://mail.scipy.org/mailman/listinfo/astropy
>     _______________________________________________
>     AstroPy mailing list
>     AstroPy at scipy.org <mailto:AstroPy at scipy.org>
>     http://mail.scipy.org/mailman/listinfo/astropy
> 
> 
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy



More information about the AstroPy mailing list