spacer link to MAST page spacer logo image spacer
link to STScI page

Displaying Multiple MAST Spectra

This tool allows users to display multiple spectra from datasets stored online at MAST. It uses the HTML5 Canvas API for drawing graphics. Canvas is supported by the latest versions of all popular browsers including IE 9 and later, but it is NOT directly supported by IE 6,7 or 8.

COPLOT allows users to enter multiple dataset names in the "File N" form elements where N = 1 through 6. Entries can either be added one per box, or as comma-separated lists in any box. For example to display spectra of 3c 273 from FOS, IUE, and GHRS one could enter y0nb0103t,swp36489,z0gu0109m in the first box or put each dataset name in a separate box.

With Canvas and javascript, most of the plotting options can be run locally on the users computer and therefore can be executed fairly quickly. Reloading the page will redisplay a blank plot. If some options don't get reset, click the Shift key while clicking the Reload button.

COPLOT identifies the mission and file location from the user-provided dataset names (see examples below). Individual entries can be added or removed after the initial plot is displayed, and then click "Start again" to redisplay. Although some missions may be incomplete, online datasets from the following missions are supported:

  • IUE (e.g., swp16877)
  • FUSE (e.g., e9490102000)
  • TUES (e.g., tues5208_2_1)
  • BEFS (e.g., BEFS2002)
  • EUVE (e.g., epsilon_cma__9403080146N)
  • WUPPE (e.g., a0-cas_330110_2)
  • HPOL (e.g., a0-cas_19950917r)
  • HUT (e.g., hut219701)
  • GHRS (e.g., z3280105t)
  • FOS (e.g., y1au0103t)
  • STIS (before May, 2009 only) (e.g., o51301040)
  • COS (e.g., lbq908020)

  • File N - These form elements list the files to be plotted. The dataset names can be listed individually or as comma-separated lists in any "File N" box. After adding or removing dataset name(s), just hit "Start again" and the new list of spectra should be displayed. Note this will rescale the plot and reset all scale factors to 1.0.

  • Zoom - To zoom in on a particular region, click the mouse button and drag it across the desired region. You can drag the mouse right to left or vice versa. As you drag the mouse, a box will be drawn showing the region to be displayed. Releasing the mouse button will display the selected region and the min and max values shown above the plot will be updated. The zoomed-in region will be displayed in histogram mode to more accurately described the digitized data whereas the inital plot is drawn by just connecting points with straight lines. Note zooming with the cursor may not work properly if any part of the plotted data is on the edge or outside the plot window. Slightly increasing the min/max y values will help alleviate the problem. Also, if no points appear, click "Start again" to redraw the original plot.

  • Changing plot limits - Besides zooming, the min and max X and Y axes limits can be specified manually by entering new values in the boxes provided. Unlike zooming with the mouse, one can zoom in or OUT by specifying new limits. To make a change, type in a new value and click return. The new plot range will appear without the page refreshing.

  • Reading Cursor Positions - Moving the mouse across the plot window will display the X any Y positions of the cursor (in data units) just below the plot window.

  • Scaling one plot to another - If more than one observation is plotted, a set of scale factors will appear just above the plot window. Changing the default value of 1.00 to another value and clicking return will scale the flux (y-axis) values for one plot with respect to the other(s). Typically small scale factors should be used so the modified values do not go beyond the plotted flux limits. Setting a scale value to 0.0 will remove that entry from the plot (it can be re-displayed by entering a value > 0).

  • Smoothing - A simple equal-weight moving average filter (similar to the matlab "smooth" function) can be specified for each plotted spectrum, using a odd-valued, user-specified filter width. If even numbers are entered they will be rounded down to be odd. Negative values or filter widths greater than the array size are reset to 1.0 The filter collapses at the ends of the array when there are fewer points available and end points remain unchanged.

    To see how the smoothing compares to the original spectrum, specify the dataset name twice as input. You can see the smoothed values in a different color superimposed on the original values.

  • Multiple Plots - Up to 30 observations can be coplotted however the more data points requested, the more memory is required and the longer it takes to download data from the server to your browser. Tests have shown plotting up to 900,000 data points is possible, but over 1,000,000 points may cause problems.

  • Label Display - By default, the dataset name(s) are displayed in the upper right corner of the plot in the same color as the corresponding spectrum or light curve. The labels can be removed or re-added by clicking the On/Off buttons displayed on the plot page.

  • Changing Selected Files - If you know the file names of observations, it's possible to add or remove them from the plot without returning to the search form. Just change the name or names displayed in the "File N" boxes and click "start again". Files not found will be listed under "Plotted Data Sets".

  • Label Color/Font - The color and font for the X and Y axes can be changed using the various options in the displayed pulldown menu.

  • Plot Color - The color of individual spectra/light curves can be changed using the listed pulldown menus. First select the file name of the spectrum or light curve you want to change, then select a color. The change will appear if either the the data set name or the color is changed and will remain changed until another color is selected or the web page is reloaded. Clicking "start again" does not change the colors, click the shift key & reload instead. Note the color of the displayed data set names will change to match the data.

  • Spectral Line Identification - For spectral plots, spectral line identifications can be overplotted using one of roughly 25 line lists. The line lists in the pulldown menu (which should appear just below the plot) were selected if the wavelength range of the line list overlapped with the plotted spectral region. This narrows down the choices but there may still be cases where no lines appear for a particular line list. If none of the line lists overlap the plotted region, the pulldown menu will be empty (this is currently the case for all EUVE spectra). Clicking the "on" radio button, or choosing a different line library from the pulldown menu, will overplot the selected line IDs. Clicking "off" will remove them.

    In addition to the line lists mentioned above, there are 70 target-specific line lists (all UV-bright AGNs) generated by Danforth et al, to study the intergalactic medium. If the target name in the input file header specifically matches one of these 70 targets, and the wavelength ranges overlap, then the corresponding line library is listed as the default library at the top of the pulldown list.

    See the Line library page for a list of the available line lists, their sources, wavelength range, and number of line IDs. Most are in the UV region, but hopefully we can add more in the future.


  • Clicking "Start again" will replot the data and reset all parameters to their default values. Write down scale factors if you want to save them.
  • For spectra dominated by a few bright emission lines, it may be hard to zoom in on the continuum if it lies close to the minimum flux value. To make it easier to zoom in, first decrease the "Min Flux" value.
  • When plotting multiple spectra, you can use the scale factor to help identify individual spectra. For example, changing a particular scale factor from the default 1.0 to 1.1 will cause that particular spectrum to stand out. Changing individual plot colors also works.
  • To save a plot, either click the "Create png image" button, or do a screen capture of the original page. Note the png image appears to have a black background but it's really transparent and will appear gray when you save it to disk. When printing, no background color will appear.
  • When plotting multiple spectra/light curves, widening the browser window slightly may help organize the scale factor list.

