qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py
def _execute_lua(self, _script: List[str], steps: int) -> np.ndarray:
        """
        This is the function that sends the Lua script to be executed and
        returns the corresponding data from the buffer.

        Args:
            _script: The Lua script to be executed.
            steps: Number of points.
        """
        nplc = self.nplc()
        linefreq = self.linefreq()
        _time_trace_extra_visa_timeout = self._extra_visa_timeout
        _factor = self._measurement_duration_factor
        estimated_measurement_duration = _factor*1000*steps*nplc/linefreq
        new_visa_timeout = (estimated_measurement_duration
                          + _time_trace_extra_visa_timeout)

        self.write(self.root_instrument._scriptwrapper(program=_script, debug=True))

        # now poll all the data
        # The problem is that a '\n' character might by chance be present in
        # the data
        fullsize = 4*steps + 3
        received = 0
        data = b''
        # we must wait for the script to execute
        with self.root_instrument.timeout.set_to(new_visa_timeout):
            while received < fullsize:
                data_temp = self.root_instrument.visa_handle.read_raw()
                received += len(data_temp)
                data += data_temp

        # From the manual p. 7-94, we know that a b'#0' is prepended
        # to the data and a b'\n' is appended
        data = data[2:-1]
        outdata = np.array(list(struct.iter_unpack('<f', data)))
        outdata = np.reshape(outdata, len(outdata))
        return outdata

        This is the function that sends the Lua script to be executed and
        returns the corresponding data from the buffer.

        Args:
            _script: The Lua script to be executed.
            steps: Number of points.
        
This is the function that sends the Lua script to be executed and
returns the corresponding data from the buffer.
This is the function that sends the Lua script to be executed and returns the corresponding data from the buffer .
def _execute_lua(self, _script: List[str], steps: int) -> np.ndarray:
        nplc = self.nplc()
        linefreq = self.linefreq()
        _time_trace_extra_visa_timeout = self._extra_visa_timeout
        _factor = self._measurement_duration_factor
        estimated_measurement_duration = _factor*1000*steps*nplc/linefreq
        new_visa_timeout = (estimated_measurement_duration
                          + _time_trace_extra_visa_timeout)
        self.write(self.root_instrument._scriptwrapper(program=_script, debug=True))
        fullsize = 4*steps + 3
        received = 0
        data = b''
        with self.root_instrument.timeout.set_to(new_visa_timeout):
            while received < fullsize:
                data_temp = self.root_instrument.visa_handle.read_raw()
                received += len(data_temp)
                data += data_temp
        data = data[2:-1]
        outdata = np.array(list(struct.iter_unpack('<f', data)))
        outdata = np.reshape(outdata, len(outdata))
        return outdata
def _execute_lua ( self , _script : List [ str ] , steps : int ) -> np . ndarray : nplc = self . nplc ( ) linefreq = self . linefreq ( ) _time_trace_extra_visa_timeout = self . _extra_visa_timeout _factor = self . _measurement_duration_factor estimated_measurement_duration = _factor * 1000 * steps * nplc / linefreq new_visa_timeout = ( estimated_measurement_duration + _time_trace_extra_visa_timeout ) self . write ( self . root_instrument . _scriptwrapper ( program = _script , debug = True ) ) fullsize = 4 * steps + 3 received = 0 data = b'' with self . root_instrument . timeout . set_to ( new_visa_timeout ) : while received < fullsize : data_temp = self . root_instrument . visa_handle . read_raw ( ) received += len ( data_temp ) data += data_temp data = data [ 2 : - 1 ] outdata = np . array ( list ( struct . iter_unpack ( '<f' , data ) ) ) outdata = np . reshape ( outdata , len ( outdata ) ) return outdata
This is the function that sends the Lua script to be executed and
returns the corresponding data from the buffer.
This is the function that sends the Lua script to be executed and returns the corresponding data from the buffer .
"""
        This is the function that sends the Lua script to be executed and
        returns the corresponding data from the buffer.

        Args:
            _script: The Lua script to be executed.
            steps: Number of points.
        """ # now poll all the data # The problem is that a '\n' character might by chance be present in # the data # we must wait for the script to execute # From the manual p. 7-94, we know that a b'#0' is prepended # to the data and a b'\n' is appended
self
_script
List[str]
The Lua script to be executed.
The Lua script to be executed .
steps
int
Number of points.
Number of points .