|
2 | 2 | "cells": [ |
3 | 3 | { |
4 | 4 | "cell_type": "markdown", |
5 | | - "id": "1639560d", |
| 5 | + "id": "8b4ba1a8", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | 8 | "<img align=\"left\" src = https://project.lsst.org/sites/default/files/Rubin-O-Logo_0.png width=250 style=\"padding: 10px\"> \n", |
|
27 | 27 | { |
28 | 28 | "cell_type": "code", |
29 | 29 | "execution_count": null, |
30 | | - "id": "9f70ee7e", |
| 30 | + "id": "d8ba8735", |
31 | 31 | "metadata": {}, |
32 | 32 | "outputs": [], |
33 | 33 | "source": [ |
|
38 | 38 | }, |
39 | 39 | { |
40 | 40 | "cell_type": "markdown", |
41 | | - "id": "e0958755", |
| 41 | + "id": "bfbea2b1", |
42 | 42 | "metadata": {}, |
43 | 43 | "source": [ |
44 | 44 | "### 1. Import Common Python Libraries\n", |
|
49 | 49 | { |
50 | 50 | "cell_type": "code", |
51 | 51 | "execution_count": null, |
52 | | - "id": "f84b5be8", |
| 52 | + "id": "f8be85b1", |
53 | 53 | "metadata": {}, |
54 | 54 | "outputs": [], |
55 | 55 | "source": [ |
|
63 | 63 | }, |
64 | 64 | { |
65 | 65 | "cell_type": "markdown", |
66 | | - "id": "af316a4c", |
| 66 | + "id": "ada21dc8", |
67 | 67 | "metadata": {}, |
68 | 68 | "source": [ |
69 | 69 | "To access tables, we will use the TAP service in a similar manner to what we showed in the [Intro to DP0 notebook](https://github.com/rubin-dp0/tutorial-notebooks/blob/main/01_Intro_to_DP0_Notebooks.ipynb), and explored further in THE TAP TUTORIAL NOTEBOOK. See those notebooks for more details." |
|
72 | 72 | { |
73 | 73 | "cell_type": "code", |
74 | 74 | "execution_count": null, |
75 | | - "id": "55838b7b", |
| 75 | + "id": "077b6c0f", |
76 | 76 | "metadata": {}, |
77 | 77 | "outputs": [], |
78 | 78 | "source": [ |
|
91 | 91 | }, |
92 | 92 | { |
93 | 93 | "cell_type": "markdown", |
94 | | - "id": "637ece9a", |
| 94 | + "id": "52a897dd", |
95 | 95 | "metadata": {}, |
96 | 96 | "source": [ |
97 | 97 | "### 2. Loading tables with TAP\n", |
|
102 | 102 | { |
103 | 103 | "cell_type": "code", |
104 | 104 | "execution_count": null, |
105 | | - "id": "6778c472", |
| 105 | + "id": "4e140287", |
106 | 106 | "metadata": {}, |
107 | 107 | "outputs": [], |
108 | 108 | "source": [ |
|
112 | 112 | }, |
113 | 113 | { |
114 | 114 | "cell_type": "markdown", |
115 | | - "id": "86e92b98", |
| 115 | + "id": "e45aad05", |
116 | 116 | "metadata": {}, |
117 | 117 | "source": [ |
118 | 118 | "For our analysis, let's choose the Object table, `dp01_dc2_catalogs.object`, and then we will compare the measurements from this table to the \"truth\" values from `dp01_dc2_catalogs.truth_match`.\n", |
|
123 | 123 | { |
124 | 124 | "cell_type": "code", |
125 | 125 | "execution_count": null, |
126 | | - "id": "fd7df864", |
| 126 | + "id": "d39962d2", |
127 | 127 | "metadata": {}, |
128 | 128 | "outputs": [], |
129 | 129 | "source": [ |
|
137 | 137 | { |
138 | 138 | "cell_type": "code", |
139 | 139 | "execution_count": null, |
140 | | - "id": "920c6af0", |
| 140 | + "id": "eb67af10", |
141 | 141 | "metadata": {}, |
142 | 142 | "outputs": [], |
143 | 143 | "source": [ |
|
150 | 150 | }, |
151 | 151 | { |
152 | 152 | "cell_type": "markdown", |
153 | | - "id": "3fd9bde3", |
| 153 | + "id": "d5eba28e", |
154 | 154 | "metadata": {}, |
155 | 155 | "source": [ |
156 | 156 | "For this exploration, we will select a small region of sky around a random RA, Dec position. The following two cells read data centered on (RA, Dec) = (62.0, -37.0) degrees, within a radius of 0.1 degrees, for first the Object table, then the Truth-Match table. Note that we are selecting only a subset of the columns seen in the schema above. You can add or remove columns as you wish.\n", |
|
161 | 161 | { |
162 | 162 | "cell_type": "code", |
163 | 163 | "execution_count": null, |
164 | | - "id": "81d2d6ea", |
| 164 | + "id": "b6e109cd", |
165 | 165 | "metadata": {}, |
166 | 166 | "outputs": [], |
167 | 167 | "source": [ |
|
176 | 176 | { |
177 | 177 | "cell_type": "code", |
178 | 178 | "execution_count": null, |
179 | | - "id": "ba06fc28", |
| 179 | + "id": "e0ac2149", |
180 | 180 | "metadata": {}, |
181 | 181 | "outputs": [], |
182 | 182 | "source": [ |
|
186 | 186 | " \"FROM dp01_dc2_catalogs.truth_match \"\\\n", |
187 | 187 | " \"WHERE CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 62.0, -37.0, 0.1)) = 1 \"\\\n", |
188 | 188 | " \"AND match_objectId >= 0 AND is_good_match = 1\")\n", |
189 | | - "#results.to_table().show_in_notebook() # To print the table to the screen.\n" |
| 189 | + "#results.to_table().show_in_notebook() # To print the table to the screen." |
190 | 190 | ] |
191 | 191 | }, |
192 | 192 | { |
193 | 193 | "cell_type": "markdown", |
194 | | - "id": "92f3612b", |
| 194 | + "id": "d846a2be", |
195 | 195 | "metadata": {}, |
196 | 196 | "source": [ |
197 | 197 | "These tables will be much easier to work with as `pandas` \"dataframes\". The query results have convenient methods that we can use to convert them." |
|
200 | 200 | { |
201 | 201 | "cell_type": "code", |
202 | 202 | "execution_count": null, |
203 | | - "id": "81dcac78", |
| 203 | + "id": "08fa4117", |
204 | 204 | "metadata": {}, |
205 | 205 | "outputs": [], |
206 | 206 | "source": [ |
|
210 | 210 | }, |
211 | 211 | { |
212 | 212 | "cell_type": "markdown", |
213 | | - "id": "a70d7da4", |
| 213 | + "id": "d149c002", |
214 | 214 | "metadata": {}, |
215 | 215 | "source": [ |
216 | 216 | "### 3. Merge the two tables and compare measurements to truth values\n", |
|
221 | 221 | { |
222 | 222 | "cell_type": "code", |
223 | 223 | "execution_count": null, |
224 | | - "id": "93807913", |
| 224 | + "id": "3afe80b2", |
225 | 225 | "metadata": {}, |
226 | 226 | "outputs": [], |
227 | 227 | "source": [ |
|
238 | 238 | { |
239 | 239 | "cell_type": "code", |
240 | 240 | "execution_count": null, |
241 | | - "id": "46cf18e0", |
| 241 | + "id": "c287ea01", |
242 | 242 | "metadata": {}, |
243 | 243 | "outputs": [], |
244 | 244 | "source": [ |
|
248 | 248 | { |
249 | 249 | "cell_type": "code", |
250 | 250 | "execution_count": null, |
251 | | - "id": "33de260e", |
| 251 | + "id": "300a15fb", |
252 | 252 | "metadata": {}, |
253 | 253 | "outputs": [], |
254 | 254 | "source": [ |
|
283 | 283 | }, |
284 | 284 | { |
285 | 285 | "cell_type": "markdown", |
286 | | - "id": "4deec9c5", |
| 286 | + "id": "9a674e5e", |
287 | 287 | "metadata": {}, |
288 | 288 | "source": [ |
289 | 289 | "#### Compare the measurements from the Object table to the \"true\" values for some objects.\n", |
|
296 | 296 | { |
297 | 297 | "cell_type": "code", |
298 | 298 | "execution_count": null, |
299 | | - "id": "42621d73", |
| 299 | + "id": "6672ad9f", |
300 | 300 | "metadata": {}, |
301 | 301 | "outputs": [], |
302 | 302 | "source": [ |
|
306 | 306 | }, |
307 | 307 | { |
308 | 308 | "cell_type": "markdown", |
309 | | - "id": "2b939113", |
| 309 | + "id": "44f961d0", |
310 | 310 | "metadata": {}, |
311 | 311 | "source": [ |
312 | 312 | "Just to confirm that things look like we expect, let's plot a color-magnitude (g vs. g-i) and color-color (r-i vs. g-r) diagram." |
|
315 | 315 | { |
316 | 316 | "cell_type": "code", |
317 | 317 | "execution_count": null, |
318 | | - "id": "9dad2659", |
| 318 | + "id": "921ad2bf", |
319 | 319 | "metadata": {}, |
320 | 320 | "outputs": [], |
321 | 321 | "source": [ |
|
349 | 349 | }, |
350 | 350 | { |
351 | 351 | "cell_type": "markdown", |
352 | | - "id": "1d04fffb", |
| 352 | + "id": "b4b6ddac", |
353 | 353 | "metadata": {}, |
354 | 354 | "source": [ |
355 | 355 | "Looks pretty normal - the stellar locus in color-color space is right where one expects it to be, and the galaxies dominate at the faint end of the CMD. \n", |
|
360 | 360 | { |
361 | 361 | "cell_type": "code", |
362 | 362 | "execution_count": null, |
363 | | - "id": "a45ebbcc", |
| 363 | + "id": "ca928751", |
364 | 364 | "metadata": {}, |
365 | 365 | "outputs": [], |
366 | 366 | "source": [ |
|
379 | 379 | }, |
380 | 380 | { |
381 | 381 | "cell_type": "markdown", |
382 | | - "id": "773441aa", |
| 382 | + "id": "d2182885", |
383 | 383 | "metadata": {}, |
384 | 384 | "source": [ |
385 | 385 | "Well, that looks good -- the ratio of measured to true fluxes is centered on 1.0. It seems like the fluxes are recovered pretty well, on average.\n", |
386 | 386 | "\n", |
387 | 387 | "Congratulations! You have now learned how to compare measurements in the DP0.1 catalogs to the \"true\" simulated properties of objects. Have fun exploring more properties!" |
388 | 388 | ] |
389 | | - }, |
390 | | - { |
391 | | - "cell_type": "code", |
392 | | - "execution_count": null, |
393 | | - "id": "fd42e4de", |
394 | | - "metadata": {}, |
395 | | - "outputs": [], |
396 | | - "source": [] |
397 | 389 | } |
398 | 390 | ], |
399 | 391 | "metadata": { |
|
0 commit comments