Source of Data

The data available for plotting comes from various sources. The files used for the various MAST missions are as follows:
  • Kepler - Data is extracted from the online (public) FITS light curve files produced by the Kepler project. Bothe the PDCsap and the Sap Flux vectors are plotted by default.
  • K2SFF - Fluxes and times are extracted from the FITS files produced as a K2 High Level Science Product by Andrew Vanderburg at CFA. Both raw and corrected fluxes are displayed, with "bad" points removed.
  • K2VARCAT - Fluxes and times are extracted from the FITS files produced as a K2 High Level Science Product by D. J. Armstrong et al. at the University of Warwick, UK.
  • HST - FITS preview files created at CADC
  • IUE - ASCII preview files created by NSSDC
    Note that small aperture observations will only be displayed when there is no corresponding large aperture observation. If both double aperture exposures are submitted for plottng, the large aperture spectrum is displayed twice.
  • FUSE - ASCII preview files created by MAST(?)
  • TUES - merged ASCII preview files created by MAST
  • BEFS - merged ASCII preview files created by MAST
  • EUVE - FITS "spectral container" files created by MAST
  • WUPPE - FITS "spectral container" files created by MAST
  • HPOL - FITS "spectral container" files created by MAST
  • HUT - FITS "spectral container" files created by MAST
    Note: only the first HUT spectrum is plotted for those cases where two are stored in the same file.