Skip to content

Commit c339bd0

Browse files
committed
updated 105_6
1 parent e055998 commit c339bd0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

DP1/100_How_to_Use_RSP_Tools/105_Image_reprocessing/105_6_Create_custom_coadd_images.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@
549549
"source": [
550550
"Users cannot write to the main DP1 Butler repository. Instead, make a writable repository where custom coadd outputs will be written. \n",
551551
"\n",
552-
"The call to `use_local_butler` sets a directory that will contain the local Butler repository, within the `$SCRATCH_DIR` temporary space (on the Rubin Science Platform, RSP) that gets deleted every Sunday morning (Pacific Time). 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 the Sunday cleaning time. \n",
552+
"The call to `use_local_butler` sets a directory that will contain the local Butler repository, within the `$SCRATCH_DIR` temporary space (on the Rubin Science Platform, RSP) that gets deleted every Sunday around noon Pacific Time. 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 the Sunday cleaning time. \n",
553553
"\n",
554554
"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",
555555
"\n",
@@ -563,11 +563,13 @@
563563
"metadata": {},
564564
"outputs": [],
565565
"source": [
566-
"scratch_path = Path(os.getenv(\"SCRATCH_DIR\"))\n",
566+
"scratch_dir = os.getenv(\"SCRATCH_DIR\")\n",
567+
"if scratch_dir is not None:\n",
568+
" scratch_path = Path(scratch_dir)\n",
567569
"\n",
568570
"if not scratch_path.exists():\n",
569571
" scratch_path.mkdir(parents=True)\n",
570-
" \n",
572+
"\n",
571573
"elif not scratch_path.is_dir():\n",
572574
" scratch_path.unlink()\n",
573575
" scratch_path.mkdir()"

0 commit comments

Comments
 (0)