|
22 | 22 | "Data Release: <a href=\"https://dp1.lsst.io/\">Data Preview 1</a> <br>\n", |
23 | 23 | "Container Size: large <br>\n", |
24 | 24 | "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", |
26 | 26 | "Repository: <a href=\"https://github.com/lsst/tutorial-notebooks\">github.com/lsst/tutorial-notebooks</a> <br>" |
27 | 27 | ] |
28 | 28 | }, |
|
469 | 469 | "metadata": {}, |
470 | 470 | "outputs": [], |
471 | 471 | "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", |
479 | 477 | "\n", |
480 | 478 | "dia_job = service.submit_job(dia_query)\n", |
481 | 479 | "dia_job.run()\n", |
482 | 480 | "dia_job.wait(phases=['COMPLETED', 'ERROR'])\n", |
483 | 481 | "dia_results = dia_job.fetch_result().to_table()\n", |
484 | 482 | "\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]" |
487 | 485 | ] |
488 | 486 | }, |
489 | 487 | { |
|
521 | 519 | "metadata": {}, |
522 | 520 | "outputs": [], |
523 | 521 | "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", |
526 | 525 | "\n", |
527 | 526 | " tx = np.where(\n", |
528 | 527 | " (lvl2_table['dataproduct_subtype'] == 'lsst.visit_image')\n", |
|
0 commit comments