GNU Astronomy Utilities

2.5.1 Viewing spectra and redshifted lines

In Detecting lines and extracting spectra in 3D data we downloaded a small crop from the Pilot-WINGS survey of Abell 370 cluster; observed with MUSE. In this section, we will review how you can visualize/inspect a datacube using that example. With the first command below, we’ll open DS9 such that each 2D slice of the cube (at a fixed wavelength) is seen as a single image. If you move the slider in the “Cube” window (that also opens), you can view the same field at different wavelengths. We are ending the first command with a ‘&’ so you can continue viewing DS9 while using the command-line (press one extra ENTER to see the prompt). With the second command, you can see that the spacing between each slice is \(1.25\times10^{-10}\) meters (or 1.25 Angstroms).

$ astscript-fits-view a370-crop.fits -h1 --ds9scale="limits -5 20" &

$ astfits a370-crop.fits --pixelscale
Basic information for --pixelscale (remove info with '--quiet' or '-q')
  Input: a370-crop.fits (hdu 1) has 3 dimensions.
  Pixel scale in each FITS dimension:
    1: 5.55556e-05 (deg/pixel) = 0.2 (arcsec/pixel)
    2: 5.55556e-05 (deg/pixel) = 0.2 (arcsec/pixel)
    3: 1.25e-10 (m/slice)
  Pixel area (on each 2D slice) :
    3.08642e-09 (deg^2) = 0.04 (arcsec^2)
  Voxel volume:
    3.85802e-19 (deg^2*m) = 5e-12 (arcsec^2*m) = 0.05 (arcsec^2*A)

In the DS9 “Cube” window, you will see two numbers on the two sides of the scroller. The left number is the wavelength in meters (WCS coordinate in 3rd dimension) and the right number is the slice number (slice number or array coordinates in 3rd dimension). You can manually edit any of these numbers and press ENTER to go to that slice in any coordinate system. If you want to go one-by-one, simply press the “Next” button. The first few slides are very noisy, but in the rest the noise level decreases and the galaxies are more obvious.

As you slide between the different wavelengths, you see that the noise-level is not constant and in some slices, the sky noise is very strong (for example, go to slice 3201 and press the “Next” button). We will discuss these issues below (in Sky lines in optical IFUs). To view the spectra of a region in DS9 take the following steps:

  1. Click somewhere on the image (to make sure DS9 receives your keyboard inputs), then press Ctrl+R to activate regions and click on the brightest galaxy of this cube (center-right, at RA, Dec of 39.9659175 and -1.5893075).
  2. A thin green circle will show up; this is called a “region” in DS9.
  3. Double-click on the region, and you will see a “Circle” window.
  4. Within the “Circle” window, click on the “Analysis” menu and select “Plot 3D”.
  5. A second “Circle” window will open that shows the spectra within your selected region. This is just the sum of values on each slice within the region.
  6. Don’t close the second “circle” window (that shows the spectrum). Click and hold the region in DS9, and move it to other objects within the cube. You will see that the spectrum changes as you move the region, and you can see that different objects have very different spectra. You can even see the spectra of only one part of a galaxy, not the whole galaxy.
  7. Take the region back to the first (brightest) galaxy that we originally started with.
  8. Slide over different wavelengths in the “Cube” window, you will see the light-blue line moving through the spectrum as you slide to different wavelengths. This line shows the wavelength of the displayed image in the main window over the spectra.
  9. The strongest emission line in this galaxy appears to be around 8500 Angstroms or \(8.5\times10^{-7}\) meters. From the position of the Balmer break (blue-ward of 5000 Angstroms for this galaxy), the strong seems to be H-alpha.
  10. To confirm that this is H-alpha, you can select the “Edit” menu in the spectrum window and select “Zoom”.
  11. Double-click and hold (for next step also) somewhere before the strongest line and slightly above the continuum (for example at 8E-07 in the horizontal and \(60\times10^{-20}\)erg/Angstrom/cm\(^2\)/s on the vertical). As you move your cursor (while holding), you will see a rectangular box getting created.
  12. Move the bottom-left corner of the box to somewhere after the strongest line and below the continuum. For example at 9E-07 and \(20\times10^{-20}\)erg/Angstrom/cm\(^2\)/s.
  13. Once you remove your finger from the mouse/touchpad, it will zoom-in to that part of the spectrum.
  14. To zoom out to the full spectrum, just press the right mouse button over the spectra (or tap with two fingers on a touchpad).
  15. Select that zoom-box again to see the brightest line much more clearly. You can also see the two lines of the Nitrogen II doublet that sandwich H-alpha. Beside its relative position to the Balmer break, this is further evidence that the strongest line is H-alpha.
  16. Let’s have a look at the galaxy in its best glory: right over the H-alpha line: Move the wavelength slider accurately (by pressing the “Previous” or “Next” buttons) such that the blue line falls in the middle of the H-alpha line. We see that the wavelength at this slice is 8.56593e-07 meters or 8565.93 Angstroms. Please compare the image of the galaxy at this wavelength with the wavelengths before (by pressing “Next” or “Previous”). You will also see that it is much more extended and brighter than other wavelengths! H-alpha shows the un-obscured star formation of the galaxy!

