diff --git a/setup.cfg b/setup.cfg index 5c2a17f..56ca3df 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,7 @@ install_requires = numpy scipy matplotlib - moku>=3.0.0 + moku>=3.2.0 h5py pyyaml pyserial diff --git a/src/splendaq/daq/_log_data.py b/src/splendaq/daq/_log_data.py index 1501e06..6402ef8 100644 --- a/src/splendaq/daq/_log_data.py +++ b/src/splendaq/daq/_log_data.py @@ -101,8 +101,8 @@ def __exit__(self, type, value, traceback): chan_list = [1, 2] for chan in chan_list: + self.DL.enable_input(chan, False) # disable inputs self.DL.generate_waveform(chan, 'Off') # disable outputs - self.DL.disable_channel(chan) # disable inputs self.DL.relinquish_ownership() @@ -164,7 +164,7 @@ def set_input_channels(self, channels, impedance="1MOhm", coupling="DC", disable_chans = [chan not in channels for chan in chan_list] for chan, disable in zip(chan_list, disable_chans): if disable: - self.DL.disable_channel(chan) + self.DL.enable_input(chan, False) else: ind = channels.index(chan) self.DL.set_frontend( @@ -405,7 +405,7 @@ def dc_settings(dc_level=0): 'dc_level': dc_level, } - def set_output_channel(self, channel, waveformtype, load="1MOhm", + def set_output_channel(self, channel, waveformtype, load="HiZ", **settings): """ Method to turn on an output channel and generate the speicified @@ -423,11 +423,11 @@ def set_output_channel(self, channel, waveformtype, load="1MOhm", The waveform type to generate, must be one of 'Sine', 'Square', 'Ramp', 'Pulse', 'DC'. Can also be set to 'Off' to turn the channel off. - load : str, optional - The load impedance to use for the output channel. For a - Moku:Pro or Moku:Lab, this must be one of '1MOhm' or - '50Ohm'. For a Moku:Go, this can only be '1MOhm'. Default - is '1MOhm'. + termination : str, optional + The waveform termination to use for the output channel. + For a Moku:Pro or Moku:Lab, this must be one of 'HiZ' or + '50Ohm'. For a Moku:Go, this can only be 'HiZ'. Default + is 'HiZ'. settings : dict The dictionary containing all of the settings needed for the specified waveform type. @@ -435,7 +435,7 @@ def set_output_channel(self, channel, waveformtype, load="1MOhm", """ if self._device in ["Moku:Pro", "Moku:Lab"]: - self.DL.set_output_load(channel, load) + self.DL.set_output_termination(channel, load) self.DL.generate_waveform( channel, waveformtype, @@ -489,12 +489,9 @@ def log_data(self, duration, savepath='./', comments='', # Wait for the logging session to progress by sleeping 0.5sec time.sleep(0.5) # Get current progress percentage and check if it's complete - try: - progress = self.DL.logging_progress() - remaining_time = progress['time_remaining'] - is_logging = remaining_time >= 0 - except: - is_logging = False + progress = self.DL.logging_progress() + remaining_time = progress['time_remaining'] + is_logging = remaining_time > 0 filenames.append(logfile['file_name'])