IRAF help page for package noao.digiphot.apphot, program radprof

from NOAO radprof -- compute the radial profile of an objectUSAGEPARAMETERSDESCRIPTIONCURSOR COMMANDSALGORITHMSOUTPUTERRORSEXAMPLESBUGSSEE ALSO

radprof -- compute the radial profile of an object


USAGE

radprof image radius step


PARAMETERS

image

The name of the image containing the objects to be measured.

radius, step

The radial profile is computed from the image center out to the radius in pixels specified by radius * scale in increments of step * scale.

coords =

The list of text files containing the coordinates of the objects to be fit, 1 object per line with the x and y coordinates in columns 1 and 2 respectively. If coords is null (""), RADPROF will either read commands the image cursor (default) or read commands from a cursor command file. In the latter the case the image cursor parameter icommands must be set to the name of the cursor command file. If coords is defined, RADPROF activates the cursor and accepts coordinate input from either the cursor or the coordinate file (interactive mode), or reads the coordinates from the coordinate list directly or from a cursor command file (batch mode). The number of coords files is either 0, 1 or the number of input images.

output =

The name of the results file or results 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 "prf" and version is the next available version of the file. If output is null (""), then no output file is created. If output is defined, the number of output files is either 1 or the same as the number of input images.

plotfile =

The file containing radial plots for all the objects written to output. If plotfile is not equal to null a plot is written to plotfile every time the information for the star is written to output.

datapars =

The name of the file containing the data dependent parameters. If datapars is null ("") then the default parameter set is the user's uparm directory is used. The critical parameters fwhmpsf, and sigma are located here.

centerpars =

The name of the file containing the centering parameters. If centerpars is null ("") then the default parameter set is the user's uparm directory is used. The critical parameters calgorithm and cbox are located here.

fitskypars =

The name of the file containing the sky fitting parameters. If fitskypars is null ("") then the default parameter set is the user's uparm directory is used. The critical parameters salgorithm, annulus and dannulus are located here.

photpars =

The name of the file containing the photometry parameters. If photpars is null ("") then the default parameter set is the user's uparm directory is used. The critical parameter apertures is located here.

order = 5

The number of pieces in the spline fit.

nreject = 1

The maximum number of rejection cycles.

kreject = 3.0

The k-sigma rejection limit for the radial profile fit.

interactive = yes

Interactive or batch mode.

radplots = yes

If radplots is equal to yes and radprof is run in interactive mode then a radial profile plot is written to the screen.

verify = yes

Verify the critical parameters in non-interactive mode.

update = no

Update the critical parameter in non-interactive mode if verify is yes.

verbose = no

Print messages on the screen in non-interactive mode.

graphics = stdgraph

The default graphics device.

display = stdimage

The default image display device. Display can be set to "stdgraph" if RADPROF is to be run interactively from a contour plot.

icommands =

The image cursor.

gcommands =

The graphics cursor.


DESCRIPTION

The radial profiles of a set of objects in the image image are computed and plotted from the object center out to the radius radius * scale, in steps of step * scale pixels.

RADPROF can be run either interactively or in batch mode by setting the interactive switch to yes. In interactive mode starting x and y coordinates can either be read directly from the image cursor or read from the text file specified by coords. In interactive mode the results will be plotted on the terminal. In batch mode the estimated positions can be read from the text file coords or the image cursor parameter icommands can be redirected to a text file containing a list of cursor commands.


CURSOR COMMANDS

The RADPROF cursor commands are listed below.

	Interactive Keystroke Commands
?	Print help
:	Colon commands
v	Verify the critical parameters
w	Store the current parameters
d	Plot radial profile of current star
i	Interactively set parameters using current star
c	Fit center of current star
t	Fit sky around the cursor position
a       Average sky values fit around several cursor positions
s	Fit sky around the current star 
p	Fit star using current sky
o	Fit star using current sky, output results
f	Fit current star
spbar	Fit current star, output results
m	Move to next star in coordinate list
n	Fit next star in coordinate list, output results
l	Fit remaining stars in coordinate list, output results	
r	Rewind the coordinate list
e	Print error messages
q	Exit task
	Colon Commands
