missing default group and dynamic counters is problematic
'dynamic counters': counters created when calling controller.counters
property
If controller.counter_groups
doesn 't have a default
key then _get_counters_from_object
will trigger controller.counters
twice (double creation of counters) (see try: except below)
def _get_counters_from_object(arg):
"""Get the counters from a bliss object (typically a scan function
positional counter argument).
Arguments:
arg: Can be:
- a counter
- a counter namespace
- a controller, in which case:
- controller.groups.default namespace is used if it exists
- controller.counters namespace otherwise
- a measurementgroup
"""
counters = []
# breakpoint()
try:
counters = list(arg.counter_groups.default)
except AttributeError:
try:
counters = list(arg.counters)
except AttributeError:
pass