Career navigation

Astronomy software developer Bill Joye on ds9 7.0

On June 6th, Bill Joye released the latest version of his popular, open source data visualization software, SAO ds9 v7.0. Bill is a software developer at the Harvard-Smithsonian Center for Astrophysics, and I sat down with him this week to discuss the new release of ds9, the future of the program, and his views on software development in astronomy.

First, lets look at the key features in the new ds9 release. If you’re not familiar with the software, you may want to first read the tutorial for using ds9 we posted last year. You can also read Bill’s own description of the release over at Astrobetter.

3D visualization in ds9 v7.0

Version 7.0 of SAO ds9 displaying a 3D data cube (RA vs DEC vs velocity). The data is from the COMPLETE CO survey of the Perseus region.

The major feature addition in this release is 3D data cube visualization. Data cubes are extensions of the 2D FITS images astronomers have used for decades, but including a third data dimension that can represent, e.g., wavelength or velocity. For example, see the screenshot at right demonstrating the COMPLETE CO survey of the Perseus region.

As Bill describes it, ds9 has taken a different route to 3D data visualization than many other tools used in astronomy. Rather than using GPU texture mapping to render slices of a data cube, ds9 uses ray-tracing and maximum (or average) intensity projection to generate a 2D image for display. The advantage is that the resulting 2D image can be manipulated trivially in real time (applying a new stretch, colormap, etc.), although a disadvantage versus the texture mapping approach is that rotating the scene and re-rendering is computationally intensive (taking of order seconds). On 64-bit systems the software can open data cubes of arbitrary size (Bill says the record so far is ~20 GB). Ray tracing is done in parallel and visualization speed should be independent of the data cube size as long as you have enough RAM to load the entire cube into memory (if not, swapping will eat up time).

Loading a data cube

Using ds9 to generate a 1D spectrum from a circular region within a 3D datacube. The data cube displayed is from Tracy Beck's IFU observations of NGC 4151.

To test out the new 3D visualization features of ds9, you can download a small example of a data cube from IFU observations of NGC 4151 from Tracy Beck’s site. Launch ds9 v7.0 and then go to “Frame > New Frame 3D.” A dialog named “3D” will open that will allow you to change the azimuth and elevation of the visualization (i.e. rotate the data cube). Open the data cube using “File > Open” and it will appear in the display frame. Additionally, a “Cube” dialog will open that will allow you to select a current slice in the 3rd dimension of the data cube (e.g. wavelength). This does not affect the visualization, but you can perform some analysis tasks within this slice.

Another new feature. in the v7.0 release is the “crop” tool, which you can select from the “Edit” menu. Draw a box with this tool to restrict the volume in RA/DEC space, or hold Shift or Cntrl while dragging to instead crop the third dimension. You can perform analysis tasks within the cropped volume. For example, go to “Analysis > Contours” to plot intensity contours on the selected slice in wavelength space, or go to “Edit > Pointer” and then drag out a circular region to generate a 1D spectrum plot from within that cylinder of the volume. You can also use ds9 to send out the data in this selected sub-volume to external packages for any additional analysis.

More new features

Demonstrating the new capability in ds9 to open non-FITS images (e.g. pngs), and the color tagging feature.

In addition to data cubes, ds9 can also now load a host of photo file formats including jpg and png (see image at right). To do so, go to “File > Open Other > Open Photo” and use the option boxes at the bottom of the file dialog to select the image type. You can perform all of the same analyses on photos as on FITS images. In any image loaded in ds9, you can now ‘tag’ pixels of a certain intensity to highlight regions in an image. Just click on the colorbar at the bottom of the ds9 window to tag a certain value. This is only a small sample of all the new features in ds9 v7.0.