:show	[data/center/sky/fit]	List the parameters
:m [n]	Move to next [nth] object in coordinate list
:n [n]	Fit next [nth] object 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 features (y), absorption (n)
:sigma		[value]		Standard deviation of sky (counts)
:datamin	[value]		Minimum good pixel value (counts)
:datamax	[value]		Maximum good pixel 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)
# Observing parameters
:exposure	[value]		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]		Integration time (time units)
:xairmass	[value]		Airmass value (number)
:ifilter	[string]	Filter id string
:otime		[string]	Time of observation (time units)
# Centering algorithm parameters
:calgorithm	[string]	Centering algorithm
:cbox		[value]		Width of the 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 S/N ratio 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)
# Sky fitting algorithm parameters
:salgorithm	[string]	Sky fitting algorithm
:skyvalue	[value]		User supplied sky value (counts)
:annulus	[value]		Inner radius of sky annulus (scale units)
:dannulus	[value]		Width of sky annulus (scale units)
:khist		[value]		Sky histogram extent (+/- sigma)
:binsize	[value]		Resolution of sky histogram (sigma)
:sloclip	[value]		Low-side clipping factor in percent
:shiclip	[value]		High-side clipping factor in percent
:smaxiter	[value]		Maximum number of iterations
:smooth		[y/n]		Lucy smooth the sky histogram
:snreject	[value]		Maximum number of rejection cycles
:sloreject	[value]		Low-side pixel rejection limits (sky sigma)
:shireject	[value]		High-side pixel rejection limits (sky sigma)
:rgrow		[value]		Region growing radius (scale units)
# Photometry parameters
:apertures	[string]	List of apertures (scale units)
:zmag		[value]		Zero point of magnitude scale
# Profile fitting parameters
:radius		[value]		Maximum profile radius (scale units)
:step		[value]		Step size for computed profile (scale units)
:order		[value]		Number of spline pieces in fit
:kreject	[value]		K-sigma rejection for fit (fit sigma)
:nreject	[value]		Maximum number of rejection cycles
# Marking and plotting parameters
:mkcenter	[y/n]		Mark computed centers on display
:mksky		[y/n]		Mark the sky annuli on the display
:mkapert	[y/n]		Mark apertures on the display
:radplot	[y/n]		Plot the radial profile
The following commands are available from inside the interactive setup menu.
                    Interactive Radprof Setup Menu
	v	Mark and verify the critical parameters (f,c,s,a,d,r,w,x)
	f	Mark and verify the psf full-width half-maximum
	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 width
	n	Mark and verify the cleaning radius
	p	Mark and verify the clipping radius
	a	Mark and verify the inner radius of the sky annulus
	d	Mark and verify the width of the sky annulus
	g	Mark and verify the region growing radius
	r	Mark and verify the photometry aperture radii
	w	Mark and verify the radius of the radial profile
	x	Mark and verify the step size of radial profile


ALGORITHMS

Prior to computing the radial profile of the star, RADPROF computes the center, estimates a sky value and does aperture photometry on the star using the parameters in the DATAPARS, CENTERPARS, FITSKYPARS, and PHOTPARS tasks. The radial and intensity coordinates of all the pixels inside radius * scale are computed using the calculated center and sky values and fit to a least squares cubic spline of order order with optional bad data rejection. The fit is interpolated at intervals of step_size * scale to derive the output profile and estimate the full width at half maximum of the object. The noise model parameters are defined in DATAPARS.


OUTPUT

In interactive mode the following quantities are printed on the standard output as each object is measured. Error is a simple string which indicates whether an error was encountered in the the centering algorithm, the sky fitting algorithm, the photometry algorithm or the spline fitting algorithm respectively. Mag and merr are the magnitudes and errors in aperture N and xcenter, ycenter and msky are the x and y centers and the sky value respectively. Pfwhm is the fitted full width half maximum of the fitted radial profile.

    image  xcenter  ycenter  msky  pfwhm  mag[N]  merr[N] iers

In both interactive and batch mode 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
	   msky  stdev  sskew  nsky  nsrej  sier  serror
	   itime  xairmass  ifilter  otime
	   rapert  sum  area  mag  merr  pier  perr
	   pfwhm  inorm  tinorm  rier  rerror
	   pradius  intensity  tintensity

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 cerror are the 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

Sier and serror are the sky compuation error code and accompanying error message respectively. Msky, stdev and sskew are the sky value (per pixel), standard deviation and skew respectively. Nsky and nsrej are the number of sky pixels and the number of sky pixels rejected respectively.

Itime is the exposure time, xairmass is self-evident, filter is an id string specifying the filter used during the observation and otime is a string containing the time of observation in whatever units the user has defined.

Rapert, sum, and area are the radius of the aperture in pixels, the total number of counts including sky in the aperture and the area of the aperture in square pixels. Mag and merr are the magnitude and error in the magnitude in the aperture (see below).

        flux = sum - area * msky
         mag = zmag - 2.5 * log10 (flux) + 2.5 * log10 (itime)
        merr = 1.0857 * err / flux
         err = sqrt (flux / epadu + area * stdev**2 +
               area**2 * stdev**2 / nsky)

Pier and perror are photometry error code and accompanying error message.

Pfwhm is the full width at half intensity of the fitted profile. Inorm and tinorm are the normalization factors for the fitted radial profile and the fitted total intensity profile respectively. Rier and rerror are the spline fitting error code and accompanying error message. Pradius, intensity and tintensity are the computed radii, intensity and total intensity values at each radial step.


ERRORS

If the object centering was error free then the field cier will be zero. Non-zero values of cier flag the following error conditions.

	0        # No error
	101      # The centering box is off 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

