diff --git a/notebooks_tsqr/NightLog.ipynb b/notebooks_tsqr/NightLog.ipynb index 1e5889b..3bdeaa1 100644 --- a/notebooks_tsqr/NightLog.ipynb +++ b/notebooks_tsqr/NightLog.ipynb @@ -305,7 +305,8 @@ "# Exposure Tally\n", "md(f\"## Exposure Tally for all Instruments\")\n", "tally = await allsrc.night_tally_observation_gaps()\n", - "display(pd.DataFrame(tally))\n", + "if tally:\n", + " display(pd.DataFrame(tally))\n", "\n", "# Observation gaps\n", "gaps = allsrc.exp_src.get_observation_gaps()\n", @@ -332,13 +333,23 @@ "id": "17", "metadata": {}, "outputs": [], + "source": [ + "tally" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "18", + "metadata": {}, + "outputs": [], "source": [ "gaps" ] }, { "cell_type": "markdown", - "id": "18", + "id": "19", "metadata": {}, "source": [ "# Narrative Log\n" @@ -347,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "19", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -363,7 +374,7 @@ }, { "cell_type": "markdown", - "id": "20", + "id": "21", "metadata": {}, "source": [ "# Developer Only Section" @@ -371,7 +382,7 @@ }, { "cell_type": "markdown", - "id": "21", + "id": "22", "metadata": {}, "source": [ "## Where was this run?\n", @@ -387,7 +398,7 @@ { "cell_type": "code", "execution_count": null, - "id": "22", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -400,7 +411,7 @@ }, { "cell_type": "markdown", - "id": "23", + "id": "24", "metadata": {}, "source": [ "# Finale" @@ -409,7 +420,7 @@ { "cell_type": "code", "execution_count": null, - "id": "24", + "id": "25", "metadata": {}, "outputs": [], "source": [ diff --git a/python/lsst/ts/logging_and_reporting/all_sources.py b/python/lsst/ts/logging_and_reporting/all_sources.py index 7f88b16..4761961 100644 --- a/python/lsst/ts/logging_and_reporting/all_sources.py +++ b/python/lsst/ts/logging_and_reporting/all_sources.py @@ -80,7 +80,7 @@ async def night_tally_observation_gaps(self, verbose=True): ) if targets.empty: - return dict + return None num_slews = targets[["slewTime"]].astype(bool).sum(axis=0).squeeze() total_slew_seconds = targets[["slewTime"]].sum().squeeze()