Skip to content

Commit

Permalink
More clever way to find the run number with most information to initi…
Browse files Browse the repository at this point in the history
…alize the DQM Bokeh app
  • Loading branch information
jlenain committed Aug 23, 2024
1 parent 71e5900 commit d361f7f
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/nectarchain/dqm/bokeh_app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,8 @@ def update_camera_displays(attr, old, new):
runids = sorted(list(db.keys()))

# First, get the run id with the most populated result dictionary
runid_max = runids[-1]
largest = 0
for runid in runids:
larger = 0
for k in db[runid].keys():
length = len(db[runid][k])
if length > larger:
larger = length
if larger > largest:
largest = larger
runid_max = runid
runid = runid_max
run_dict_lengths = [len(db[r].keys()) for r in runids]
runid = runids[np.argmax(run_dict_lengths)]

Check warning on line 64 in src/nectarchain/dqm/bokeh_app/main.py

View check run for this annotation

Codecov / codecov/patch

src/nectarchain/dqm/bokeh_app/main.py#L63-L64

Added lines #L63 - L64 were not covered by tests

# runid_input = NumericInput(value=db.root.keys()[-1], title="NectarCAM run number")
run_select = Select(value=runid, title="NectarCAM run number", options=runids)
Expand Down

0 comments on commit d361f7f

Please sign in to comment.