Skip to content

Commit

Permalink
fix Time Account when no exposures
Browse files Browse the repository at this point in the history
  • Loading branch information
pothiers committed Jan 27, 2025
1 parent 326ea8d commit 94bda39
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
8 changes: 2 additions & 6 deletions notebooks_tsqr/NightLog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"The __goal of this page__ is to provide users the ability to quickly see \n",
"_\"a summary of what happened on the dome during the previous night\"_. See [MORE About this page](#More-about-this-page)\n",
"## What has been added recently?\n",
"- a little face lift. Data sources. Internal cross linking.\n",
"- Internal cross linking. Report data sources used for most sections.\n",
"- See also: [Previously added](#Previously-Added)"
]
},
Expand Down Expand Up @@ -370,11 +370,7 @@
"cell_type": "code",
"execution_count": null,
"id": "22",
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"mstr = \"\"\n",
Expand Down
17 changes: 11 additions & 6 deletions python/lsst/ts/logging_and_reporting/all_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,17 @@ def time_account(self, verbose=False):
total_observable_hours = self.alm_src.night_hours
used_instruments = self.exposed_instruments()
if len(used_instruments) == 0:
return {
"": {
"Total night": ut.hhmmss(total_observable_hours),
"Idle time": ut.hhmmss(total_observable_hours),
}
}
df = pd.DataFrame.from_records(
[
{
"Total night": ut.hhmmss(total_observable_hours),
"Idle time": ut.hhmmss(total_observable_hours),
}
]
)
footnotes = {}
return (df, footnotes)

# Scot says use 2.41 sec/exposure in slack #consolidated-database
exp_readout_hours = 2.41 / (60 * 60.0) # hrs per exposure

Expand Down

0 comments on commit 94bda39

Please sign in to comment.