Visualizing Astronomical Dendrograms


Dendrogram visualization is experimental

You can use Glue to visualize dendrograms created by the astrodendro package.

Enabling Dendrogram Visualization

Because dendrogram visualization is still experimental, you must enable it before using it. To do so, add the following line to your ~/.glue/ file:

from glue.qt.widgets import enable_dendrograms

Building a dendrogram

The details of constructing dendrograms for astronomical images is beyond the scope of this document – see for more information. The following snippet builds a dendrogram from the W5 image used in the tutorial:

from import fits
from astrodendro import Dendrogram

data = fits.getdata('W5.fits')
dg = Dendrogram.compute(data, min_value=500, min_npix=50)

Next, load this file into Glue, choosing “Denrdogram” as a file type. You can now visualize the W5 dendrogram alongside its image:


Linking to Catalog Properties

If you have used astrodendro to compute a catalog of structure properties, you can visualize that in Glue as well. The best way to do this is to save the catalog as a table, load it into Glue, and merge it with the dendrogram dataset. This will supplement the dendrogram with the additional catalog-derived properties.