diff options
Diffstat (limited to 'noao/digiphot/ptools/doc/pdump.hlp')
-rw-r--r-- | noao/digiphot/ptools/doc/pdump.hlp | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/noao/digiphot/ptools/doc/pdump.hlp b/noao/digiphot/ptools/doc/pdump.hlp new file mode 100644 index 00000000..d37a87e6 --- /dev/null +++ b/noao/digiphot/ptools/doc/pdump.hlp @@ -0,0 +1,178 @@ +.help pdump Feb93 noao.digiphot.ptools +.ih +NAME +pdump - print fields from an APPHOT/DAOPHOT database +.ih +USAGE +pdump infiles fields expr +.ih +PARAMETERS +.ls infiles +The APPHOT/DAOPHOT databases containing the fields to be dumped. +.le +.ls 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 spelled 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\[2]". The fields are output in +the order in which they are specified in the template. +.le +.ls 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 \fIexpr\fR = "yes", the specified fields in all the records are +printed. +.le +.ls headers = no +Dump the APPHOT/DAOPHOT database field headers. The selected +fields are printed on the standard output, preceded by the parameters list, +if \fIparameters\fR = yes, and the keyword, units, +and format information. +.le +.ls parameters = yes +Print the keyword parameters records on the +standard output if \fIheaders\fR = yes. +.le + +.ih +DESCRIPTION +PDUMP selects a subset of fields specified by the \fIfields\fR +parameter from an APPHOT/DAOPHOT database or a list of databases +and prints the results on the standard output. +If \fIheaders\fR = 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 \fIields\fR. If \fIheaders\fR = yes, the +selected fields are printed on the standard output, preceded by +the parameter list, if \fIparameters\fR = 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 capabilities 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 \fIexpr\fR 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. + +.nf + equal == not equal != + less than < less than or equal <= + greater than > greater than or equal >= + or || and && + negation ! pattern match ?= + concatenation // +.fi + +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 meta-characters. +The meta-characters themselves can be matched by preceeding them with the escape +character. The meta-characters listed below. + +.nf + 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 - +.fi + +The expression may also include arithmetic operators and functions. +The following arithmetic operators and functions are supported. + +.nf +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) +.fi +.ih +EXAMPLES + +1. Select the fields XCENTER and YCENTER from the output of the APPHOT +CENTER task. + +.nf + pt> pdump image.ctr.3 "XCENTER,YCENTER" yes +.fi + +2. Select the fields XCENTER and YCENTER from the output of the APPHOT +CENTER task for all records with YCENTER > 100.0. + +.nf + pt> pdump image.ctr.3 "XCENTER,YCENTER" "YCENTER > 100.0" +.fi + +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. + +.nf + 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 +.fi + + +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. + +.nf + pt> pdump image.nst.3 "ID,XCENTER,YCENTER,MSKY,MAG" \ + yes headers+ parameters+ +.fi + +.ih +BUGS +Users should not dump more fields than fill a 161 character textline +as IRAF does not currently fully support longer text lines. +.ih +SEE ALSO +ptools.txdump,ptools.tbdump,tables.tdump +.endhelp |