EXAMPLES · TIME_REQUIREMENTS · BUGS · SEE_ALSO
pstselect -- select candidate psf stars from a photometry file
pstselect image photfile pstfile maxnpsf
- The list of images containing the candidate psf stars.
- The list of input photometry files. The number of photometry files must be equal to the number of input images. If photfile is "default", "dir$default", or a directory specification PSTSELECT searches for a file called dir$image.mag.# where # is the highest available version number for the file. Photfile is normally the output of the PHOT task but may also be the output of the PSF, PEAK, NSTAR and ALLSTAR tasks. Photfile may be a text file or an STSDAS binary table.
- The list of output psf star photometry files. There must be one output psf star photometry file for every input image. If pstfile is "default", "dir$default", or a directory specification then PSTSELECT writes a file called dir$image.pst.# where # is the next available version number. Pstfile inherits its file type, it may be either an APPHOT/DAOPHOT text or STSDAS binary file, from photfile.
- maxnpsf = 25
- The maximum number of candidate psf stars to be selected.
- mkstars = no
- Mark the selected or deleted psf stars on the image display ?
- plotfile = ""
- The name of the output file containing mesh, contour, or profile plots of the selected PSF stars. If plotfile is undefined no plot file is created; otherwise a mesh, contour, or profile plot is written to this file for each PSF star selected. Plotfile is opened in append mode and may become very large.
- datapars = ""
- The name of the file containing the data dependent parameters. The parameter scale is located here. If datapars is undefined then the default parameter set in uparm directory is used.
- daopars = ""
- The name of the file containing the daophot fitting parameters. The parameters psfrad and fitrad are located here. If daopars is undefined then the default parameter set in uparm directory is used.
- interactive = no
- Select the psf stars interactively ? If interactive = yes and icommands is undefined, PSTSELECT reads in the star list from photfile , sorts the stars by magnitude and waits for commands from the user. If interactive = no and icommands="", PSTSELECT selects candidate PSF stars from photfile automatically. If icommands is not undefined then interactive is automatically set to "no", and commands are read from the image cursor command file.
- plottype = "mesh"
- The default plot type displayed when a psf star is selected interactively. The choices are "mesh", "contour", or "radial".
- icommands = ""
- The image display cursor or image cursor command file.
- gcommands = ""
- The graphics cursor or graphics cursor command file.
- wcsin = ")_.wcsin", wcsout = ")_.wcsout"
- The coordinate system of the input coordinates read from photfile
of the output coordinates written to pstfile
respectively. The image
header coordinate system is used to transform from the input coordinate
system to the "logical" pixel coordinate system used internally,
and from the internal "logical" pixel coordinate system to the output
coordinate system. The input coordinate system options are "logical", tv",
"physical", and "world". The output coordinate system options are "logical",
"tv", and "physical". The image cursor coordinate system is assumed to
be the "tv" system.
- Logical coordinates are pixel coordinates relative to the current image. The logical coordinate system is the coordinate system used by the image input/output routines to access the image data on disk. In the logical coordinate system the coordinates of the first pixel of a 2D image, e.g. dev$ypix and a 2D image section, e.g. dev$ypix[200:300,200:300] are always (1,1).
- Tv coordinates are the pixel coordinates used by the display servers. Tv coordinates include the effects of any input image section, but do not include the effects of previous linear transformations. If the input image name does not include an image section, then tv coordinates are identical to logical coordinates. If the input image name does include a section, and the input image has not been linearly transformed or copied from a parent image, tv coordinates are identical to physical coordinates. In the tv coordinate system the coordinates of the first pixel of a 2D image, e.g. dev$ypix and a 2D image section, e.g. dev$ypix[200:300,200:300] are (1,1) and (200,200) respectively.
- Physical coordinates are pixel coordinates invariant with respect to linear transformations of the physical image data. For example, if the current image was created by extracting a section of another image, the physical coordinates of an object in the current image will be equal to the physical coordinates of the same object in the parent image, although the logical coordinates will be different. In the physical coordinate system the coordinates of the first pixel of a 2D image, e.g. dev$ypix and a 2D image section, e.g. dev$ypix[200:300,200:300] are (1,1) and (200,200) respectively.
- World coordinates are image coordinates in any units which are invariant with respect to linear transformations of the physical image data. For example, the ra and dec of an object will always be the same no matter how the image is linearly transformed. The units of input world coordinates must be the same as those expected by the image header wcs, e. g. degrees and degrees for celestial coordinate systems.
- cache = ")_.cache"
- Cache the image pixels in memory. Cache may be set to the value of the apphot package parameter (the default), "yes", or "no". By default cacheing is disabled.
- verify = ")_.verify"
- Verify the critical PSTSELECT parameters ? Verify can be set to the DAOPHOT package parameter value (the default), "yes", or "no".
- update = ")_.update"
- Update the algorithm parameters if verify is "yes"? Update can be set to the DAOPHOT package parameter value (the default), "yes", or "no".
- verbose = ")_.verbose"
- Print messages about the progress of the task in non-interactive mode ? Verbose can be set to the DAOPHOT package parameter value (the default), "yes", or "no".
- graphics = ")_.graphics" The default graphics device. Graphics can be set to the default daophot package parameter value, "yes", or "no".
- display = ")_.display"
- The default image display device. Display can be set to the DAOPHOT package parameter value (the default), "yes", or "no". By default graphics overlay is disabled. Setting display to one of "imdr", "imdg", "imdb", or "imdy" enables graphics overlay with the IMD graphics kernel.
PSTSELECT reads the input photometry file photfile , extracts the ID, XCENTER, YCENTER, MAG, and MSKY fields for up to maxnpsf psf stars, and the results to pstfile . Pstfile automatically inherits the file format of photfile .
The coordinates read from photfile are assumed to be in coordinate system defined by wcsin . The options are "logical", "tv", "physical", and "world" and the transformation from the input coordinate system to the internal "logical" system is defined by the image coordinate system. The simplest default is the "logical" pixel system. Users working on with image sections but importing pixel coordinate lists generated from the parent image must use use the "tv" or "physical" input coordinate systems.
The coordinates written to pstfile are in the coordinate system defined by wcsout . The options are "logical", "tv", and "physical". The simplest default is the "logical" system. Users wishing to correlate the output coordinates of objects measured in image sections or mosaic pieces with coordinates in the parent image must use the "tv" or "physical" coordinate systems.
After reading the star list from photfile , PSTSELECT sorts the list in order of increasing magnitude, after rejecting any stars that have INDEF valued magnitudes, or which lie less than fitrad / scale pixels from the edge of the image . From this list the brightest maxnpsf stars which have no brighter neighbor stars within (psfrad + fitrad ) / scale + 1 pixels are selected as candidate psf stars. Psfrad and fitrad are the psf radius and fitting radius parameters respectively and are stored in the DAOPARS parameter set. Scale is the image scale parameter and is located in the DATAPARS parameter set. Plots, either mesh, contour or radial profile depending on the value of plottype , of the selected stars may be saved in the file plotfile .
If interactive = "no", PSTSELECT reads the star list in photfile , selects the candidate psf stars as described above, and writes the results to pstfile automatically. If interactive = "yes", PSTSELECT reads the star list, selects the candidate psf stars and waits for further instruction from the user. At this point the user can step through the stars chosen by PSTSELECT, check their surface, countour, or radial profile plots for blemishes, neighbours etc, and accept the good candidates and reject the poor ones, or use the image cursor and/or id number to select psf stars until a maximum of maxnpsf stars is reached. At any point in this process a previously selected psf star can be deleted.
If cache is yes and the host machine physical memory and working set size are large enough, the input image pixels are cached in memory. If cacheing is enabled and PSTSELECT is run interactively the first data access will appear to take a long time as the entire image must be read in before the data is actually fetched. All subsequent measurements will be very fast because PSTSELECT is accessing memory not disk. The point of cacheing is to speed up random image access by making the internal image i/o buffers the same size as the image itself. However if the input object lists are sorted in row order and sparse cacheing may actually worsen not improve the execution time. Also at present there is no point in enabling cacheing for images that are less than or equal to 524288 bytes, i.e. the size of the test image dev$ypix, as the default image i/o buffer is exactly that size. However if the size of dev$ypix is doubled by converting it to a real image with the chpixtype task then the effect of cacheing in interactive is can be quite noticeable if measurements of objects in the top and bottom halfs of the image are alternated.
The following cursor commands are available once the image cursor has been activated.
Keystroke Commands ? Print help p Print photometry for star nearest the cursor l List the current psf stars n Select the next good candidate psf star from the list a Add star nearest cursor to psf star list d Delete psf star nearest cursor from psf star list q Quit task Colon Commands :p [n] Print photometry for star n :a [n] Add star n to psf star list :d [n] Delete star n from psf star list The following cursor commands are available once a star has been selected and the graphics cursor has been activated. Interactive Graphics Keystroke Commands ? Print help p Print the photometry for this star t Print the plot parameters and data minimum and maximum a Accept star and proceed d Reject star and select another with image cursor m Plot the default mesh plot for this star n Increase vertical angle by 15 degrees (mesh plot only) s Decrease vertical angle by 15 degrees (mesh plot only) w Decrease horizontal angle by 15 degrees (mesh plot only) e Increase horizontal angle by 15 degrees (mesh plot only) c Plot the default contour plot for this star r Plot the radial profile for this star Colon Graphics Commands :m [val] [val] Set the mesh plot vertical and horizontal viewing angles :v [val] Set the mesh plot vertical viewing angle :h [val] Set the mesh plot horizontal viewing angle :c [val] [val] Set the contour plot floor and ceiling levels :l [value] Set the contour plot floor level :u [value] Set the contour plot ceiling level
If verbose = "yes" a single line is written to the terminal for each star added to the candidate psf star list. Full output is written to the file pstfile . At the beginning of this file is a header listing the values of all the important parameters. For each star included in the candidate psf star list the following quantities are written.
id xcenter ycenter mag msky
Id, xcenter, ycenter, mag, and msky are the id, x and y coordinates, magnitudes and sky values for the candidate psf stars listed in photfile .
1. Select up to 10 psf stars from the PHOT task output non-interactively. Save surface plots of the selected stars in the file "psf.plots".
da> daofind dev$ypix default fwhmpsf=2.5 sigma=5.0 threshold=20.0 ... answer verify prompts ... find stars in the image ... answer will appear in ypix.coo.1 da> phot dev$ypix default default annulus=10. dannulus=5. \ apertures = 5.0 ... answer verify prompts ... do aperture photometry on the detected stars ... answer will appear in ypix.mag.1 da> pstselect dev$ypix default default 10 psfrad=9.0 fitrad=3.0 \ plotfile=psf.plots ... answer verify prompts ... select candidate psf stars ... the output will appear in ypix.pst.1 da> display dev$ypix 1 ... display the image da> pdump ypix.pst.1 xc,yc yes | tvmark 1 STDIN col=204 ... mark the stars da> gkiextract psf.plots 1 | stdgraph ... make a surface plot of the first candidate psf star
2. Repeat the previous results for an image section while preserving the coordinate system of the original image.
da> daofind dev$ypix[150:450,150:450] default wcsout=tv fwhmpsf=2.5 \ sigma=5.0 threshold=20.0 ... answer verify prompts ... find stars in the image ... answer will appear in ypix.coo.2 da> phot dev$ypix[150:450,150:450] default default wcsin=tv wcsout=tv \ annulus=10. dannulus=5. apertures = 5.0 ... answer verify prompts ... do aperture photometry on the detected stars ... answer will appear in ypix.mag.2 da> pstselect dev$ypix[150:450,150:450] default default 10 wcsin=tv \ wcsout=tv psfrad=9.0 fitrad=3.0 plotfile=psf.plots2 ... answer verify prompts ... select candidate psf stars ... the output will appear in ypix.pst.2 da> display dev$ypix[150:450,150:450] 1 ... display the image da> pdump ypix.pst.2 xc,yc yes | tvmark 1 STDIN col=204 ... mark the stars da> gkiextract psf.plots2 4 | stdgraph ... make a surface plot of the 4th candidate psf star
3. Repeat example 1 but run pstselect in interactive mode and do not save the plots.
da> display dev$ypix 1 ... display the image da> pstselect dev$ypix ypix.mag.1 default 10 psfrad=9. fitrad=3. \ interactive+ mkstars+ display=imdr ... verify the critical parameters as instructed ... when the image cursor appears type the n keystroke command to select the first suitable candidate psf star, examine its surface plot, and type a or d to accept or reject the candidate ... repeat the previous command until 10 psf stars have been selected, the end of the star list is reached, or a sufficient number of stars but fewer than maxnpsf have been selected ... if fewer than maxnpsf stars are found automatically add psf stars to the list with the a keystroke command ... type q to quit