Automaticly going to next slice: When you want to get a general feeling of the cube, pressing the “Next” button many times is annoying and slow. To automatically shift between the slices, you can press the “Play” button in the DS9 “Cube” window. You can adjust the time it stays on each slice by clicking on the “Interval” menu and selecting lower values.

Knowing that this is H-alpha at 8565.93 Angstroms, you can get the redshift of the galaxy with the first command below and the location of all other expected lines in Gnuastro’s spectral line database with the second command. Because there are many lines in the second command (more than 200!), with the third command, we’ll only limit it to the Balmer series (that start with H-) using grep. The output of the second command prints the metadata on the top (that is not shown any more in the third command due to the grep call). To be complete, the first column is the observed wavelength of the given line in the given redshift and the second column is the name of the line.

# Redshift where H-alpha falls on 8565.93.
$ astcosmiccal --obsline=H-alpha,8565.93 --usedredshift

# Wavelength of all lines in Gnuastro's database at this redshift
$ astcosmiccal --obsline=H-alpha,8565.93 --listlinesatz

# Only the Balmer series (Lines starting with 'H-'; given to Grep).
$ astcosmiccal --obsline=H-alpha,8565.93 --listlinesatz | grep H-
4812.13             H-19
4818.29             H-18
4825.61             H-17
4834.36             H-16
4844.95             H-15
4857.96             H-14
4874.18             H-13
4894.79             H-12
4921.52             H-11
4957.1              H-10
5006.03             H-9
5076.09             H-8
5181.83             H-epsilon
5353.68             H-delta
5665.27             H-gamma
6345.11             H-beta
8565.93             H-alpha
4758.84             H-limit

Zoom-out to the full spectrum and move the displayed slice to the location of the first emission line that is blue-ward (at shorter wavelengths) of H-alpha (at around 6300 Angstroms) and follow the previous steps to confirm that you are on its center. You will see that it falls exactly on \(6.34468\times10^{-7}\) m or 6344.68 Angstroms. Now, have a look at the Balmer lines above. You have found the H-beta line!

The rest of the Balmer series that you see in the list above (like H-gamma, H-delta and H-epsilon) are visible only as absorption lines. Please check their location by moving the blue line on the wavelengths above and confirm the spectral absorption lines with the ones above. The Balmer break is caused by the fact that these stronger Balmer absorption lines become too close to each other.

Looking back at the full spectrum, you can also confirm that the only other relatively strong emission line in this galaxy, that is on the blue side of the spectrum is the weakest OII line that is approximately located at 4864 Angstroms in the observed spectra of this galaxy. The numbers after the various OII emission lines show their rest-frame wavelengths (“OII” can correspond to many electron transitions, so we should be clear about which one we are talking about).

$ astcosmiccal --obsline=H-alpha,8565.93 --listlinesatz | grep O-II-
4863.3              O-II-3726
4866.93             O-II-3728
5634.82             O-II-4317
5762.42             O-II-4414
9554.21             O-II-7319
9568.22             O-II-7330

Please stop here and spend some time on doing the exercise above on other galaxies in the this cube to get a feeling of types of galaxy spectral features (and later on the full/large cube). You will notice that only star-forming galaxies have such strong emission lines! If you enjoy it, go get the full non-cropped cube and investigate the spectra, redshifts and emission/absorption lines of many more galaxies.

But going into those higher-level details of the physical meaning of the spectra (as intriguing as they are!) is beyond the scope of this tutorial. So we have to stop at this stage unfortunately. Now that you have a relatively good feeling of this small cube, let’s start doing some analysis to extract the spectra of the objects in this cube.