Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pothiers committed Oct 30, 2024
1 parent b299fe8 commit c55eed9
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 21 deletions.
40 changes: 32 additions & 8 deletions notebooks_tsqr/ExposureDetail.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
"# When running under Times Square, install pkg from github.\n",
"# Otherwise use what is installed locally (intended to be dev editiable pkg)\n",
"if os.environ.get(\"EXTERNAL_INSTANCE_URL\"):\n",
" print(\n",
" 'Installing \"lsst.ts.logging_and_reporting\" from github using \"prototype\" branch....'\n",
" )\n",
" print(\n",
" dev_msg = (\n",
" 'Installing \"lsst.ts.logging_and_reporting\" from github using \"prototype\" branch. \\n'\n",
" \"TODO: Make the need for this go away by getting Logging_and_Reporting installed in RSP.\"\n",
" )\n",
" !pip install --upgrade git+https://github.com/lsst-ts/ts_logging_and_reporting.git@prototype > /dev/null 2>&1\n",
"else:\n",
" dev_msg = \"Imported lsst.ts.logging_and_reporting from local packages.\"\n",
"import lsst.ts.logging_and_reporting.source_adapters as sad\n",
"import lsst.ts.logging_and_reporting.utils as ut\n",
"from lsst.ts.logging_and_reporting.reports import md\n",
Expand Down Expand Up @@ -105,9 +105,7 @@
" min_dayobs=min_day_obs,\n",
" max_dayobs=max_day_obs,\n",
" limit=5000,\n",
")\n",
"\n",
"print({k: len(v) for k, v in src_exp.exposures.items()})"
")"
]
},
{
Expand Down Expand Up @@ -135,16 +133,42 @@
"-----------------"
]
},
{
"cell_type": "markdown",
"id": "6",
"metadata": {},
"source": [
"# Developer Only Section"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
"print(src_exp)\n",
"print(f\"{instrument=}, {science_program=}, {observation_reason=}, {observation_type=}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8",
"metadata": {},
"outputs": [],
"source": [
"print({k: len(v) for k, v in src_exp.exposures.items()})"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
15 changes: 6 additions & 9 deletions notebooks_tsqr/NightLog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@
"# When running under Times Square, install pkg from github.\n",
"# Otherwise use what is installed locally (intended to be dev editiable pkg)\n",
"if os.environ.get(\"EXTERNAL_INSTANCE_URL\"):\n",
" print(\n",
" 'Installing \"lsst.ts.logging_and_reporting\" from github using \"prototype\" branch....'\n",
" )\n",
" print(\n",
" dev_msg = (\n",
" 'Installing \"lsst.ts.logging_and_reporting\" from github using \"prototype\" branch. \\n'\n",
" \"TODO: Make the need for this go away by getting Logging_and_Reporting installed in RSP.\"\n",
" )\n",
" !pip install --upgrade git+https://github.com/lsst-ts/ts_logging_and_reporting.git@prototype > /dev/null 2>&1\n",
"else:\n",
" dev_msg = \"Imported lsst.ts.logging_and_reporting from local packages.\"\n",
"from lsst.ts.logging_and_reporting.all_sources import AllSources\n",
"from lsst.ts.logging_and_reporting.all_reports import AllReports\n",
"import lsst.ts.logging_and_reporting.utils as ut\n",
Expand Down Expand Up @@ -475,13 +475,10 @@
"cell_type": "code",
"execution_count": null,
"id": "33",
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"print(dev_msg)\n",
"try:\n",
" import lsst.ts.logging_and_reporting.version\n",
"\n",
Expand Down
8 changes: 4 additions & 4 deletions python/lsst/ts/logging_and_reporting/source_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,10 @@ def exposure_detail(
)
)
]
print(
f"DEBUG exp_src.exposure_detail(): "
f"{len(self.exposures[instrument])} => {len(recs)} "
)
# print(
# f"DEBUG exp_src.exposure_detail(): "
# f"{len(self.exposures[instrument])} => {len(recs)} "
# )

if len(recs) > 0:
df = pd.DataFrame(recs)[fields]
Expand Down

0 comments on commit c55eed9

Please sign in to comment.