Skip to content

Commit fec308f

Browse files
Fixed minor error in which the wrong redshifts were listed for the LBGs in Figure 6
1 parent ec6f4c0 commit fec308f

1 file changed

Lines changed: 32 additions & 7 deletions

File tree

DP0.2/13a_Image_Cutout_SciDemo.ipynb

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
"import pyvo\n",
126126
"from pyvo.dal.adhoc import DatalinkResults, SodaQuery\n",
127127
"\n",
128+
"import astropy\n",
128129
"from astropy import units as u\n",
129130
"from astropy.coordinates import SkyCoord, Angle\n",
130131
"from astropy.io import fits\n",
@@ -1054,7 +1055,7 @@
10541055
"\n",
10551056
"High redshift galaxies are typically small in size. For this exercise, use aperture photometry with a relatively small aperture diameter (9 pixels) in order to obtain high S/N measurements and exclude neighbors.\n",
10561057
"\n",
1057-
"#### 3.1.1 Ammending a typical search because of the rarity of z~3 galaxies in the mock data.\n",
1058+
"#### 3.1.1 Amending a typical search because of the rarity of z~3 galaxies in the mock data.\n",
10581059
"The mock galaxies that go into DP0.2 are created using the LSST Catalog Simulator (<a href=https://www.lsst.org/scientists/simulations/catsimcatSim>catSim</a>), and are based on an empirical model of the evolution of galaxies outlined in <a href=\"https://arxiv.org/abs/1907.06530\">Korytov et al. 2019</a>. The input model is based on realistic number densities, fluxes, and redshift distributions across cosmic time, and utilizes the UniverseMachine methodology to assign empirical properties (see <a href=\"https://arxiv.org/abs/1806.07893\">Behroozi et al. 2019</a>). \n",
10591060
"\n",
10601061
"Typically at any redshift, bright galaxies are rarer than faint galaxies, which are much more common. And typically in any patch of the sky, nearby galaxies will be much more common above the detection limit of a survey than distant $z\\sim3$ galaxies. This means that $z\\sim3$ galaxies that are bright enough to meet the criteria we want (G$ < 24.5$) will require a large search area to identify a statistical sample. So, in this example, we will first identify a parent sample of bright (G < 24.5) galaxies over a very large area (4 degrees) to ensure the parent sample contains enough rare distant galaxies.\n",
@@ -1231,6 +1232,29 @@
12311232
"results3.to_table()"
12321233
]
12331234
},
1235+
{
1236+
"cell_type": "markdown",
1237+
"id": "ac0043c2-8aa1-4fa3-8d0c-2bb2271214b9",
1238+
"metadata": {},
1239+
"source": [
1240+
"Perform an inner join between `results3` with `results` using the `obj_objectId` and `objectId` columns to ensure the correct rows from `results3` are matched with the correct rows from `results` in the rest of this section."
1241+
]
1242+
},
1243+
{
1244+
"cell_type": "code",
1245+
"execution_count": null,
1246+
"id": "40eace2f-6234-4fcd-85cc-4d0a7f984e34",
1247+
"metadata": {},
1248+
"outputs": [],
1249+
"source": [
1250+
"joined_results = astropy.table.join(results3.to_table(), results.to_table(), \n",
1251+
" keys_left='obj_objectId',\n",
1252+
" keys_right='objectId',\n",
1253+
" join_type='inner')\n",
1254+
"\n",
1255+
"joined_results"
1256+
]
1257+
},
12341258
{
12351259
"cell_type": "markdown",
12361260
"id": "77bda4aa-398c-47e3-957c-0d77c7b35f4c",
@@ -1242,7 +1266,7 @@
12421266
{
12431267
"cell_type": "code",
12441268
"execution_count": null,
1245-
"id": "799441f5-cb29-42a9-94cb-9c345ff1818f",
1269+
"id": "08cce99e-f0cd-4110-b9ae-38ee24dcdff9",
12461270
"metadata": {},
12471271
"outputs": [],
12481272
"source": [
@@ -1252,11 +1276,12 @@
12521276
" fig, axs = plt.subplots(1, len(filt), figsize=(25, 25))\n",
12531277
"\n",
12541278
" for j, ax in enumerate(fig.axes):\n",
1255-
" dataId_deep = {'patch': results['patch'][whlbg][i],\n",
1256-
" 'tract': results['tract'][whlbg][i],\n",
1279+
" \n",
1280+
" dataId_deep = {'patch': joined_results['patch'][i].item(),\n",
1281+
" 'tract': joined_results['tract'][i].item(),\n",
12571282
" 'band': filt[j]}\n",
1258-
" cutout = make_image_cutout(service, results['coord_ra'][whlbg][i],\n",
1259-
" results['coord_dec'][whlbg][i],\n",
1283+
" cutout = make_image_cutout(service, joined_results['coord_ra'][i].item(),\n",
1284+
" joined_results['coord_dec'][i].item(),\n",
12601285
" cutout_size=0.001, imtype='deepCoadd',\n",
12611286
" dataId=dataId_deep,\n",
12621287
" filename='cutout_' + filt[j] + '_'\n",
@@ -1266,7 +1291,7 @@
12661291
" vmin=0, vmax=0.7, norm='linear', origin='lower')\n",
12671292
" ax.set_xticks([])\n",
12681293
" ax.set_yticks([])\n",
1269-
" ax.text(.1, .9, filt[j]+'-band z=' + str(results3['ts_redshift'][i]),\n",
1294+
" ax.text(.1, .9, filt[j]+'-band z=' + str(joined_results['ts_redshift'][i].item()),\n",
12701295
" color='white')\n",
12711296
" \n",
12721297
" del dataId_deep, cutout"

0 commit comments

Comments
 (0)