1regcoords(n) SAORD Documentation regcoords(n)
2
3
4
6 RegCoords: Spatial Region Coordinates
7
9 This document describes the specification of coordinate systems, and
10 the interpretation of coordinate values, for spatial region filtering.
11
13 Pixel coordinate systems
14
15 The default coordinate system for regions is PHYSICAL, which means that
16 region position and size values are taken from the original data. (Note
17 that this is a change from the original IRAF/PROS implementation, in
18 which the IMAGE coordinate system was the default.) PHYSICAL coordi‐
19 nates always refer to pixel positions on the original image (using IRAF
20 LTM and LTV keywords). With PHYSICAL coordinates, if a set of coordi‐
21 nates specifies the position of an object in an original FITS file, the
22 same coordinates will specify the same object in any FITS derived from
23 the original. Physical coordinates are invariant with blocking of FITS
24 files or taking sections of images, even when a blocked section is
25 written to a new file.
26
27 Thus, although a value in pixels refers, by default, to the PHYSICAL
28 coordinate system, you may specify that position values refer to the
29 image coordinate system using the global or local properties commands:
30
31 global coordsys image
32 circle 512 512 100
33
34 The global command changes the coordinate system for all regions that
35 follow, while the local command changes the coordinate system only for
36 the region immediately following:
37
38 local coordsys image
39 circle 512 512 100
40 circle 1024 1024 200
41
42 This changes the coordinate system only for the region that follows.
43 In the above example, the second region uses the global coordinate sys‐
44 tem (PHYSICAL by default).
45
46 World Coordinate Systems
47
48 If World Coordinate System information is contained in the data file
49 being filtered, it also is possible to define regions using a sky coor‐
50 dinate system. Supported systems include:
51
52 name description
53 ---- -----------
54 PHYSICAL pixel coords of original file using LTM/LTV
55 IMAGE pixel coords of current file
56 FK4, B1950 sky coordinate systems
57 FK5, J2000 sky coordinate systems
58 GALACTIC sky coordinate systems
59 ECLIPTIC sky coordinate systems
60 ICRS currently same as J2000
61 LINEAR linear wcs as defined in file
62
63 In addition, two mosaic coordinate systems have been defined that uti‐
64 lize the (evolving) IRAF mosaic keywords:
65
66 name description
67 ---- -----------
68 AMPLIFIER mosaic coords of original file using ATM/ATV
69 DETECTOR mosaic coords of original file using DTM/DTV
70
71 Again, to use one of these coordinate systems, the global or local
72 properties commands are used:
73
74 global coordsys galactic
75
76 WCS Positions and Sizes
77
78 In addition to pixels, positional values in a WCS-enabled region can be
79 specified using sexagesimal or degrees format:
80
81 position arguments description
82 ------------------ -----------
83 [num] context-dependent (see below)
84 [num]d degrees
85 [num]r radians
86 [num]p physical pixels
87 [num]i image pixels
88 [num]:[num]:[num] hms for 'odd' position arguments
89 [num]:[num]:[num] dms for 'even' position arguments
90 [num]h[num]m[num]s explicit hms
91 [num]d[num]m[num]s explicit dms
92
93 If ':' is used as sexagesimal separator, the value is considered to be
94 specifying hours/minutes/seconds if it is the first argument of a posi‐
95 tional pair, and degrees/minutes/seconds for the second argument of a
96 pair (except for galactic coordinates, which always use degrees):
97
98 argument description
99 ----------- -----------
100 10:20:30.0 10 hours, 20 minutes, 30 seconds for 1st positional argument
101 10 degrees, 20 minutes, 30 seconds for 2nd positional argument
102 10h20m30.0 10 hours, 20 minutes, 30 seconds
103 10d20m30.0 10 degrees, 20 minutes, 30 seconds
104 10.20d 10.2 degrees
105
106 Similarly, the units of size values are defined by the formating char‐
107 acter(s) attached to a number:
108
109 size arguments description
110 -------------- -----------
111 [num] context-dependent (see below)
112 [num]" arc seconds
113 [num]' arc minutes
114 [num]d degrees
115 [num]r radians
116 [num]p physical pixels
117 [num]i image pixels
118
119 For example:
120
121 argument description
122 ----------- -----------
123 10 ten pixels
124 10' ten minutes of arc
125 10" ten seconds of arc
126 10d ten degrees
127 10p ten pixels
128 0.5r half of a radian
129
130 An example of using sky coordinate systems follows:
131
132 global coordsys B1950
133 -box 175.54d 20.01156d 10' 10'
134 local coordsys J2000
135 pie 179.57d 22.4d 0 360 n=4 && annulus 179.57d 22.4d 3' 24' n=5
136
137 At the FK4 1950 coordinates 175.54d RA, 20.01156d DEC exclude a 10
138 minute by 10 minute box. Then at the FK5 2000 coordinates 179.57d RA
139 22.4d DEC draw a radial profile regions pattern with 4 quadrants and 5
140 annuli ranging from 3 minutes to 24 minutes in diameter. In this exam‐
141 ple, the default coordinate system is overridden by the commands in the
142 regions spec.
143
144 NB: The Meaning of Pure Numbers Are Context Sensitive
145
146 When a "pure number" (i.e. one without a format directive such as 'd'
147 for 'degrees') is specified as a position or size, its interpretation
148 depends on the context defined by the 'coordsys' keyword. In general,
149 the rule is:
150
151 All pure numbers have implied units corresponding to the current coor‐
152 dinate system.
153
154 If no coordinate system is explicitly specified, the default system is
155 implicitly assumed to be PHYSICAL. In practice this means that for
156 IMAGE and PHYSICAL systems, pure numbers are pixels. Otherwise, for
157 all systems other than LINEAR, pure numbers are degrees. For LINEAR
158 systems, pure numbers are in the units of the linear system. This rule
159 covers both positions and sizes.
160
161 As a corollary, when a sky-formatted number is used with the IMAGE or
162 PHYSICAL coordinate system (which includes the default case of no
163 coordsys being specified), the formatted number is assumed to be in the
164 units of the WCS contained in the current file. If no sky WCS is speci‐
165 fied, an error results.
166
167 Examples:
168
169 circle(512,512,10)
170 ellipse 202.44382d 47.181656d 0.01d 0.02d
171
172 In the absence of a specified coordinate system, the circle uses the
173 default PHYSICAL units of pixels, while the ellipse explicitly uses
174 degrees, presumably to go with the WCS in the current file.
175
176 global coordsys=fk5
177 global color=green font="system 10 normal"
178 circle 202.44382 47.181656 0.01
179 circle 202.44382 47.181656 10p
180 ellipse(512p,512p,10p,15p,20)
181
182 Here, the circles use the FK5 units of degrees (except for the explicit
183 use of pixels in the second radius), while the ellipse explicitly spec‐
184 ifies pixels. The ellipse angle is in degrees.
185
186 Note that Chandra data format appears to use "coordsys=physical"
187 implicitly. Therefore, for most Chandra applications, valid regions
188 can be generated safely by asking ds9 to save/display regions in pixels
189 using the PHYSICAL coordsys.
190
192 See funtools(n) for a list of Funtools help pages
193
194
195
196version 1.4.2 January 2, 2008 regcoords(n)