1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Contours - DS9 </title>
</head>
<!--THIS FILE IS CREATED AUTOMATICALLY - DO NOT EDIT MANUALLY-->
<body><div class="mainbar">
<a name="maintext"></a><div align="center"><h1>Contours</h1></div>
<p>
Return to the <a href="../index.html">DS9 Users Manual</a></p>
<hr size="5" noshade>
<div>
<h2>Synopsis</h2>
<p>
Contours are curves along which the pixels have a constant
value. ds9 can create and display contours as an overlay on
a data image. The contours can be copied between frames in
the current session or saved to file for future use with ds9.
</p>
<p>
If you encounter any problems, please email ds9help [at] cfa.harvard.edu.
</p>
</div>
<hr size="5" noshade>
<h2><a name="toc">Contents</a></h2>
<ul>
<li><strong><a href="index.html#create">Creating Contours on a Dataset</a></strong></li>
<li><strong><a href="index.html#copy">Copying the Contours to Another Frame</a></strong></li>
<li><strong><a href="index.html#save">Saving the Contours</a></strong></li>
<li><strong><a href="index.html#convert">Converting to Polygons and Saving</a></strong></li>
<li><strong><a href="index.html#history">History</a></strong></li>
<li>
<strong>Images</strong><ul>
<li><a href="#dialog">Figure 1: Contour Parameters dialog box</a></li>
<li><a href="#xraycontour">Figure 2: X-ray data with contours</a></li>
<li><a href="#dssdialog">Figure 3: SAO-DSS Server dialog box</a></li>
<li><a href="#dsscontour">Figure 4: X-ray and optical data with contours</a></li>
</ul>
</li>
</ul>
<hr>
<div class="sectionlist">
<div class="section">
<h2><a name="create">Creating Contours on a Dataset</a></h2>
<p>
This thread uses Chandra data from an observation of the
galaxy cluster Abell 2142 (ObsID 5005).
</p>
<p>
After loading the data into ds9 and setting the desired
scale, click on the "Contours" item in the "Analysis" menu
to turn on contour display. Open the "Contour Parameters"
window from "Analysis → Contours Parameters". There
are two sliding scales which are used to set the number and
smoothness of the contours and fields for setting the range
of values to use.
</p>
<div class="figure">
<div class="caption"><h3><a name="dialog">Figure 1: Contour Parameters dialog box</a></h3></div>
<div><img alt='[The "Contour Parameters" dialog box has sliding scales to set the number and smoothness of the contours and fields for setting the range of values.]' src="dialog.png"></div>
</div>
<p>
Typically, you will want to generate between 1 and 10
contours; larger numbers will take longer to generate and
display. A smoothness level of 1 will evaluate the contour
at each image pixel, while a level of 2 will evaluate the
contour at every other pixel, and so on. A larger smoothing
will generate contours more quickly, but less detail will be
available.
</p>
<p>
By default, the range of the data scale is filled in as the
limits. Under the "Method" menu, there are two choices:
</p>
<ol type="1">
<li>
block (the default) - blocks down the image by the
smoothness factor before contours are calculated. The
larger the smoothness, the faster the result.
</li>
<li>
smooth - smooths the image before calculating contours.
The larger the smoothness, the slower the result.
</li>
</ol>
<p>
In this example, the number of levels is set to 6 and the
smoothing is set to 5. The contours will be generated over
the limit 1 to 100. The default method (block) is used.
</p>
<p>
After clicking the "Generate" button, the list of contours
is calculated and displayed in the "Levels" portion of the window.
Click "Apply" and the ds9 display is updated with the new
contour levels, as shown in <a href="#xraycontour">Figure 2</a>.
</p>
<div class="figure">
<div class="caption"><h3><a name="xraycontour">Figure 2: X-ray data with contours</a></h3></div>
<div><img alt="[Diffuse emission with contours overlaid; a point source is visible in the upper left corner of the image.]" src="xraycontour.png"></div>
</div>
<p>
The contour parameters can be adjusted until the desired
result is achieved. Be sure to click "Generate" whenever
an adjustment is made so that the levels are recalculated.
</p>
<hr>
</div>
<div class="section">
<h2><a name="copy">Copying the Contours to Another Frame</a></h2>
<p>
In this section, we take the X-ray contours just generated
and display them on an optional image from the Digital Sky Survey (DSS).
</p>
<p>
From the "Analysis → Image Servers" menu, select one
of the DSS server options (e.g. "SAO-DSS"). The server
dialog box allows you to retrieve an optical image of the
field of your observation and load it into a new frame. The
default retrieval image size and (RA,Dec) is equal to the
size and center of the field currently displayed. Here the
width and height have been set to 40, but the (RA,Dec)
determined by ds9 are used.
</p>
<div class="figure">
<div class="caption"><h3><a name="dssdialog">Figure 3: SAO-DSS Server dialog box</a></h3></div>
<div><img alt="[The fields for Ra, Dec, width, and height are populated with values determined from the x-ray data image.]" src="dssdialog.png"></div>
</div>
<p>
Click on "Retrieve" and the data is loaded into a new ds9
frame.
</p>
<p>
To copy the x-ray contours:
</p>
<ol type="1">
<li><p>
Select the frame with the X-ray data in it.
</p></li>
<li><p>
Use "Frame → Match Frames → WCS" to align the
two images.
</p></li>
<li><p>
To copy the contours, open the "Contour Parameters"
dialog again and select "Copy Contours" from the
"File" menu. Leave the window open, as it is needed in
a future step.
</p></li>
<li><p>
Select the frame with the optical data in it.
</p></li>
<li><p>
Using the "File" menu of the "Contour Parameters"
dialog, select "Paste Contours".
</p></li>
<li><p>
Adjust the parameters (if desired) in the small dialog box
that is displayed, then click "OK".
</p></li>
</ol>
<p>
The optical image now has the x-ray contours overlaid.
Since the WCS is the same, correlation between x-ray
and optical features may be seen.
</p>
<div class="figure">
<div class="caption"><h3><a name="dsscontour">Figure 4: X-ray and optical data with contours</a></h3></div>
<div><img alt="[The x-ray data is in the left frame and the optical data is in the right frame; both have the x-ray contours displayed on the data.]" src="dsscontour.png"></div>
</div>
<p>
To delete contours which have been pasted into a
frame, select "Clear" from the "File" menu of the "Contour
Parameters" dialog.
</p>
<hr>
</div>
<div class="section">
<h2><a name="save">Saving the Contours</a></h2>
<p>
To save the contours to a text file, choose "Save Contours"
from the "File" menu of the "Contour Parameters" dialog.
The contours are saved in a text file which can be loaded
back into ds9 with the "Load Contours" menu item.
</p>
<p>
The contours generated in this thread have been saved as <a href="ds9.con">ds9.con</a>.
</p>
<hr>
</div>
<div class="section">
<h2><a name="convert">Converting to Polygons and Saving</a></h2>
<p>
The contours can be converted to ds9 polygon regions for use
in filtering data. Converting to polygons also allows you
to select and/or delete specific contours.
</p>
<p>
<strong>Note that the contours cannot be <a href="index.html#save">saved
in ds9 format</a> after converting.</strong> If you wish to
save the contours, do so before continuing.
</p>
<p>
To convert the contours, select "Convert to Polygons" from
the "File" menu of the "Contour Parameters" dialog. The
contours are now defined as ds9 polygons, e.g.
</p>
<div class="screen"><pre style="background: #cccccc; white-space: pre; border: none; padding: 0.5em; overflow: auto; border: thin solid black;">
polygon(3535.2112,4184.5,3540.5,4179.1154,3548.5,4176.8219,3555.9012,4184.5,3548.5,4191.9558,3540.5,4190.3926)
</pre></div>
<p>
The polygon-shaped contours can be saved as a ds9 region
file from the "Region Save → Regions" menu. The region
file for these contours has been saved as <a href="a2142.reg">a2142.reg</a>.
</p>
</div>
</div>
<hr size="5" noshade>
<h2><a name="history">History</a></h2>
<table class="history">
<tr>
<td class="historydate">24 Jun 2009</td>
<td>
Original version
</td>
</tr>
</table>
<hr size="5" noshade>
<p>
Return to the <a href="../index.html">DS9 Users Manual</a></p>
</div></body>
</html>
|