1funsky(1) SAORD Documentation funsky(1)
2
3
4
6 funsky - convert between image and sky coordinates
7
9 funsky iname[ext] # RA,Dec (deg) or image pix from stdin
10 funsky iname[ext] [lname] # RA, Dec (deg) or image pix from list
11 funsky iname[ext] [col1] [col2] # named cols:units from stdin
12 funsky iname[ext] [lname] [col1] [col2] # named cols:units from list
13
15 -d # always use integer tlmin conversion (as ds9 does)
16 -r # convert x,y to RA,Dec (default: convert RA,Dec to x,y)
17 -o # include offset from the nominal target position (in arcsec)
18 -v # display input values also (default: display output only)
19 -T # output display in rdb format (w/header,tab delimiters)
20
22 Funsky converts input sky coordinates (RA, Dec) to image coordinates
23 (or vice versa) using the WCS information contained in the specified
24 FITS file. Several calling sequences are supported in order to make it
25 easy to specify coordinate positions in different ways.
26
27 The first required argument is always the input FITS file (or exten‐
28 sion) containing the WCS information in an extension header. Note that
29 the data from this file is not used. By default, the program converts
30 input RA and Dec values to X and Y using this WCS information. If the
31 WCS is associated with a FITS image, then the X,Y values are image val‐
32 ues. If the WCS is associated with a binary table, then the X, Y values
33 are physical values. To convert X,Y to RA and Dec, use the -r
34 (reverse) switch.
35
36 If no other command arguments are supplied, then the input positions
37 are read from the standard input. Each line is assumed to contain a
38 single coordinate position consisting of an RA in hours (or X in pix‐
39 els) followed by a Dec in degrees (or Y in pixels). The usual delim‐
40 iters are supported (spaces, commas, tabs). For example:
41
42 # read from stdin, default column names and units
43 [sh] funsky snr.ev
44 22.982695 58.606523 # input RA (hrs), Dec(deg)
45 510.00 510.00
46 22.982127 58.607634 # input
47 512.00 510.50
48 22.981700 58.614301 # input
49 513.50 513.50
50 ^D # end of input
51
52 If a second argument is supplied, this argument is assumed to be a file
53 containing RA (X) and Dec (Y) positions. The file can either be an
54 ASCII table or a FITS binary table. The order of columns is unimpor‐
55 tant, if the table has a column header. In this case, the names of the
56 columns must be one of "RA", "DEC", or "X", "Y" for sky to image and
57 image to sky conversions, respectively. If the table has no header,
58 then once again, RA (X) is assumed to first, followed by DEC (Y). For
59 example:
60
61 # read from file, default column names and units
62 [sh] cat hd.in
63 RA DEC
64 --------- ---------
65 22.982695 58.606523
66 22.982127 58.607634
67 22.981700 58.614301
68
69 [sh] funsky snr.ev hd.in
70 510.00 510.00
71 512.00 510.50
72 513.50 513.50
73
74 If three arguments are supplied, then the input positions again are
75 read from the standard input. Each line is assumed to contain a single
76 coordinate position consisting of an RA (or X in pixels) followed by a
77 Dec (or Y in pixels), with the usual delimiters supported. However, the
78 second and third arguments now specify the column names and/or sky
79 units using a colon-delimited syntax:
80
81 [colname]:[h⎪d⎪r]
82
83 If the colname is omitted, the names default to "RA", "DEC", "X", "Y",
84 "COL1", or "COL2" as above. If the units are omitted, the default is
85 hours for RA and degrees for Dec. When the -r switch is used (convert
86 from image to sky) the units are applied to the output instead of the
87 input. The following examples will serve to illustrate the options:
88
89 # read from stdin, specifying column names (def. units: hours, degrees)
90 [sh] cat hd.in
91 MYRA MYDEC
92 --------- ---------
93 22.982695 58.606523
94 22.982127 58.607634
95 22.981700 58.614301
96
97 [sh] funsky snr.ev MYRA MYDEC < hd.in
98 510.00 510.00
99 512.00 510.50
100 513.50 513.50
101
102 # read from stdin, specifying column names and units
103 [sh] cat dd.in
104 MYRA MYDEC
105 --------- ---------
106 344.740432 58.606523
107 344.731900 58.607634
108 344.725500 58.614301
109
110 [sh] funsky snr.ev MYRA:d MYDEC:d < dd.in
111 510.00 510.00
112 512.00 510.50
113 513.50 513.50
114
115 # read stdin, convert image to sky, specifying output sky units
116 [sh] cat im.in
117 510.00 510.00
118 512.00 510.50
119 513.50 513.50
120
121 [sh] cat im.in ⎪ funsky -r snr.ev :d :d
122 344.740432 58.606523
123 344.731900 58.607634
124 344.725500 58.614301
125
126 Finally, four command arguments specify both and input file and column
127 names and/or units:
128
129 [sh] cat dd.in
130 MYRA MYDEC
131 --------- ---------
132 344.740432 58.606523
133 344.731900 58.607634
134 344.725500 58.614301
135
136 [sh] funsky snr.ev dd.in MYRA:d MYDEC:d
137 510.00 510.00
138 512.00 510.50
139 513.50 513.50
140
141 # read file, convert image to sky, specifying output sky units
142 [sh] cat im.in
143 510.00 510.00
144 512.00 510.50
145 513.50 513.50
146
147 [sh] funsky -r snr.ev im.in :d :d
148 344.740432 58.606523
149 344.731900 58.607634
150 344.725500 58.614301
151
152 By default, the output of funsky consists only of the converted coordi‐
153 nate position(s), one per output line. This makes parsing in shell
154 scripts easy. Use the -v (verbose) switch to specify that the input
155 coordinates should be pre-pended to each line. For example:
156
157 [sh] cat dd.in
158 MYRA MYDEC
159 --------- ---------
160 344.740432 58.606523
161 344.731900 58.607634
162 344.725500 58.614301
163
164 [sh] funsky snr.ev dd.in MYRA:d MYDEC:d
165 510.00 510.00
166 512.00 510.50
167 513.50 513.50
168
169 [sh] funsky -v snr.ev dd.in MYRA:d MYDEC:d
170 344.740432 58.606523 510.00 510.00
171 344.731900 58.607634 512.00 510.50
172 344.725500 58.614301 513.50 513.50
173
174 In addition, a full starbase table can be output using the -T (table)
175 switch. This switch can be used with or without the -v switch. If the
176 -T and -v are both specified, then a descriptive header parameters are
177 output before the table (mainly to remind you of the sky units):
178
179 # output table in non-verbose mode
180 [sh] funsky -T snr.ev dd.in MYRA:d MYDEC:d
181 X Y
182 ------------ ------------
183 510.00 510.00
184 512.00 510.50
185 513.50 513.50
186
187 # output table in verbose mode
188 [sh] funsky -T -v snr.ev dd.in MYRA:d MYDEC:d
189 # IFILE = /Users/eric/data/snr.ev
190 # ICOL1 = MYRA
191 # ICOL2 = MYDEC
192 # IUNITS1 = d
193 # IUNITS2 = d
194 # OCOL1 = X
195 # OCOL2 = Y
196
197 MYRA MYDEC X Y
198 ------------ ------------ ------------ ------------
199 344.740432 58.606523 510.00 510.00
200 344.731900 58.607634 512.00 510.50
201 344.725500 58.614301 513.50 513.50
202
203 Finally, the -d (ds9) switch mimicks ds9's use of integer TLMIN and
204 TLMAX values for all coordinate transformations. FITS conventions seem
205 to call for use of floating point TLMIN and TLMAX when the data are
206 floats. This convention is followed by funsky but results in a small
207 discrepancy with ds9's converted values for floating point data. We
208 will remedy this conflict in the future, maybe.
209
211 See funtools(n) for a list of Funtools help pages
212
213
214
215version 1.4.0 August 15, 2007 funsky(1)