What does Bill have in mind for the next versions of ds9? He plans to make a minor, bug-fix release in October or so, and then a new major version in the Spring of 2013. This will probably involve a move to the latest version of the Tcl/Tk language/toolkit (v8.6) that underpins ds9, native widget support for Mac OS/Cocoa, as well as some new features. The most tantalizing feature that Bill mentioned to me is possible integration with Astrometry.net, which would make it possible to fit a WCS solution to any image loaded in ds9 with one click.

Bill emphasized that “feedback is good” – if you have any bug reports of feature requests, don’t hesitate to send him an email.

Advice for young astronomers

I asked Bill what advice he would give to young astronomers interested in software development. It didn’t take him much thought to suggest, “take CS 101.” It’s widely discussed that astronomy students do not necessarily receive any formal education in programming (see e.g. this recent AstroBetter thread), even though most of us spend vast amounts of our time coding. We tend to learn it along the way, picking up the basic skills that are needed to support our data analysis.

Whether or not you’ll ever need to go through the machinations of a professional software developer, Bill says that you will benefit from learning the fundamental principles of data structures, recursion, and other introductory concepts that “make your toolbox bigger.” He says not to worry about which programming language to learn, suggesting instead that students focus on concepts. Whatever you’re using now will be obsolete in 10 years anyway, he says.

Bill also had some comments as a professional software developer in the astronomy sphere. First, he notes that he spends ~70% of his time working on ds9 in “maintenance” mode. Every time a new OS or compiler version comes out, he says, “something breaks.” Given that he spends a lot of time thinking about how to interface with other software and data services (ds9 has many features to download catalog and imaging data from science archives, for example), Bill also advocates for keeping things as simple as possible. If your API is easy to implement, Bill says, more people will use it. He gives the new, XML-based SAMP protocol as an example, which ds9 users can use to interact with other SAMP-aware programs such as Aladin and topcat.

If you’re interested in learning more about 3D data visualization, you may also want to check out other packages including AstroMed, GAIA, and VisIVO. Do you develop or contribute to a software package used by astronomers? Tell us about your software and share your perspective in the comments below.

Download this article as an e-book (epub or mobi format)

The following two tabs change content below.

I am a graduate student in astronomy at Harvard University. I’m particularly interested in how galaxies have changed over time and the chemical evolution history of the universe. I’m currently working with Alicia Soderberg on observations of supernovae and their host galaxies; investigating how massive stars explode and enrich the interstellar medium. I graduated from Michigan State University in May, 2010.

Discussion

3 Responses to “Astronomy software developer Bill Joye on ds9 7.0”

  1. Hello Mr. Sanders,
    I tried to examine 3D visualization features of ds9 and tried to open a fits immage from COMPLETE CO survey: http://www.cfa.harvard.edu/COMPLETE/data/mol_lines/FCRAO/PerA_12coFCRAO_F_map.fits.gz.
    But DS9 7.0 failed to open the unpacked file, it crashes opening the gz-file.
    What I am doing wrong?
    Regards
    Klaus Lang

    Posted by Klaus Lang | June 27, 2012, 4:10 pm
  2. Hi Klaus,

    I’m not sure why you would encounter a crash opening this file. There is a helpdesk for ds9 that you can contact:

    saord @ cfa.harvard.edu

    If you send the details of your installation and the problem, they may be able to help.

    Best,

    ~Nathan

    Posted by Nathan Sanders | June 27, 2012, 4:20 pm
  3. Hi Bill,
    Harvard doesn´t answer.
    I think, something is wrong!
    Regards
    Klaus Lang

    Posted by Klaus Lang | July 3, 2012, 6:13 pm

Leave a Reply

Follow us on Twitter

Like us on Facebook

Astroplots

    http://astrobites.tumblr.com/post/65549158012http://astrobites.tumblr.com/post/62345439779http://astrobites.tumblr.com/post/60939853775http://astrobites.tumblr.com/post/59050954779Visit Astroplots to explore astronomy research through data representation.

Archives

Our sister sites

Enter your email address to subscribe to Astrobites and receive notifications of new posts by email.