IRAF help page for package noao.digiphot.ptools, program pdump

from NOAO pdump - print fields from an APPHOT/DAOPHOT databaseUSAGEPARAMETERSDESCRIPTIONEXAMPLESBUGSSEE ALSO

pdump - print fields from an APPHOT/DAOPHOT database


USAGE

pdump infiles fields expr


PARAMETERS

infiles

The APPHOT/DAOPHOT databases containing the fields to be dumped.

fields

A template defining the fields to be dumped from each record. In the case of APPHOT/DAOPHOT text databases, the fields are specified by keywords defined by the #K and #N entries in the database. Upper or lower case and minimum match abbreviations are permissible. Some fields such as "mag" may have multiple entries. An individual entry can be referenced by specifying an array index, e.g. "MAG[2]" or several values can be selected by specifying a range of elements, e.g. "MAG[1-3]". In the case of STSDAS table APPHOT/DAOPHOT databases the fields are the column names. Names must be spelt in full but upper or lower case is allowed. In the case of STSDAS table databases, it may be necessary to escape the leading square bracket so that field "MAG[2]" would be referred to as "MAG]". The fields are output in the order in which they are specified in the template.

expr

The boolean expression to be evaluated once per record. Only the fields in those records for which the boolean expression evaluates to yes are printed. If expr = "yes", the specified fields in all the records are printed.

headers = no

Dump the APPHOT/DAOPHOT database field headers. The selected fields are printed on the standard output, preceded by the parameters list, if parameters = yes, and the keyword, units, and format information.

parameters = yes

Print the keyword parameters records on the standard output if headers = yes.


DESCRIPTION

PDUMP selects a subset of fields specified by the fields parameter from an APPHOT/DAOPHOT database or a list of databases and prints the results on the standard output. If headers = no, the output is in simple list format with adjacent fields separated by whitespace. The fields are printed in the order in which they appear in ields. If headers = yes, the selected fields are printed on the standard output, preceded by the parameter list, if parameters = yes, and the keyword, units, and format information. Newlines will not be inserted in the output if the input database was an APPHOT/DAOPHOT text file, so users should take care not specify so many output fields as to exceed the IRAF text file line limit of 161 characters. Newlines will be inserted if the original database was an STSDAS table.

PDUMP is a simple CL script which calls TXDUMP if the APPHOT/DAOPHOT database was a text file and TBDUMP if it was an STSDAS table. Although the parameters of TBDUMP and TXDUMP have been tailored to make the two tasks appear as similar as possible each task offers some capabilites that the other does not. In some situations users may wish to use the individual tasks instead of the generic script.

The output records are selected on the basis of an input boolean expression expr whose variables are the field names specified by the #N keywords or the parameters specified by the #K keywords in the APPHOT/DAOPHOT text database or the column names in an ST tables database. If after substituting the values associated with a particular record into the field name variables the expression evaluates to yes, that record is included in the output table.

The supported operators and functions are briefly described below. A detailed description of the boolean expression evaluator and its syntax can be found in the manual page for the IMAGES package HEDIT task.

The following logical operators can be used in the boolean expression.

	equal		  ==	not equal		!=
	less than	  <	less than or equal	<=
	greater than	  >	greater than or equal	>=
	or		  ||	and			&&
	negation	  !	pattern match		?=
	concatenation	  //

The pattern match character ?= takes a string expression as its first argument and a pattern as its second argument. The result is yes if the pattern is contained in the string expression. Patterns are strings which may contain pattern matching metacharacters. The metacharacters themselves can be matched by preceeding them with the escape character. The metacharacters listed below.

	beginning of string	^	end of string		$
	one character		?	zero or more characters	*
	white space		#	escape character	
	ignore case		{	end ignore case		}
	begin character class	[	end character class	]
	not, in char class	^	range, in char class	-

The expression may also include arithmetic operators and functions. The following arithmetic operators and functions are supported.

addition		+		subtraction		-
multiplication		*		division		/
negation		-		exponentiation		**
absolute value		abs(x)		cosine			cos(x)
sine			sin(x)		tangent			tan(x)
arc cosine		acos(x)		arc sine		asin(x)
arc tangent		atan(x)		arc tangent		atan2(x,y)
exponential		exp(x)		square root		sqrt(x)
natural log		log(x)		common log		log10(x)
minimum			min(x,y)	maximum			max(x,y)
convert to integer	int(x)		convert to real		real(x)
nearest integer		nint(x)		modulo			mod(x)

EXAMPLES

EXAMPLES

1. Select the fields XCENTER and YCENTER from the output of the APPHOT CENTER task.

    pt> pdump image.ctr.3 "XCENTER,YCENTER" yes

2. Select the fields XCENTER and YCENTER from the output of the APPHOT CENTER task for all records with YCENTER > 100.0.

    pt> pdump image.ctr.3 "XCENTER,YCENTER" "YCENTER > 100.0"

3. Select the fields ID, XCENTER, YCENTER and the first three magnitudes from the output of the APPHOT PHOT task. In the case of STSDAS table databases it may be necessary to escape the leading square bracket.

    pt> pdump image.mag.3 "ID,XCEN,YCEN,MAG[1],MAG[2],MAG[3]" yes
		   or
    pt> pdump image.mag.3 "ID,XCEN,YCEN,MAG],MAG],MAG]" yes

4. Select the ID, XCENTER, YCENTER, MSKY and MAG fields from the output of the DAOPHOT NSTAR task. Print the headers and parameters as well.

    pt> pdump image.nst.3 "ID,XCENTER,YCENTER,MSKY,MAG"  
	yes headers+ parameters+


BUGS

Users should not dump more fields than fill a 161 character textline as IRAF does not currently fully support longer text lines.


SEE ALSO

ptools.txdump, ptools.tbdump, tables.tdump,


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