Skip to content

Commit 3aa5cf5

Browse files
committed
Allow CollDBs with a single collimator
1 parent dcaf612 commit 3aa5cf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xcoll/colldb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def _dict_keys_to_lower(dct):
3636
else:
3737
return dct
3838

39-
39+
# TODO: need better handling of beam argument (not hardcoded 'b1' and 'b2' strings)
4040
def _get_coll_dct_by_beam(coll, beam):
4141
# The dictionary can be a CollimatorDatabase for a single beam (beam=None)
4242
# or for both beams (beam='b1' or beam='b2)
@@ -51,7 +51,7 @@ def _get_coll_dct_by_beam(coll, beam):
5151
raise ValueError("Need to specify a beam, because the given dict is for both beams!")
5252
return coll[beam]
5353

54-
elif len(beam_in_db) == 1:
54+
elif len(beam_in_db) == 1 and beam_in_db[0].lower() in ['b1','b2']:
5555
if beam is None:
5656
beam = beam_in_db[0].lower()
5757
elif beam != beam_in_db[0].lower():

0 commit comments

Comments
 (0)