The best way to learn how Vista works is to fire it up and play with it. A few general comments: "q" on the command line is how Vista is terminated (or ^C if you must) "e" in the display window is how you get out of a video-interactive routine such as "ITV" or "PSF" "?" in the display will give you a menu during a video-interactive routine If you want to know about Vista, you can read "Out_of_date.manual", which will give you a sense of how Vista works. Beware that it's really, really out of date, however. The file "Examples" gives some one-liners of typical things that get typed all the time. If you understand what is going on in all of these you are a Vista master. The only 98% authoritative documentation is in the headers of the source files, because I've made some effort to keep them up to date. So if you want to know how "ABX" works, for example, you would need to figure out that the "ABX" comes from the analbox.f77 source file, and then you could find out all the options from the head of that file. It's not as bad as it sounds. Looking at "Examples" you might think that the command called "ABX" sounds like it might be interesting. Essentially all the accessible code is in files called ansi/*.f77, so if you type "grep -i abx *.f77" there you will quickly home in on what you want to know. The variable, string variable, and branching constructs in Vista are very useful but have a sometimes surprising syntax. I have no idea what the state of documentation is; I normally rely on old scripts. For quick look display and star analysis, there are four Vista commands you might want to know about: "rd", "tv", "psf", and "q". The "q" command causes Vista to terminate. Following are some words from 1994 about how they work. *** rd *** Synopsis and quick use: ---------------------------------- The "rd" command reads a FITS file into a Vista "buffer". There are 32 buffers, distinguished by the numbers 1-32. This example uses buffer 1, but there is no reason to prefer one over another, and buffers remain intact until overwritten. The second argument is the filename. Vista uses the usual pathnames from UNIX, so a filename of "m0493.235" would have been adequate if we had started Vista in the "/p1/visitor/night2" directory. (NOTE: A filename without a decimal decimal point, "." will lead Vista to append ".fits": "filename.fits") The routine can distinquish different types of FITS files (short integer, floating point, long integer), but it can't always distinguish signed from unsigned short integers. Many CCDs provide 16 bits of data which normally shows up in an unsigned 16-bit FITS image. Thus "rd" needs to know what sort of FITS file you have if you are reading a 16-bit FITS image. The keywords are "short" or "unsigned" according to whether the 16-th bit is a sign or a data bit; use these keywords as a third argument to "rd". Once you have made a specification Vista will continue to use that choice until you read a 16-bit FITS file of the other type, so you need only type "unsigned" once. Vista tries to make a reasonable choice, so chances are that you don't need this keyword at all. (NOTE: If you see lots of negative numbers in a FITS image or lots of numbers near 65000, you probably used the wrong choice of "short" or "unsigned". Reread the image with the other choice.) *** tv *** Synopsis and quick use: ---------------------------------- The "tv" command has many options, but you need only know a few in order to display images effectively. The arguments to "tv" are (a) buffer number (where you read your image), (b) threshold, (c) saturation, and (d) other options. Arguments (b) and (c) may appear in any order because Vista takes the smaller value for the threshold and the larger for the saturation. Suppose we discover that the mean pixel value in buffer 5 is 2809.733. Then we might choose a "tv" threshold of 2700 and a saturation of 3000 as follows: tv 5 2700 3000. For a color map which ranges from white to black (the default), the resulting image would be white where the pixels have values of 2700 or less and black where they have values of 3000 or more; intermediate values would be displayed as linearly increasing depths of gray. Vista will automatically determine threshold and saturation values if none is given on the command line. If only one number is given following the buffer number, it will be taken as the saturation, and the threshold will be set to zero. Simple examples: ---------------- Some of the options to the "tv" command which you might want to explore include: tv 1 --- Autoscale and display. tv 1 300. 2700. noresize --- Display the image and turn off the automatic resizing of the image display window, so it won't change from the size you like. tv 1 300 2700. cf=jt --- Display the image with a rainbow color scheme. tv 1 300. 2700 cf=bw --- Display with a normal B/W color scheme. color cf=jt --- Switches to the rainbow color scheme. color inv --- Invert the color scheme. tv 1 1e4 2500. sqrt --- Display with a square root mapping of data to colors for pixel values between 2500 (low) and 10000 (high). tv 1 10000 2e3 log --- Display with a log mapping of data to color. tv 1 old --- Display with the same threshold, saturation and mapping as used last time. tv 1 3e4 sqrt --- Display with a square root mapping from a saturation of 30000 to a threshold of 0. tv 1 old flip --- Display the image flipped left-right (using the old threshold, saturation, mapping). --- Zoom out ("pan") centered on the position of the mouse. --- Keep zoom but center on position. --- Zoom in centered on position. "@" struck in image --- Restore usual zoom and centering. "#" struck in image --- Zoom way in and display data values. "[" struck in image --- Display previous image. The current image has a special status and old ones are "zombies" which cannot be zoomed, etc, but this can be used to blink up to N (4) images. "]" struck in image --- Display subsequent image "$" struck in image --- Choose sampling/averaging for zoom out --- Continuous zoomed in display. "4" struck in zoom window--- Display four zombie images in zoom window "n" struck in zoom window--- Display N zombie images in zoom window "1" struck in zoom window--- Display just corrent image in zoom window --- Shrink zoomed pixels --- Enlarge zoomed pixels --- Change the color stretch --- Change the color threshold *** psf *** Synopsis and quick use: ----------------------------------- The "psf" command (a.k.a. "fondle" when non-PC) is used to find out about star-like images: their size, shape, and flux, and it also has some plotting options. Psf puts Vista in "input" mode, as indicated by the little status light by the (x,y,z) display of the image. In this mode Vista responds to mouse or keyboard events in the display window, but not to commands typed at the interpreter. In order to get back to the interpreter type the letter "e" in the image window. In general, typing "?" at the image window will list the options available in this mode. In the example, psf is told to use "scale=0.275", i.e. the plate scale for Charlotte at the 2.4-m, for reporting image widths. Psf will keep this scale until you explicitly change it either by restarting psf with a different "scale=" argument, or by using the "p" window option. When you put the cursor on a star (reasonably near is OK) and type "x", psf will report the position of the star (in pixels), the peak intensity (in ADU), the fwhm (in scale*pixels = arcsec), the total flux within the aperture radius (in units of 1e5 ADU), the sky level near the star (in ADU), and the dimensions of the psf. Psf fits a 2-dimensional Gaussian to the core of the star image (after determining the sky value), and these dimensions and angle refer to the major and minor fwhm dimensions of the Gaussian fit, along with the azimuth of the major axis CCW from the x axis. If the Gaussian is so round that this azimuth is poorly determined, psf will report it as 0. If you hit the "g" key you will enable plots of star's profiles when the psf calculation takes place. If you would like to see a cut through a piece of your image, place the cursor and hit the letter "l" at each of the two endpoints of the segment you desire. Examples: --------- >>psf scale=0.275 "/pix=0.275 (") (1.0E+05) (") (") x y Peak fwhm flux sky maj x min phi (Move to a star and hit "x":) 815.4 160.2 14387 1.16 3.096 2794.9 1.16 x 1.16 0 (Hit "g") (Move to a star and hit "x":) 183.4 475.0 5578 1.12 0.753 2775.9 1.17 x 1.07 159 (You should see a plot of the star's profile as well as this information) (Move to a star and hit "x":) 632.6 826.3 3890 1.22 0.358 2829.9 1.26 x 1.17 147 (Place the cursor and hit "l", move it and hit "l" again to plot a cut) (When you want to get back to Vista, hit "e" when the cursor is in the image window.) What's PSF up to? ----------------- Psf was designed to help in the difficult task of determining the total flux from a star. When you hit "x", psf goes through the following chores: 1. Find the nearest peak. 2. Assemble average and median fluxes as a function of radius from the star. 3. Estimate a value for the local sky and the fwhm of the peak. 4. Determine a better value for the sky by fitting the median profile with a 1/r**3 profile for the skirts of the star plus a constant sky. 5. Add up the flux of the star using this sky value. The pixels closer to the star than a radius of 10 are added directly; exterior to this radius the star's flux is estimated as the median profile times the number of pixels (which confers substantial immunity to neighboring stars). 6. Perform a 2-D Gaussian fit to the image to derive a better fwhm. Psf computes three estimates of the flux of a star. The first is the straight sum of the pixels with the fit sky subtracted. This is obviously subject to contamination by neighbors. The latter two are based on the sum/median profile, the first having the fit sky subtracted and the second having the median sky estimate subtracted. Obviously the first will suffer if the fit to the sky is poor and the second will have problems if the background has curvature (for example near a large galaxy). In the course of this work psf has garnered a pretty good idea of what the star's profile looks like, which it reports to you during some of its modes. Since psf is designed to work in "input" mode, it seemed like a good idea to add a number of line graphics options to enable you to visualize your data. Summary of Command Keys ----------------------- X Center on star, report info H Make hardcopy of current plot R Same as X, remember profile Z Reset stats F Same as X, scale to saved profile - Remove last stat C Ctr on cursor, sum (pixels-sky) ? Help S Ctr on cursor, add ave to sky stats E Quit V Cycle through flux modes: psf info / brief flux stats / verbose info on radial profile G Cycle through plot style executed with "X", "C", etc: no plot / radial profile / 3-D plot or contour / aperture flux l-l Draw a cut between cursor positions (rectilinear if L-L) A Set flux aperture (def r=20) U Set flux scale factor (def 1E5) P Set plate scale (def 1.0) W Set width averaged for cut line (def 1) M Toggle mesh (3-D) vs contour plots (def 3-D) I Toggle interactive plotting (def no) D Toggle dumping to fort.13 (def no) N Toggle reset of stats when psf is invoked (def yes) O Toggle drawing of circular outline (def yes) Statistics ---------- Psf has three levels of detail in its report of a star's flux. The "v" key cycles through the three levels of verbosity, from least to greatest. The most terse mode gives you a fit position, net flux estimate (after sky subtraction) and sky value, and information on the psf dimensions from the 2-dimensional Gaussian fit. The next mode accessed by "v" dispenses with the psf information and tells you about flux and sky statistics being accumulated. The last level of verbosity gives you a listing of the radial profile of the accumulating flux. In all cases, any peak brightness listed is the actual brightness, but any flux listing has had a sky value subtracted from the pixels summed up. In the first two modes, the flux listed is that found within a circular aperture whose radius may be specified with the "a" key or as a "rad=aperture_radius" keyword when psf is invoked. The circle drawn on your image shows this aperture box. The flux is reported in a scaled form; you may change this scale factor with the "u" (units) key. There are five ways to ask for flux information. The first, invoked with the "x" key, finds the nearest peak and does the full analysis of star profile, sky value, etc. Almost identical is the "r" key, which differs only in that it "remembers" the profile of that star as a fiducial profile. If you use the "f" key psf will not try to follow the profile in detail, but will try to fit the star as a multiple of the current fiducial profile. This is intended to help dig information out of faint images. If for some reason you do not want psf to center on a star or do a fit, the "c" key will simply add up the flux in the aperture radius centered on the cursor position and report it (minus the current average sky value). Psf maintains statistics on the fluxes it encounters and the sky values. If you want to add to the sky statistics, you may use the "s" key to add up the flux in the aperture centered on the cursor. In some instances (such as a focus frame) there will be many images of the same star, and you might want to stomp around the image with "s" to establish a sky value, and then cookie-cut the star images with "c". In other cases (such as stars near a large galaxy) the different flux and sky values will have nothing to do with another, so the accumulating statistics will be worthless. If you want to reset the statistics (done by default when psf is invoked, unless the "n" key has been used), you may use the "z" key. If you want to remove the last statistic, the "-" key is provided. If you are familiar with Vista's photometry facility ("save phot", "print phot", etc), you will want to know that psf saves the star information, and that you can reset the accumulation with the keyword "new". Another tidbit for Vista aficionados is that psf does not treat zero pixels as special in any way. Line Graphics Plotting ---------------------- Psf offers a number of line graphics options, and it's assumed that you have Mongo set up properly with a terminal window (and possibly a laser printer). For example, if you want a cut plotted from your image you can place the cursor at a spot in the image, hit the "l" key, place the cursor at another point and again hit the "l" key. Psf will plot a cut extracted from your image. The default is a cut of a single pixel width, but you may use the "w" key to specify a width across the cut for averaging. If you want precisely the cut indicated by the cursor position use the lower case "l" key. If you prefer to have your cut straightened to the nearest vertical or horizontal, use the upper case "L" key. You may accompany the psf analysis of star images with plots of the stellar profile. This will happen automatically when you hit "x" (for example) if you have turned on this graphing by hitting the "g" key which cycles through four plotting modes. There are three sorts of plots: radial profile, 3-D mesh plot or contour plot, and cumulative flux plot. "g" "g" "g" "g" No plotting => Radial profile => 3-D plot => Cumulative flux => No plotting \= "m" =\ Contour plot The radial profile plot shows the pixels near the central one, plotted as flux versus radius, and the Gaussian fit is drawn as well. If the Gaussian fitting routine has detected non-zero ellipticity, the major and minor axis profiles are both shown. The 3-D plotting mode depicts a patch of the image as a mesh plot. If you prefer to see two-dimensional data presented as a contour plot, you may switch between 3-D and contour mode by hitting the "m" (mesh) key. Note that using the "c" key instead of the "x" key will center the plot where you placed the cursor as opposed to using the nearest peak as a center. The last variety of plot has two panels. The left panel is intended to illustrate how accurately psf has succeeded in determining the local sky value, and the right panel shows how well the total flux from a star converges as a function of aperture size. The points in the left hand plot are the average star and median star brightness as a function of radius. The curve is a very crude fit to the profile, unless you have used the "f" key to obtain star information, in which case it is a scaled version of your fiducial star profile. The right panel plots a variety of quantities as a function of radius; it's best to use "verbose" mode in trying to decipher which is which. You will see the cumulative flux determined as a straight sum of flux less the sky contribution, the cumulative flux determined as a median less a fitted sky value, multiplied by the number of pixels in an annulus, and the median cumulative flux less a median sky value from a large radius. Lastly the flux in each annulus is shown as a histogram. These plots are intended to be sobering reminders of how difficult it is to determine a good sky level and a total flux for a star. If you want to mess around with a plot, you may enter interactive Mongo after one of these plots by using the "i" key to toggle interactive mode. You will be presented with the Mongo prompt "*" in the Vista window, and typing "end" at Mongo will return you to psf. Should you desire a hardcopy of a plot which has appeared on the terminal, you may hit the "h" key which requests Mongo to redraw the last plot on the laser printer. Odds and Ends ------------- Hitting "o" toggles the drawing of circles around the star which psf is working on. You may use "d" to have psf dump results to a file called "fort.13". Like "o", "d" is a toggle, and their defaults are "on" and "off" respectively. The "n" key is used to toggle between a mode where the statistics are reset upon entering psf (the default) and a mode where you have to reset the statistics explicitly. This might be useful if you had several images of a single star and you wanted to average together statistics.