GALEXSpec is an IDL program for examining GALEX spectra. It is not an “official” GALEX product, but I will nevertheless do my best to support and improve the program. As explained in more detail in the GALEX Spectroscopy Primer, the GALEX spectra are a challenge to extract from the raw data, largely because the data are obtained without slits and the overlapping spectra must be disentangled using many rotations of the grism. GALEXSpec is a handy program for stepping through all the spectra obtained in a field and includes tools for assessing how a particular spectrum has been disentangled from its neighbors. You might also find the gallery of GALEX spectra useful.

Main Panel

Figure 1. A screen shot of the main window of the GALEXSpec program showing a z = 0.521 quasar in the CDFS_00 field.

Obtaining the Code

The program is written in IDL and requires IDL 6.0 or later. The code can be downloaded using the links on the left, or, most speedily, using the link immediately below. You need to download the files (currently version v0.4.5 beta):

You will also need the IDL Astronomy User's Library and David Fanning's Coyote Program Library. Both of these libraries are free.

Compiling the Code

Compiling the code is a little tedious since, because I insist on using mixed case file names, the three files must each be compiled twice.

IDL> .compile IDL> .compile IDL> .compile IDL> .compile IDL> .compile IDL> .compile

Box 1. The commands for compiling the three files that comprise GALEXSpec. (Yes, you need to type each command twice).

Using the Program

The extracted 1D spectra are contained in the -xg-gsp.fits files. In addition, the program uses the -ng-pr[c|i].fits and -fg-pr[c|i].fits files (which contain the 2D spectral image strips), the -ng-gsax.fits and -fg-gsax.fits files (which contain additional information about the spectra), and optionally the -nd-int.fits and -nd-int.fits files (which contain the direct images). The program is started using the command RunGALEXSpec. RunGALEXSpec accepts the following keywords:

If you specify paths to the data using some combination of the grismPath, imagePath, and soda keywords, then the program will pop up one (only use grism data with the noStamp flag set) or two (use both grism and imaging data) file selection windows for you to use.

If all goes well, you should eventually see three IDL widget windows open on your display: the main window with lots of buttons, a table with an entry for each spectrum, and a plot window (Figure 1); the image strips window displaying the two-dimensional image strips for both bands (Figure 2); and the postage stamps window showing the direct images of the object (Figure 3).

Image Strips

Figure 2. A screen shot of the image strips window of the GALEXSpec program showing a z = 0.521 quasar in the CDFS_00 field.

Postage Stamps

Figure 3. A screen shot of the postage stamps window of the GALEXSpec program showing a z = 0.521 quasar in the CDFS_00 field.

The "File" menu contains five options:

The "Catalog Lookup" menu allows you to look up an object (by position) in the SDSS or NED databases.

The "About" menu contains a cheat sheet for the keyboard commands.

Buttons, sliders, and so on:

The table widget lists all the extracted spectra in the field (modulu the magnitude and radius limits). The quantities listed in the table are the following:

  1. ID Spec -- the ID of the spectrum.
  2. RA -- right ascension.
  3. Dec -- declination.
  4. FUV -- FUV magnitude from direct imaging.
  5. NUV -- NUV magnitude from direct imaging.
  6. FUV - NUV -- Color from direct imaging.
  7. FUV Quality -- An automatic assessment of the quality of the spectrum. See the GALEX Spectroscopy Primer for details. The quality can be changed using the toggle switches in the Grades area.
  8. NUV Quality -- An automatic assessment of the quality of the spectrum.
  9. Redshift -- the redshift of the object. This will be NaN unless you've measured the redshift.
  10. FUV SNR -- the median FUV signal-to-noise ratio computed using the error spectrum.
  11. NUV SNR -- the median NUV signal-to-noise ratio computed using the error spectrum.
  12. FUV FWHM -- the FWHM of the FUV image of the source (arcseconds).
  13. NUV FWHM -- the FWHM of the NUV image of the soruce (arcseconds).
  14. Radius -- the radius of the source from the field center (degrees).
  15. GGOID -- the GALEX global object ID. A 64 bit number displayed as two 32-bit numbers.
  16. Notable -- a flag to mark interesting objects.
The table can be sorted on any of the sixteen quantities by clicking on the column titles.

The miscellaneous region below the table contains a read out of the coordinates (wavelength in Angstroms and flux in cgs units), a toggle to switch between Flambda and Fnu, a button to overplot the source flux measured in the images, a button to toggle the notability status, and a series of buttons to manually adjust the grade or quality of the spectrum.

Plot Window (Figure 1). By default, the plot window shows the spectrum with the flux axis autoscaled. The spectrum is shown in white with the 1 sigma error spectrum shown in red. The dashed yellow line marks zero flux. You can zoom in by holding down the left mouse button and drawing a box to mark the desired axis ranges. A spectral feature can be marked (and thus the redshift calculated) using the right mouse button. All features in the features database will be marked and labelled in green.

The plot window contains a few keyboard shortcuts:

Background Plot

Figure 4. The background panels (NUV top, FUV bottom) show the uncalibrated source flux (white) and the background (red).

Profile Plot

Figure 5. The profile panels show the spatial profiles (i.e, a cut along the spatial direction) for the short (blue), middle (green), and long (red) wavelength sections of the FUV (left) and NUV (right) spectra. The yellow lines mark the regions from which the background is extracted.

Image Strips (Figure 2). The image strips window shows the NUV (top) and FUV (bottom) 2D image strips. Since there is no order blocking filters, multiple orders are often visible. The wavelengths for the 1st, 2nd, and 3rd orders are labelled in red, green, and blue, respectively. By default, the strips are displayed with histogram equalization. However, a linear stretch can be applied by left-clicking in either window and dragging. Pressing "h" will return to histogram equalivation.

Postage Stamps (Figure 3). The postage stamp windows show the images of the objects with a linear stretch. The stretch can be adjusted by left-clicking and dragging. Pressing "h" will switch to histogram equalivation.


The program has crashed, leaving abandoned widgets and huge memory leaks. What do I do?

IDL> retall IDL> widget_control, /reset IDL> heap_gc

Box 2. If the program crashes, which, alas, it will, these three IDL commands will be your friends.

What do the FUV and NUV quality numbers mean?

The quality numbers are explained in detail in the GALEX Spectroscopy Primer, but the gist is: 0 = hopeless, 1 = a significant background issue is marring the spectrum, 2 = okay.

What do the numbers in yellow in the upper right of the background panels mean?

The little yellow numbers are a measure of the ratio of the large scale (low frequency) background fluctuations to the small scall (high frequency) background fluctuations. Spectra are automatically flagged as having background issues if this number is greater than 1.5 for NUV and 1.3 for FUV.


Please let me know if you have any comments, questions, or suggestions.