GREAT: Data Visualization (Python/Glue)

Goals

  • Visualize GREAT data

  • Pan through 2D image slices using spectral viewer

  • Create and export moment map

  • Create 3D volume rendering using Glue

Introduction

This recipe is a beginner’s introduction to visualizing GREAT datacubes using the jdaviz tool Cubeviz. This is one of several tools in the STScI data analysis tool ecosystem. A video tutorial for the general functionality of the tool cav be found here.

Imports

[1]:
import specutils
import numpy as np
from astropy.io import fits
from astropy.wcs import WCS
from astropy import units as u
from astropy.utils.data import download_file
from IPython.display import Video
import warnings
warnings.simplefilter('ignore')
# <-- uncomment the following lines
# import jdaviz

Ingredients

The data come from the C II Maps in Massive Star Formation Regions from the FEEDBACK survey.

The slice of the data used in this tutorial can be downloaded directly here,

You can download the full Level 4 dataset via the IRSA archive using the program_ID: 07_0077.

[2]:
#load data
f = fits.open('example_data/GREAT/FEEDBACK_RCW120_GREAT_example_subset.fits')
spec = specutils.Spectrum1D(flux=f[0].data*u.K, wcs=WCS(f[0]))
[3]:
# <-- uncomment the following lines
# viz = jdaviz.CubeViz()
# viz.show_inline()
# viz.load_data(spec)

image1

The interface is based on Glue, and so you can change the appearance, range, scale, and variables. You can also plot a smoother version of the spectra, plot available line lists, create moment maps, change units, and export the specrtum.

For moment maps, select plot options and scroll down to Moment Maps, then select where to plot the moment map (“Plot in Viewer”: center), specified Moment (0) and then hit calculate. You can then export the image as a image (png) or data file (fits).

3D Visualization of datacubes using Glue

We can also visualize the datacube using Glue’s easy-to-use GUI and its “3D Volumne Rendering” function. While not to scale in the Z-direction (velocity), it gives us an excellent view of the system as a whole.

We can then display the movie in our Jupyter notebook using the IPython.display.Video function.

[4]:
# <-- uncomment the following line
# Video("example_data/GREAT/rcw_120.mov", width=500)

image2