|
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: 2025-09-02 <br>\n", |
| 25 | + "Last verified to run: 2026-04-07 <br>\n", |
26 | 26 | "Repository: <a href=\"https://github.com/lsst/tutorial-notebooks\">github.com/lsst/tutorial-notebooks</a> <br>" |
27 | 27 | ] |
28 | 28 | }, |
|
547 | 547 | "id": "85394b0f-7222-4624-89af-4c1f9c70d7d8", |
548 | 548 | "metadata": {}, |
549 | 549 | "source": [ |
550 | | - "Users cannot write to the main DP1 Butler repository. Instead, make a writable repository where custom coadd outputs will be written. The call to `use_local_butler` creates a new directory that will contain the local Butler repository, within the `$SCRATCH_DIR` temporary space that gets deleted weekly. Use this temporary space because the custom coadd processing produces of order a gigabyte of intermediate files." |
| 550 | + "Users cannot write to the main DP1 Butler repository. Instead, make a writable repository where custom coadd outputs will be written. \n", |
| 551 | + "\n", |
| 552 | + "The call to `use_local_butler` sets a directory that will contain the local Butler repository, within the `$SCRATCH_DIR` temporary space that gets deleted every Sunday. Use this temporary space because the custom coadd processing produces of order a gigabyte of intermediate files. Do not run this step (and following steps) right before or during Sunday cleaning time. \n", |
| 553 | + "\n", |
| 554 | + "Note `use_local_butler` does not create a top-level directory, but rather one in the scratch space; it does not create `$SCRATCH_DIR`. Thus, check whether that user scratch exists first before using it and create it if it does not.\n", |
| 555 | + "\n", |
| 556 | + "Remove and recreate `scratch_path` if somehow it is not a directory but does exist. " |
| 557 | + ] |
| 558 | + }, |
| 559 | + { |
| 560 | + "cell_type": "code", |
| 561 | + "execution_count": null, |
| 562 | + "id": "108cb108-1ee3-4164-b6e9-b6a01a9fe639", |
| 563 | + "metadata": {}, |
| 564 | + "outputs": [], |
| 565 | + "source": [ |
| 566 | + "scratch_path = Path(os.getenv(\"SCRATCH_DIR\"))\n", |
| 567 | + "\n", |
| 568 | + "if not scratch_path.exists():\n", |
| 569 | + " scratch_path.mkdir(parents=True)\n", |
| 570 | + " \n", |
| 571 | + "elif not scratch_path.is_dir():\n", |
| 572 | + " scratch_path.unlink()\n", |
| 573 | + " scratch_path.mkdir()" |
| 574 | + ] |
| 575 | + }, |
| 576 | + { |
| 577 | + "cell_type": "markdown", |
| 578 | + "id": "a055e8f6-865e-4658-a814-aa928ca44c8d", |
| 579 | + "metadata": {}, |
| 580 | + "source": [ |
| 581 | + "Set the directory that will contain the local Butler repository." |
551 | 582 | ] |
552 | 583 | }, |
553 | 584 | { |
|
557 | 588 | "metadata": {}, |
558 | 589 | "outputs": [], |
559 | 590 | "source": [ |
560 | | - "local_repo_path = Path(os.getenv(\"SCRATCH_DIR\"), \"my_local_repo\")\n", |
| 591 | + "local_repo_path = Path(scratch_path, \"my_local_repo\")\n", |
561 | 592 | "out_butler = executor.use_local_butler(local_repo_path)" |
562 | 593 | ] |
563 | 594 | }, |
|
625 | 656 | "fig = plt.figure(figsize=(10, 8))\n", |
626 | 657 | "afw_display = afwDisplay.Display(frame=fig)\n", |
627 | 658 | "afw_display.scale('asinh', 'zscale')\n", |
628 | | - "afw_display.mtv(deepCoadd.image)\n", |
| 659 | + "afw_display.image(deepCoadd.image)\n", |
629 | 660 | "plt.gca().axis('on')\n", |
630 | 661 | "plt.show()" |
631 | 662 | ] |
|
736 | 767 | "metadata": {}, |
737 | 768 | "outputs": [], |
738 | 769 | "source": [ |
739 | | - "%reset -f\n", |
740 | | - "! rm -r $SCRATCH_DIR/my_local_repo" |
| 770 | + "# %reset -f\n", |
| 771 | + "# ! rm -r $SCRATCH_DIR/my_local_repo" |
741 | 772 | ] |
742 | 773 | } |
743 | 774 | ], |
|
0 commit comments