Skip to content

Commit

Permalink
Use the new Embargo Rack bucket for ComCamSim data
Browse files Browse the repository at this point in the history
New LSSTComCamSim data started to flow to Embargo Rack on 2024-06-17
night, while new LATISS data will go to the old /repo/embargo bucket
for the time being.
  • Loading branch information
hsinfang committed Jun 24, 2024
1 parent b3f873f commit 715fdd3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 4 additions & 1 deletion prompt-processing/history.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@
"metadata": {},
"outputs": [],
"source": [
"butler = Butler(\"/repo/embargo\", writeable=False)"
"if instrument == \"LATISS\":\n",
" butler = Butler(\"/repo/embargo\", writeable=False)\n",
"else:\n",
" butler = Butler(\"embargo_or4\", writeable=False)"
]
},
{
Expand Down
13 changes: 9 additions & 4 deletions prompt-processing/timing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@
"source": [
"from lsst.daf.butler import Butler\n",
"\n",
"butler = Butler(\"/repo/embargo\", writeable=False)"
"if instrument == \"LATISS\":\n",
" butler = Butler(\"/repo/embargo\", writeable=False)\n",
"else:\n",
" butler = Butler(\"embargo_or4\", writeable=False)"
]
},
{
Expand All @@ -118,8 +121,10 @@
" timestamps : `dict` [`int`, datetime]\n",
" The keys are the exposure_id\n",
" \"\"\"\n",
"\n",
" s3_endpoint = \"https://s3dfrgw.slac.stanford.edu\"\n",
" if instrument == \"LATISS\":\n",
" s3_endpoint = \"https://s3dfrgw.slac.stanford.edu\"\n",
" else:\n",
" s3_endpoint = \"https://sdfembs3.sdf.slac.stanford.edu\"\n",
" s3client = boto3.client(\"s3\", endpoint_url=s3_endpoint)\n",
" refs = butler.registry.queryDatasets(\n",
" datasetType=datasetType,\n",
Expand All @@ -137,7 +142,7 @@
" dimension = \"exposure\"\n",
" fits_uri = butler.getURI(ref)\n",
" time_written = s3client.head_object(\n",
" Bucket=fits_uri.netloc,\n",
" Bucket=fits_uri.netloc.split(\"@\")[-1],\n",
" Key=fits_uri.relativeToPathRoot,\n",
" )[\"LastModified\"]\n",
" timestamps.append((ref.dataId[dimension], ref.dataId[\"detector\"], time_written))\n",
Expand Down

0 comments on commit 715fdd3

Please sign in to comment.