diff --git a/prompt-processing/history.ipynb b/prompt-processing/history.ipynb index 5bad2a0..d296358 100644 --- a/prompt-processing/history.ipynb +++ b/prompt-processing/history.ipynb @@ -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)" ] }, { diff --git a/prompt-processing/timing.ipynb b/prompt-processing/timing.ipynb index 0adf377..44ef70c 100644 --- a/prompt-processing/timing.ipynb +++ b/prompt-processing/timing.ipynb @@ -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)" ] }, { @@ -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", @@ -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",