(Updated: 4/5/2001)

Plotting DensePak/Hydra spectra

This page will describe in detail how to plot spectra of a single DensePak field. If you want to plot Hydra spectra, please read the note at the bottom of the page first.

  1. Create a fits file out of your multispec DensePak file (eg. dp.fits).

  2. There are two ways of plotting your spectra - with an automatically adjusted intensity scale for each fiber or with a fixed intensity scale for all the fibers. Copy the corresponding IDL program into the same directory where your fits file is.
    fibers2.pro (automatically adjusted intensity scale)
    fibers3.pro (fixed intensity scale)

  3. Copy the table fibers2.crd into the same directory where your fits file is.

  4. Start IDL (in the same directory where your DensePak data are) by typing idl under UNIX.

  5. Create a rectangular graphic window by typing
            IDL>window,xsize=600,ysize=900
         

  6. Start the program by typing fibers2 or fibers3, respectively. The program prompts you for the name of the data file, the starting and ending wavelength of the region you want to plot, (in case of a fixed intensity scale, i.e. fibers3.pro) the minimum and maximum intensity value, and a title for the plot. E.g.:
            IDL>fibers3
            Enter fits-image name: dp.fits
            Enter starting wavelength of region: 6570
            Enter ending wavelength of region: 6580
            Enter minimum intensity: -15
            Enter maximum intensity: 500
            Enter plot title: NGC3432 - field 1
         

  7. Your plot will look similar to one of these:

    automatically adjusted intensity scale (fibers2.pro):

    fixed intensity scale (fibers3.pro):

    Note: The background will be white and the axes black when printed onto paper.

  8. To make a postscript file of your plot (e.g. n3432.ps), type the following commands in IDL:
            IDL>set_plot,'ps'
            IDL>device,file='n3432.ps',xsize=7,ysize=10.5,xoffset=0.5,$
            IDL>yoffset=0.5,/inches
            IDL>fibers3
            Enter fits-image name: dp.fits
            Enter starting wavelength of region: 6570
            Enter ending wavelength of region: 6580
            Enter minimum intensity: -15
            Enter maximum intensity: 500
            Enter plot title: NGC3432 - field 1
            IDL>device,/close
            IDL>set_plot,'x'
         
    i.e. you have to run the program again to write the plot into the postscript file. You can change the size and position of the plot on your paper by changing the numbers in xsize=7,ysize=10.5,xoffset=0.5,yoffset=0.5 above.

    Note: If you want to stretch the x-axis and plot in landscape format to be able to see more details, you can do so by using e.g.

            IDL>device,file='n3432l.ps',xsize=10.5,ysize=7,xoffset=0.5,$
            IDL>yoffset=11,/inches,/landscape
         
    as your postscript device. IDL is a little screwy here, as it still relates the xsize of the ps-file to the abcissa of your plot and the ysize of the ps-file to the ordinate of your plot. The zero point for the offsets, however, has been rotated 90 degrees with the sheet of paper, i.e. the yoffset counts along the x-axis (into the opposite direction) and the xoffset counts along the y-axis. This is why you would need something like xoffset=0.5,yoffset=11 to print in landscape format.

  9. To exit IDL, type exit.
Note: It is possible to modify the programs fibers2.pro or fibers3.pro to plot several DensePak fields in one graph or to plot Hydra spectra. To be able to do so, you have to change the size of your graphic window and the size of your postscript file accordingly. You also have to change the position of the plots and their axis ranges in the program fibers2.pro/fibers3.pro. For Hydra data, the size of the fiber field may be too big to plot properly scaled fiber plots within the plot, i.e. you may want to increase the size of the fiber plots in Hydra field plots (fibers2.pro and fibers3.pro create fiber plots of 3" in size). I personally have not created any multi DensePak field spectra plot or Hydra spectra plot yet.
There are many possible fiber setups and therefore many plotting possibilities. It is impossible to cover them all with instructions on how to plot them. But I hope that this step by step guide for plotting a single DensePak field will help you to create the plots you need for your data.