(Updated: 3/3/2001)

Plotting DensePak fiber positions

The following steps assume that the image coordinates are transformed into right ascension and declination. If you want to do it in arcseconds or pixels, you have to change the used programs to fit your coordinate system.

  1. If you haven't done so yet, copy the table of the fiber positions (dp.crd) into the same directory where your image is.

  2. Transform these fiber positions into coordinates of your image. This can be done easily with an awk program. As an example, I use three different DensePak positions with a position angle of 45°. The three positions are (10h 52m 32.5s, 36° 37' 24.0"), (10h 52m 35.0s, 36° 38' 0"), (10h 52m 30.0s, 36° 37' 0"). By running the program dpexample.awk under UNIX by typing
            awk -f dpexample.awk dp.crd > dpexample.crd
         
    the fiber positions in arcseconds (dp.crd) are rotated by 45° and offset to the positions mentioned above. The new positions are saved in the file dpexample.crd, which has six columns (ra, dec for first DensePak, ra, dec for second DensePak, ra, dec for third DensePak).

    Important: You have to edit the program dpexample.awk, so that it fits your coordinates. This means, you have to change the position angle (the number 45 in line 2) and the offsets of the DensePak observations in lines 6-11. If you want to plot only one observation, delete lines 8-11 and replace line 12 by

            printf ("%9.8f %9.7f \n",ra1,dec1)
         

  3. Find the coordinates (in pixels and in world coordinates) of the image section you want to use for the plot (e.g. lower left corner: (504,350) or (10h 52m 22.8s, 36° 35' 29.2"), upper right corner: (1510,1354) or (10h 52m 39.3s, 36° 38' 47.35")).

  4. Copy the file dpexample.igi into the same directory where your image and your table of the transformed fiber positions are.

  5. Adjust the following lines in the file dpexample.igi:

  6. Calculate the proper scaling of your plot by assuming an 8.5x11 inch sheet of paper:
    We use the range .2 to .9 for the x-axis (see line 2 in dpexample.igi). To get the proper scaling for the y-axis, use the equation
            y = (8.5 * 0.7 * number of pixels in y) / (11 * number of pixels in x)
         
    For our example of a 1007x1005 pixels image section, we get y=0.53983, thus a range for the y-axis of .3 to .83983.

  7. Adjust the y range in line 2 in dpexample.igi.

  8. Go to the package stsdas.graphics.stplot in IRAF.

  9. Set the parameter device of the command igi to psi_port.

  10. Create the plot in IRAF by running igi. E.g.:
            st>igi < dpexample.igi
            st>gflush
         
    A postscript file psk....eps will be created in the same directory where the image etc. are.

    !!!We are not done yet!!!

  11. Look at the postscript file (e.g. with ghostview) or make a paper copy of it. Scale the fiber size according to your first plot. E.g.:
    The x-axis is 137.5mm or 3' 18". The fiber diameter is 3". Thus, we need a fiber diameter of
            diameter = (137.5mm * 3") / (3' 18") = 2.1mm
         
    An expanding factor of .6 (line 21 in dpexample.igi) yielded a fiber diameter of 3mm in the plot. Thus, we need an expanding factor of
            expand = (0.6 * 2.1mm) / 3mm = 0.4
         

  12. Correct the expanding factor in line 21 in dpexample.igi.

  13. Create the new plot by running igi again.

  14. The reward will look similar to this:

Now we are done!!!

Special thanks to Dave Andersen for helping me write the program dpexample.igi.