saodisplay primer

QUESTIONS

  • 1. How do I look at a FITS file?
  • 2. How do I set up saodisplay?
  • 3. How does it work within tcl?
  • 4. What other verbs are available?
  • 5. Can I draw on the screen?
  • 6. How do I blink between two images?
  • ANSWERS

    1. How do I look at a FITS file? The display program SAOImage is included in the standard software distribution. It is based on: Smithsonian Astrophysical Observatory image utility release 1.06 14 August 1991 2. How do I set up saodisplay? The product is set up automatically when you setup dervish. The files are in $FSAO_DIR. Read the manual page with: % man saoimage 3. How does it work within tcl? The basic display of an image was described in the dervish.primer document: % dervish Executing commands in /usr/products/IRIX/dervish/v2_1/etc/dervishStartup.tcl: dervish> regNew h0 dervish> regReadAsFits h0 $INT_DIR/fits/m51.fits h0 dervish> saoDisplay h0 Spawning Fermi SAOimage 1 Your first move could be to set the scaling with the "histeq" algorithm. Click the "histeq" box to show the structure in this image. You can also get it to come up in "histeq" mode with a switch: dervish> saoDisplay h0 -histeq 4. What other verbs are available? Go through the xmosaic documentation to find them: % xmosaic & From the home page, scroll down a bit and choose "Tcl Extensions for displaying/interacting with images." In there you will find descriptions for the following commands: saoDisplay we already know about. saoListRegion tells us which sao windows are active. mouseDefine can define a mouse event to be a tcl verb. mouseList tells you what has been defined for mouse actions. The dervishStartup.tcl script defines the following for you: dervish> mouseList SAOimage mouse button Associated TCL command ------------------------------------------------------------------- POINT_CL_L regPixGetArray 5 5 POINT_CL_M xsectionPlot C POINT_CL_R xsectionPlot R To try these, click on the button that gets you in "cursor" mode. Then, holding the "control" button down, clicking in the picture with the left button (POINT_CL_L) runs the command regPixGetArray, which prints out the pixel values around the selected pixels, along with summary statatistical information. You may redefine these commands: dervish> mouseDefine POINT_CL_L echo Will echo the region name, x, and y location when the control button is held down while clicking the left mouse button. This echoes the position information in the upper left corner of the display. mouseList tells you what commands have been defined. 5. Can I draw on the screen? The verbs saoDrawCircle and saoDrawBox put these figures on the screen. Type the command name only to get a short list of what parameters you need. 6. How do I blink between two images? There are two images that are very similar, good.fit and dithered.fit. dithered.fit was created by "dithering" good.fit. As a test of this dithering operation, we want to overlay the two images, and blink between them. First, read the two images in. dervish> regReadAsFits [regNew] $INT_DIR/fits/good.fit h1 dervish> regReadAsFits [regNew] $INT_DIR/fits/dithered.fit h2 Note that if you already have other images read in the actual handle names, h1 and h2 might be different. For simplicity, "quit" all saoDisplay windows you may have on the screen. Use the "QUIT" button. You may need to use to "etc" button to get to the set of buttons with "QUIT". Now display the first image, good.fit: dervish> saoDisplay h1 Spawning Fermi SAOimage 2 Click the "histeq" button to bring out detail. Now we want to 'store' this image in one of the mouse buttons. Click with the left mouse button on the "blink" button. Note that this must be done while you are in the "Scale" mode. Now we want to display the second image, called dithered.fit, on the same window. Check the title at the top of the Xwindow. It should say "Fermi SAOimage 1". Display the second image in the same window by using the window number (1) in the command: dervish> saoDisplay h2 1 There is not a dramatic change. Make sure you are still in "Scale" mode. Now hold down the left mouse button. Notice that the backround sky darkens slightly as the "good.fit" image we stored in the left button is displayed. Release the left mouse button to show dithered.fit. If you change the scale to "linear" it changes the scale for the active image (dithered.fit) but NOT for the stored image (good.fit). Click on the "linear" button, and then hold down the left mouse button in the picture to display the stored image.