Skip to content

Commit 669f433

Browse files
updating nb 9
1 parent 6977f04 commit 669f433

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

DP1/100_How_to_Use_RSP_Tools/103_Image_access_and_display/103_9_Image_stamps.ipynb

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"Data Release: <a href=\"https://dp1.lsst.io/\">Data Preview 1</a> <br>\n",
2323
"Container Size: large <br>\n",
2424
"LSST Science Pipelines version: r29.2.0 <br>\n",
25-
"Last verified to run: 2026-02-10 <br>\n",
25+
"Last verified to run: 2026-03-26 <br>\n",
2626
"Repository: <a href=\"https://github.com/lsst/tutorial-notebooks\">github.com/lsst/tutorial-notebooks</a> <br>"
2727
]
2828
},
@@ -469,21 +469,19 @@
469469
"metadata": {},
470470
"outputs": [],
471471
"source": [
472-
"dia_query = f\"\"\"\n",
473-
"SELECT MIN(midpointMjdTai) as first_detect_time,\n",
474-
" MAX(midpointMjdTai) as last_detect_time\n",
475-
"FROM dp1.DiaSource\n",
476-
"WHERE CONTAINS(POINT('ICRS', coord_ra, coord_dec), \n",
477-
" CIRCLE('ICRS', {ra}, {dec}, 0.001)) = 1\n",
478-
"\"\"\"\n",
472+
"dia_query = \"SELECT MIN(midpointMjdTai) as first_detect, \" \\\n",
473+
" \"MAX(midpointMjdTai) as last_detect \" \\\n",
474+
" \"FROM dp1.DiaSource \" \\\n",
475+
" \"WHERE CONTAINS(POINT('ICRS', coord_ra, coord_dec), \" \\\n",
476+
" \"CIRCLE('ICRS',\"+str(ra)+\",\"+str(dec)+\",0.001)) = 1 \"\n",
479477
"\n",
480478
"dia_job = service.submit_job(dia_query)\n",
481479
"dia_job.run()\n",
482480
"dia_job.wait(phases=['COMPLETED', 'ERROR'])\n",
483481
"dia_results = dia_job.fetch_result().to_table()\n",
484482
"\n",
485-
"first_detect = dia_results['first_detect_time'][0]\n",
486-
"last_detect = dia_results['last_detect_time'][0]"
483+
"first_detect = dia_results['first_detect'][0]\n",
484+
"last_detect = dia_results['last_detect'][0]"
487485
]
488486
},
489487
{
@@ -521,8 +519,9 @@
521519
"metadata": {},
522520
"outputs": [],
523521
"source": [
524-
"if (not np.ma.is_masked(first_detect) and first_detect is not None and\n",
525-
" not np.ma.is_masked(last_detect) and last_detect is not None):\n",
522+
"if (not np.ma.is_masked(first_detect)\n",
523+
" and first_detect is not None and not np.ma.is_masked(last_detect)\n",
524+
" and last_detect is not None):\n",
526525
"\n",
527526
" tx = np.where(\n",
528527
" (lvl2_table['dataproduct_subtype'] == 'lsst.visit_image')\n",

0 commit comments

Comments
 (0)