.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "funsky 1" .TH funsky 1 "April 14, 2011" "version 1.4.5" "SAORD Documentation" .SH "NAME" funsky \- convert between image and sky coordinates .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \&\fBfunsky\fR iname[ext] # RA,Dec (deg) or image pix from stdin \&\fBfunsky\fR iname[ext] [lname] # RA, Dec (deg) or image pix from list \&\fBfunsky\fR iname[ext] [col1] [col2] # named cols:units from stdin \&\fBfunsky\fR iname[ext] [lname] [col1] [col2] # named cols:units from list .Ve .SH "OPTIONS" .IX Header "OPTIONS" .Vb 5 \& \-d # always use integer tlmin conversion (as ds9 does) \& \-r # convert x,y to RA,Dec (default: convert RA,Dec to x,y) \& \-o # include offset from the nominal target position (in arcsec) \& \-v # display input values also (default: display output only) \& \-T # output display in rdb format (w/header,tab delimiters) .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Funsky converts input sky coordinates (\s-1RA\s0, Dec) to image coordinates (or vice versa) using the \s-1WCS\s0 information contained in the specified \s-1FITS\s0 file. Several calling sequences are supported in order to make it easy to specify coordinate positions in different ways. .PP The first required argument is always the input \s-1FITS\s0 file (or extension) containing the \s-1WCS\s0 information in an extension header. Note that the data from this file is not used. By default, the program converts input \s-1RA\s0 and Dec values to X and Y using this \s-1WCS\s0 information. If the \s-1WCS\s0 is associated with a \s-1FITS\s0 image, then the X,Y values are image values. If the \s-1WCS\s0 is associated with a binary table, then the X, Y values are physical values. To convert X,Y to \s-1RA\s0 and Dec, use the \fB\-r\fR (reverse) switch. .PP If no other command arguments are supplied, then the input positions are read from the standard input. Each line is assumed to contain a single coordinate position consisting of an \s-1RA\s0 in degrees (or X in pixels) followed by a Dec in degrees (or Y in pixels). The usual delimiters are supported (spaces, commas, tabs). For example: .PP .Vb 9 \& # read from stdin, default column names and units \& [sh] funsky snr.ev \& 22.982695 58.606523 # input RA (hrs), Dec(deg) \& 510.00 510.00 \& 22.982127 58.607634 # input \& 512.00 510.50 \& 22.981700 58.614301 # input \& 513.50 513.50 \& ^D # end of input .Ve .PP If a second argument is supplied, this argument is assumed to be a file containing \s-1RA\s0 (X) and Dec (Y) positions. The file can either be an \s-1ASCII\s0 table or a \s-1FITS\s0 binary table. The order of columns is unimportant, if the table has a column header. In this case, the names of the columns must be one of \*(L"\s-1RA\s0\*(R", \*(L"\s-1DEC\s0\*(R", or \*(L"X\*(R", \*(L"Y\*(R" for sky to image and image to sky conversions, respectively. If the table has no header, then once again, \s-1RA\s0 (X) is assumed to first, followed by \s-1DEC\s0 (Y). For example: .PP .Vb 7 \& # read from file, default column names and units \& [sh] cat hd.in \& RA DEC \& --------- --------- \& 22.982695 58.606523 \& 22.982127 58.607634 \& 22.981700 58.614301 .Ve .PP .Vb 4 \& [sh] funsky snr.ev hd.in \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP If three arguments are supplied, then the input positions again are read from the standard input. Each line is assumed to contain a single coordinate position consisting of an \s-1RA\s0 (or X in pixels) followed by a Dec (or Y in pixels), with the usual delimiters supported. However, the second and third arguments now specify the column names and/or sky units using a colon-delimited syntax: .PP .Vb 1 \& [colname]:[h|d|r] .Ve .PP If the colname is omitted, the names default to \*(L"\s-1RA\s0\*(R", \*(L"\s-1DEC\s0\*(R", \*(L"X\*(R", \*(L"Y\*(R", \&\*(L"\s-1COL1\s0\*(R", or \*(L"\s-1COL2\s0\*(R" as above. If the units are omitted, the default is degrees for both \s-1RA\s0 and Dec. When the \-r switch is used (convert from image to sky) the units are applied to the output instead of the input. The following examples will serve to illustrate the options: .PP .Vb 7 \& # read from stdin, specifying column names (def. units: degrees) \& [sh] cat hd.in \& MYRA MYDEC \& --------- --------- \& 22.982695 58.606523 \& 22.982127 58.607634 \& 22.981700 58.614301 .Ve .PP .Vb 4 \& [sh] funsky snr.ev MYRA MYDEC < hd.in \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP .Vb 7 \& # read from stdin, specifying column names and units \& [sh] cat dd.in \& MYRA MYDEC \& --------- --------- \& 344.740432 58.606523 \& 344.731900 58.607634 \& 344.725500 58.614301 .Ve .PP .Vb 4 \& [sh] funsky snr.ev MYRA:d MYDEC:d < dd.in \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP .Vb 5 \& # read stdin, convert image to sky, specifying output sky units \& [sh] cat im.in \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP .Vb 4 \& [sh] cat im.in | funsky \-r snr.ev :d :d \& 344.740432 58.606523 \& 344.731900 58.607634 \& 344.725500 58.614301 .Ve .PP Finally, four command arguments specify both and input file and column names and/or units: .PP .Vb 6 \& [sh] cat dd.in \& MYRA MYDEC \& --------- --------- \& 344.740432 58.606523 \& 344.731900 58.607634 \& 344.725500 58.614301 .Ve .PP .Vb 4 \& [sh] funsky snr.ev dd.in MYRA:d MYDEC:d \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP .Vb 5 \& # read file, convert image to sky, specifying output sky units \& [sh] cat im.in \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP .Vb 4 \& [sh] funsky \-r snr.ev im.in :d :d \& 344.740432 58.606523 \& 344.731900 58.607634 \& 344.725500 58.614301 .Ve .PP By default, the output of funsky consists only of the converted coordinate position(s), one per output line. This makes parsing in shell scripts easy. Use the \fB\-v\fR (verbose) switch to specify that the input coordinates should be pre-pended to each line. For example: .PP .Vb 6 \& [sh] cat dd.in \& MYRA MYDEC \& --------- --------- \& 344.740432 58.606523 \& 344.731900 58.607634 \& 344.725500 58.614301 .Ve .PP .Vb 4 \& [sh] funsky snr.ev dd.in MYRA:d MYDEC:d \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP .Vb 4 \& [sh] funsky \-v snr.ev dd.in MYRA:d MYDEC:d \& 344.740432 58.606523 510.00 510.00 \& 344.731900 58.607634 512.00 510.50 \& 344.725500 58.614301 513.50 513.50 .Ve .PP In addition, a full starbase table can be output using the \fB\-T\fR (table) switch. This switch can be used with or without the \-v switch. If the \-T and \-v are both specified, then a descriptive header parameters are output before the table (mainly to remind you of the sky units): .PP .Vb 7 \& # output table in non-verbose mode \& [sh] funsky \-T snr.ev dd.in MYRA:d MYDEC:d \& X Y \& ------------ ------------ \& 510.00 510.00 \& 512.00 510.50 \& 513.50 513.50 .Ve .PP .Vb 9 \& # output table in verbose mode \& [sh] funsky \-T \-v snr.ev dd.in MYRA:d MYDEC:d \& # IFILE = /Users/eric/data/snr.ev \& # ICOL1 = MYRA \& # ICOL2 = MYDEC \& # IUNITS1 = d \& # IUNITS2 = d \& # OCOL1 = X \& # OCOL2 = Y .Ve .PP .Vb 5 \& MYRA MYDEC X Y \& ------------ ------------ ------------ ------------ \& 344.740432 58.606523 510.00 510.00 \& 344.731900 58.607634 512.00 510.50 \& 344.725500 58.614301 513.50 513.50 .Ve .PP Finally, the \fB\-d\fR (ds9) switch mimicks ds9's use of integer \s-1TLMIN\s0 and \s-1TLMAX\s0 values for all coordinate transformations. \s-1FITS\s0 conventions seem to call for use of floating point \s-1TLMIN\s0 and \s-1TLMAX\s0 when the data are floats. This convention is followed by funsky but results in a small discrepancy with ds9's converted values for floating point data. We will remedy this conflict in the future, maybe. .SH "SEE ALSO" .IX Header "SEE ALSO" See funtools(7) for a list of Funtools help pages