center image
image
The list of images containing the objects to be centered.
coords =
The list of text files containing the coordinates of the objects
to be centered, one object per line with the x and y coordinates in
columns one and two respectively.
If coords is null (""), CENTER will either read commands from the
image cursor (default), or read the commands from a cursor command file.
In the latter case the image cursor parameter icommands must be set to
the name of the cursor command file.
If coords is defined,
CENTER can read the coordinates from either
the image cursor or coords (interactive mode),
or read coordinates from coords
or a cursor command file (batch mode).
The number of coordinates files must be either zero, one, or equal to the
number of image files.
output = default
The name of the results file or results directory. The string "default"
indicates the current directory. If output is "default", "dir$default"
or a directory specification then an output name of the form
dir$root.extension.version
is constructed, where dir is the directory, root is the root image name,
extension is "ctr" and version is the next available version of the file.
The number of output files must be either one or equal to the number of
image files. If output is null ("") then no output file is written.
In both interactive and batch mode full output is written to output. In
interactive mode a subset of the results is written to the standard output.
plotfile =
The name of the file containing radial profile plots of the stars written
to the output file. If plotfile is
not equal to null ("") then a radial profile plot is written to plotfile
every time a record is written to output. The user should be
aware that this can be a time consuming operation.
datapars =
The name of the file containing the data dependent parameters.
The critical parameters fwhmpsf, and
sigma are located here.
If datapars is null ("") then the default parameter set in the
user's uparm directory is used.
centerpars =
The name of the file containing the centering algorithm parameters.
The critical parameters calgorithm and cbox are located here.
If centerpars is null ("") then the default parameter set in the
user's uparm directory is used.
interactive = yes
Interactive or batch mode?
radplots = no
If radplots is "yes" and CENTER is run in interactive mode, a radial
profile of each star is plotted on the screen after the center is fit.
verify = yes
Verify the critical parameters in non-interactive mode?
update = no
Update the critical parameters in non-interactive mode if verify was
set to yes?
verbose = no
Print messages on the terminal in non-interactive mode?
graphics = stdgraph
The default graphics device.
display = stdimage
The default display device. Display can be set to "stdgraph"
to enable CENTER to work interactively from a contour plot.
icommands =
The image display cursor.
gcommands =
The graphics cursor.
CENTER computes accurate centers for a set of objects in the IRAF image image, whose initial coordinates are listed in the text file coords, a cursor command file, or read from the image display with the image cursor. The computed x and y coordinates, the errors, and the fitting parameters are written to the text file output.
CENTER can be run either interactively or in batch mode by setting the parameter interactive. In interactive mode starting x and y positions can either be read directly from the image cursor or read from the text file coords. In interactive mode the user can examine, adjust, and save the algorithm parameters, change ojects interactively, query for the next or nth object in the list, or fit the entire coordinate list with the chosen parameter set. In batch mode the positions can be read from the text file coords or the image cursor can be redirected to a text file containing a list of cursor commands as specified by the parameter icommands.
The following cursor commands are currently available.
Interactive Keystroke Commands ? Print help : Colon commands v Verify the critical parameters w Save the current parameters d Plot radial profile of current star i Interactively set parameters using current star f Fit center of current star spbar Fit center of current star, output results m Move to next star in coordinate list n Center next star in coordinate list, output results l Center remaining stars in coordinate list, output results e Print error messages r Rewind the coordinate list q Exit task Colon Commands :show [data/center] List the parameters :m [n] Move to next [nth] star in coordinate list :n [n] Center next [nth] star in coordinate list, output results Colon Parameter Editing Commands # Image and file name parameters :image [string] Image name :coords [string] Coordinate file name :output [string] Output file name # Data dependent parameters :scale [value] Image scale (units per pixel) :fwhmpsf [value] Full-width half-maximum of PSF (scale units) :emission [y/n] Emission feature (y), absorption (n) :sigma [value] Standard deviation of sky (counts) :datamin [value] Minimum good data value (counts) :datamax [value] Maximum good data value (counts) # Noise parameters :noise [string] Noise model (constant|poisson) :gain [string] Gain image header keyword :ccdread [string] Readout noise image header keyword :epadu [value] Gain (electrons per adu) :readnoise [value] Readout noise (electrons) # Observations parameters :exposure [string] Exposure time image header keyword :airmass [string] Airmass image header keyword :filter [string] Filter image header keyword :obstime [string] Time of observation image header keyword :itime [value] Exposure time (time units) :xairmass [value] Airmass value (number) :ifilter [string] Filter id string :otime [string] Time of observation (time units) # Centering parameters :calgorithm [string] Centering algorithm :cbox [value] Width of centering box (scale units) :cthreshold [value] Centering intensity threshold (sigma) :cmaxiter [value] Maximum number of iterations :maxshift [value] Maximum center shift (scale units) :minsnratio [value] Minimum signal to noise for centering :clean [y/n] Clean subraster before centering :rclean [value] Cleaning radius (scale units) :rclip [value] Clipping radius (scale units) :kclean [value] Clean K-sigma rejection limit (sigma) # Plotting and marking parameters :mkcenter [y/n] Mark computed centers on the display :radplot [y/n] Plot radial profile of object The following keystroke commands are available from the interactive setup menu. Interactive Center Setup Menu v Mark and verify the critical center parameters (f,s,c) f Mark and verify the full-width half-maximum of the psf s Mark and verify the standard deviation of the background l Mark and verify the minimum good data value u Mark and verify the maximum good data value c Mark and verify the centering box half-width n Mark and verify the cleaning radius p Mark and verify the clipping radius
A brief description of the data dependent parameters and the centering algorithm parameters can be found in the online manual pages for datapars and centerpars. A full description of the algorithms can be found in the document Specifications for the Apphot Package.
In interactive mode the following quantities are written to the terminal as each object is measured. Error is a simple string which indicates whether an error condition has been flagged. The centers and their errors are in pixel units.
image xinit yinit xcenter ycenter xerr yerr error
In both interactive and batch mode the full output is written to the text file output. At the beginning of each file is a header listing the current values of the parameters when the first stellar record was written. These parameters can be subsequently altered. For each star measured the following record is written
image xinit yinit id coords lid xcenter ycenter xshift yshift xerr yerr cier error
Image and coords are the name of the image and coordinate file respectively. Id and lid are the sequence numbers of stars in the output and coordinate files respectively. Cier and error are the centering error code and accompanying error message respectively. Xinit, yinit, xcenter, ycenter, xshift, yshift, and xerr, yerr are self explanatory and output in pixel units. The sense of the xshift and yshift definitions is the following.
xshift = xcenter - xinit yshift = ycenter - yinit
If the object centering was error free then the field cier will be zero. Non-zero values in the cier column flag the following error conditions.
0 # No error 101 # The centering box is off the image 102 # The centering box is partially off the image 103 # The S/N ratio is low in the centering box 104 # There are two few points for a good fit 105 # The x or y center fit is singular 106 # The x or y center fit did not converge 107 # The x or y center shift is greater than maxshift 108 # There is bad data in the centering box
1. Compute the centers for a few stars in N4147 using the image display and the image cursor. Setup the task parameters using the interactive setup menu defined by the i keystroke command and a radial profile plot.
ap> set stdimcur = stdimage ... define the image cursor ap> display n4147 1 fi+ ... display the image ap> center n4147 ... type ? for optional help ... move image cursor to a star ... type i to enter the interactive setup menu, and v to get the default menu ... enter the maximum radius in pixels for the radial profile or accept the default with a CR ... set the fwhmpsf, sigma, and centering box half-width using the graphics cursor and the stellar radial profile plot ... typingafter a prompt leaves the parameter at its default value ... type the w key to save the parameters in the parameter files ... type the v key to verify the critical parameters ... move the image cursor to the stars of interest and tap the space bar ... the output will appear in n4147.ctr.1
2. Compute the centers for a few stars in M92 using the contour plot and the graphics cursor. Setup the task parameters using the interactive setup menu defined by the i key command.
ap> set stdimcur = stdgraph ... define the image cursor to be the graphics cursor ap> contour m92 >G m92.plot1 ... store the contour plot of m92 in the file m92.plot ap> center m92 display=stdgraph ... type ? for optional help ... type :.read m92.plot1 to load the contour plot on the screen ... move graphics cursor to a star ... type i to enter the interactive setup menu followed by the v key to get the default setup menu ... enter maximum radius in pixels of the radial profile ... set the fwhmpsf, sigma, and centering box half-width using the graphics cursor and the stellar radial profile plot, typingafter the prompt leaves the parameter at its default value ... type the w key to save the parameters in the parameter files ... type the v key to verify critical parameters ... retype :.read m92.plot1 to reload the contour plot ... move the graphics cursor to the stars of interest and tap the space bar ... a one line summary of the answers will appear on the standard output for each star measured ... full output will appear in the text file m92.ctr.1
3. Setup and run CENTER interactively on a list of objects, using a contour plot as the image display and the parameters defined and saved in example 2.
ap> set stdimcur = stdgraph ... define the image cursor to be the graphics cursor ap> contour m92 ... adjust plot parameters until the contour plot is satisfactory ap> =gcur ... enter cursor mode ... type :.write m92.plot2 to save the plot in a metacode file ... type any key to quit cursor mode ap> daofind m92 ... make a coordinate list by searching for objects with the fwhmpsf and threshold defined in example 2 ... the output will appear in the text file m92.coo.1 ap> center m92 coords=m92.coo.1 display=stdgraph ... type ? for optional help ... type :.read m92.plot2 to read in the contour plot ... move the graphics cursor to the stars and tap space bar or ... use m, :m and/or n, :n, l, r commands to measure objects in the coordinate list ... a one line summary of results will appear on the standard output for each star measured ... the output will appear in m92.ctr.2 ...
4. Run CENTER in batch mode using the coordinate file and the previously saved parameters. Verify the critical parameters.
ap> center m92 coords=m92.coo.1 verify+ inter- ... output will appear in m92.ctr.3 ...
5. Run CENTER in batch mode using the coordinate file and the previously saved parameters. The task can be submitted to the background by appending an ampersand to the command line listed below.
ap> center m92 coords=m92.coo.1 verify- inter- ... output will appear in m92.ctr.4
6. Run CENTER interactively on the Sun workstation without the use of the IMTOOL window using only a coordinate list and the current set of parameters as input.
ap> set stdimcur = text ... set the image cursor to the standard input ap> center m92 coords=m92.coo.1 ... type ? for optional help ... type :m 3 to set the initial coordinates to those of the third star in the list ... type i to enter the interactive setup menu followed by v to get the default menu ... enter maximum radius in pixels of the radial profile ... set the fwhmpsf, sigma, centering box half-width using the graphics cursor and the stellar radial profile plot, typingafter the prompt leaves the parameter at its default value ... type r to rewind the coordinate list ... type l to measure all the stars in the coordinate list ... a one line summary of the answers will appear on the standard output for each star measured ... full output will appear in the text file m92.ctr.5
It is currently the responsibility of the user to make sure that the image displayed in the frame is the same as that specified by the image parameter.
Commands which draw to the image display are currently disabled. The TVMARK task in the PROTO package can be used to draw simple marks on the display. All the APPHOT marking commands will however function if a contour plot is used in lieu of the image display.
Users should not be confused by the normally disabled "cursor marker" option in the SUN/IMTOOL setup window. This feature is under the control of the IMTOOL window and the APPHOT package has no interactive with it.