diff --git a/slic/daq/counter.py b/slic/daq/counter.py index 24313b629..b310b820f 100644 --- a/slic/daq/counter.py +++ b/slic/daq/counter.py @@ -1,18 +1,24 @@ import os from abc import abstractmethod -from .basecounter import BaseCounter -from .utils import can_create_file, fix_hdf5_filename - +from ..utils.channels import Channels from .acquisition import Acquisition +from .basecounter import BaseCounter +from .utils import can_create_file, fix_hdf5_filename, SwissFELPaths class Counter(BaseCounter): - def __init__(self, default_channels=None, default_path="."): - self.default_channels = default_channels - self.default_path = default_path + def __init__(self, instrument, pgroup, default_channels=None, default_path=None): + paths = SwissFELPaths(instrument, pgroup) + + if not default_channels: + default_channel_list = paths.default_channel_list + default_channels = Channels(default_channel_list) + + if not default_path: + default_path = paths.raw def acquire(self, filename=None, channels=None, use_default_path=True, **kwargs):