Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit e15dab2

Browse files
author
Leanne Guy
committed
minor tweaks
1 parent 2f6b223 commit e15dab2

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

08b_Interactive_Catalog_Visualization.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@
7070
"from astropy.coordinates import SkyCoord\n",
7171
"\n",
7272
"# LSST imports\n",
73-
"from lsst.daf.butler import Butler\n",
74-
"from rubin_jupyter_utils.lab.notebook import get_tap_service, retrieve_query\n",
73+
"from rubin_jupyter_utils.lab.notebook import get_tap_service\n",
7574
"\n",
7675
"# Bokeh and Holoviews for visualization\n",
7776
"import bokeh\n",
7877
"from bokeh.io import output_notebook, show\n",
7978
"from bokeh.models import ColumnDataSource, Range1d, HoverTool\n",
80-
"from bokeh.models import Selection, CDSView, GroupFilter\n",
79+
"from bokeh.models import CDSView, GroupFilter\n",
8180
"from bokeh.plotting import figure, gridplot\n",
8281
"from bokeh.transform import factor_cmap\n",
8382
"\n",
@@ -175,8 +174,8 @@
175174
"outputs": [],
176175
"source": [
177176
"# Define a reference position on the sky and a radius in arcseconds for a cone search\n",
178-
"c1 = SkyCoord(ra=59.7955707*u.degree, dec=-29.91176471*u.degree, frame='icrs')\n",
179-
"#radius = 15.882353 * u.arcmin\n",
177+
"c1 = SkyCoord(ra=59.79*u.degree, dec=-29.91*u.degree, frame='icrs')\n",
178+
"# c1 = SkyCoord(ra=50.65*u.degree, dec=-40.*u.degree, frame='icrs')\n",
180179
"radius = 0.1 * u.deg"
181180
]
182181
},
@@ -195,7 +194,8 @@
195194
" \"WHERE CONTAINS(POINT('ICRS', obj.ra, obj.dec),\"\\\n",
196195
" \"CIRCLE('ICRS', \" + str(c1.ra.value) + \", \" + str(c1.dec.value) + \", \" \\\n",
197196
" + str(radius.to(u.deg).value) + \" )) = 1 \" \\\n",
198-
" \"AND truth.match_objectid >= 0 \"\\\n",
197+
" \"AND obj.good = 1\" \\\n",
198+
" \"AND truth.match_objectid >= 0 \" \\\n",
199199
" \"AND truth.is_good_match = 1\"\n",
200200
"# print(query)"
201201
]
@@ -209,7 +209,7 @@
209209
"%%time\n",
210210
"# Execute the query and convert the results to a pandas dataframe\n",
211211
"data = service.search(query).to_table().to_pandas() \n",
212-
"assert len(data) == 14849 "
212+
"assert len(data) == 14803"
213213
]
214214
},
215215
{
@@ -238,9 +238,9 @@
238238
"metadata": {},
239239
"outputs": [],
240240
"source": [
241-
"# assert data[data[\"truth_type\"] == \"star\"].shape[0] == 226 # 2164 \n",
242-
"# assert data[data[\"truth_type\"] == \"galaxy\"].shape[0] == 10058 # 99932\n",
243-
"# assert data[data[\"truth_type\"] == \"SNe\"].shape[0] == 0"
241+
"assert data[data[\"truth_type\"] == \"star\"].shape[0] == 331\n",
242+
"assert data[data[\"truth_type\"] == \"galaxy\"].shape[0] == 14472\n",
243+
"assert data[data[\"truth_type\"] == \"SNe\"].shape[0] == 0"
244244
]
245245
},
246246
{
@@ -493,7 +493,7 @@
493493
"outputs": [],
494494
"source": [
495495
"%%opts Scatter [tools=['hover'], toolbar='above',height=400, width=400](color='grey')\n",
496-
"hv.Scatter(data).opts(alpha=0.2, size=1)"
496+
"hv.Scatter(data).opts(alpha=0.2, size=2)"
497497
]
498498
},
499499
{

0 commit comments

Comments
 (0)