If all goes well during the sky fitting process then the error code sier will be 0. Non-zero values of sier flag the following error conditions.

	0         # No error
	201       # There are no sky pixels in the sky annulus
	202       # Sky annulus is partially off the image
	203       # The histogram of sky pixels has no width
	204       # The histogram of sky pixels is flat or concave
	205       # There are too few points for a good sky fit
	206       # The sky fit is singular
	207       # The sky fit did not converge
	208       # The graphics stream is undefined
	209       # The file of sky values does not exist
	210       # The sky file is at EOF
	211       # Cannot read the sky value correctly
	212       # The best fit parameter are non-physical

If no error occurs during the measurement of the magnitudes then pier is 0. Non-zero values of pier flag the following error conditions.

	0        # No error
	301      # The aperture is off the image
	302      # The aperture is partially off the image
	303      # The sky value is undefined
	305      # There is bad data in the aperture

If no error occurs during the profile fitting then rier is 0. Non-zero values of rier flag the following error conditions.

	0       # No error
	901     # The profile profile is off the image
	902     # The profile region is partially off the image
	903	# There are too few points in the profile
	904	# The fit is singular
	905     # The sky value is undefined


EXAMPLES

1. Compute the radial profiles for a few stars in N4147 using the display and the image cursor. Setup the task parameters using the interactive setup menu defined by the i key command.

	ap> set stdimcur = stdimage
	... define the image cursor
	ap> display n4147 1 fi+
	... display the image
	ap> radprof n4147 10. .25
	... type ? to print a short help page
	... move the image cursor to a star
	... type i to enter the interactive setup menu
	... enter maximum radius in pixels of the radial profile
	... set the fwhmpsf, centering radius, inner and outer sky
    	    annuli, apertures, sigma, profile radius and step size
	    using the graphics cursor and the stellar radial profile
	    plot
	... typing  leaves everything at the default value
	... type the v key to verify the parameters
	... type the w key to save the parameters in the parameter files
	... move the image cursor to the star of interest and tap
	    the space bar
	... a radial profile plot will appear on the graphics terminal
	... the output will appear in n4147.prf.1

2. Compute the radial profiles 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> radprof m92 10. .25
	... type ? to print the help page
	... 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
	... enter maximum radius in pixels of the radial profile
	... set the fwhmpsf, centering radius, inner and outer sky annuli,
	    apertures, sigma, profile radius and step size using the
	    graphics cursor and the stellar radial profile plot
	... typing  leaves everything at the default value
	... type the v key to verify the parameters
	... type the w key to save the parameters in the parameter files
	... retype :.read m92.plot1 to reload the contour plot
	... move the graphics cursor to the star of interest and tap
	    the space bar
	... a radial profile plot will appear on the graphics terminal
	... repeat the above sequence for each additional star
	... by default radprof does not create an output file

3. Setup and run RADPROF interactively on a list of objects, using a contour plot as the image display and the parameters defined and saved in example 1.

	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 1
	... the output will appear in the text file m92.coo.1
	ap> radprof m92 10. .25 coords=m92.coo.1
	... type ? to print a help page
	... type :.read m92.plot2 to read in the contour plot
	... type :n 1 to measure the first star in the list
	... type :n to measure the next star
	... by default no text output is created

4. Run RADPROF in batch mode using the coordinate file and the previously saved parameters. Save the text and plot output. Verify the critical parameters.

	ap> radprof m92 10. .25 coords=m92.coo.1 out="default" 
	    plotfile=m92radplots inter- verify+
	... output will appear in m92.prf.1 and m92radplots

5. Run RADPROF in batch mode using the coordinate file and the previously saved parameters. Save the text and plot output. The task can be submitted to the background by appending an ampersand to the command line listed below.

	ap> radprof m92 10. .25 coords=m92.coo.1 out="default" 
	    plotfile=m92radplots inter- verify-
	... output will appear in m92.prf.3 and m92radplots

6. Run RADPROF interactively on the sun workstation using the imtool window, a coordinate list and the current set of parameters.

	ap> set stdimcur = text
	... set the image cursor to the standard input
	ap> display m92 1
	... display the image in the imtool window and put the mouse
	    in the imtool window
	ap> radprof m92 10. .25 coords=m92.coo.2 plotfile=plots
	... type ? to print a help page
	... type :m 3 to set the coordinates to the third star
	    in the list
	... type i to enter the interactive setup menu
	... enter maximum radius in pixels of the radial profile
	... set the fwhmpsf, the centering radius, the inner and outer
	    sky annuli, the apertures, sigma, profile radius and
	    step size using the graphics cursor and the stellar radial
	    profile plot
	... typing  leaves everything at the 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
	... the radial profiles will be output to the plot metacode file
	    plots


BUGS

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 enabled markcur option in the SUN/IMTOOL setup window. This feature is under the control of the IMTOOL window and the APPHOT package has no control over it.


SEE ALSO

datapars, centerpars, fitskypars, photpars,


This page automatically generated from the iraf .hlp file. If you would like your local iraf package .hlp files converted into HTML please contact Dave Mills at NOAO.

dmills@noao.edu