| pdump | noao.digiphot.ptools | pdump |
pdump - print fields from an APPHOT/DAOPHOT database
pdump infiles fields expr
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)
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\[1],MAG\[2],MAG\[3]" 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+
Users should not dump more fields than fill a 161 character textline as IRAF does not currently fully support longer text lines.
ptools.txdump,ptools.tbdump,tables.tdump