qcodes/instrument_drivers/tektronix/Keithley_2600_channels.py
def _fast_sweep(self, start: float, stop: float, steps: int,
                    mode: str='IV') -> np.ndarray:
        """
        Perform a fast sweep using a deployed Lua script.
        This is the engine that forms the script, uploads it,
        runs it, collects the data, and casts the data correctly.

        Args:
            start: starting voltage
            stop: end voltage
            steps: number of steps
            mode: Type of sweep, either 'IV' (voltage sweep),
                'VI' (current sweep two probe setup) or
                'VIfourprobe' (current sweep four probe setup)
        """

        channel = self.channel

        # an extra visa query, a necessary precaution
        # to avoid timing out when waiting for long
        # measurements
        nplc = self.nplc()

        dV = (stop-start)/(steps-1)

        if mode == 'IV':
            meas = 'i'
            sour = 'v'
            func = '1'
            sense_mode = '0'

        if mode == 'VI':
            meas = 'v'
            sour = 'i'
            func = '0'
            sense_mode = '0'

        if mode == 'VIfourprobe':
            meas = 'v'
            sour = 'i'
            func = '0'
            sense_mode = '1'

        script = [f'{channel}.measure.nplc = {nplc:.12f}',
                  f'{channel}.source.output = 1',
                  f'startX = {start:.12f}',
                  f'dX = {dV:.12f}',
                  f'{channel}.sense = {sense_mode}',
                  f'{channel}.source.output = 1',
                  f'{channel}.source.func = {func}',
                  f'{channel}.measure.count = 1',
                  f'{channel}.nvbuffer1.clear()',
                  f'{channel}.nvbuffer1.appendmode = 1',
                  f'for index = 1, {steps} do',
                  '  target = startX + (index-1)*dX',
                  f'  {channel}.source.level{sour} = target',
                  '  {}.measure.{}({}.nvbuffer1)'.format(channel, meas,
                                                         channel),
                  'end',
                  'format.data = format.REAL32',
                  'format.byteorder = format.LITTLEENDIAN',
                  'printbuffer(1, {}, {}.nvbuffer1.readings)'.format(steps,
                                                                     channel)]

        return self._execute_lua(script, steps)

        Perform a fast sweep using a deployed Lua script.
        This is the engine that forms the script, uploads it,
        runs it, collects the data, and casts the data correctly.

        Args:
            start: starting voltage
            stop: end voltage
            steps: number of steps
            mode: Type of sweep, either 'IV' (voltage sweep),
                'VI' (current sweep two probe setup) or
                'VIfourprobe' (current sweep four probe setup)
        
Perform a fast sweep using a deployed Lua script.
This is the engine that forms the script, uploads it,
runs it, collects the data, and casts the data correctly.
Perform a fast sweep using a deployed Lua script . This is the engine that forms the script uploads it runs it collects the data and casts the data correctly .
def _fast_sweep(self, start: float, stop: float, steps: int,
                    mode: str='IV') -> np.ndarray:
        channel = self.channel
        nplc = self.nplc()
        dV = (stop-start)/(steps-1)
        if mode == 'IV':
            meas = 'i'
            sour = 'v'
            func = '1'
            sense_mode = '0'
        if mode == 'VI':
            meas = 'v'
            sour = 'i'
            func = '0'
            sense_mode = '0'
        if mode == 'VIfourprobe':
            meas = 'v'
            sour = 'i'
            func = '0'
            sense_mode = '1'
        script = [f'{channel}.measure.nplc = {nplc:.12f}',
                  f'{channel}.source.output = 1',
                  f'startX = {start:.12f}',
                  f'dX = {dV:.12f}',
                  f'{channel}.sense = {sense_mode}',
                  f'{channel}.source.output = 1',
                  f'{channel}.source.func = {func}',
                  f'{channel}.measure.count = 1',
                  f'{channel}.nvbuffer1.clear()',
                  f'{channel}.nvbuffer1.appendmode = 1',
                  f'for index = 1, {steps} do',
                  '  target = startX + (index-1)*dX',
                  f'  {channel}.source.level{sour} = target',
                  '  {}.measure.{}({}.nvbuffer1)'.format(channel, meas,
                                                         channel),
                  'end',
                  'format.data = format.REAL32',
                  'format.byteorder = format.LITTLEENDIAN',
                  'printbuffer(1, {}, {}.nvbuffer1.readings)'.format(steps,
                                                                     channel)]
        return self._execute_lua(script, steps)
def _fast_sweep ( self , start : float , stop : float , steps : int , mode : str = 'IV' ) -> np . ndarray : channel = self . channel nplc = self . nplc ( ) dV = ( stop - start ) / ( steps - 1 ) if mode == 'IV' : meas = 'i' sour = 'v' func = '1' sense_mode = '0' if mode == 'VI' : meas = 'v' sour = 'i' func = '0' sense_mode = '0' if mode == 'VIfourprobe' : meas = 'v' sour = 'i' func = '0' sense_mode = '1' script = [ f'{channel}.measure.nplc = {nplc:.12f}' , f'{channel}.source.output = 1' , f'startX = {start:.12f}' , f'dX = {dV:.12f}' , f'{channel}.sense = {sense_mode}' , f'{channel}.source.output = 1' , f'{channel}.source.func = {func}' , f'{channel}.measure.count = 1' , f'{channel}.nvbuffer1.clear()' , f'{channel}.nvbuffer1.appendmode = 1' , f'for index = 1, {steps} do' , '  target = startX + (index-1)*dX' , f'  {channel}.source.level{sour} = target' , '  {}.measure.{}({}.nvbuffer1)' . format ( channel , meas , channel ) , 'end' , 'format.data = format.REAL32' , 'format.byteorder = format.LITTLEENDIAN' , 'printbuffer(1, {}, {}.nvbuffer1.readings)' . format ( steps , channel ) ] return self . _execute_lua ( script , steps )
Perform a fast sweep using a deployed Lua script.
Perform a fast sweep using a deployed Lua script .
"""
        Perform a fast sweep using a deployed Lua script.
        This is the engine that forms the script, uploads it,
        runs it, collects the data, and casts the data correctly.

        Args:
            start: starting voltage
            stop: end voltage
            steps: number of steps
            mode: Type of sweep, either 'IV' (voltage sweep),
                'VI' (current sweep two probe setup) or
                'VIfourprobe' (current sweep four probe setup)
        """ # an extra visa query, a necessary precaution # to avoid timing out when waiting for long # measurements
self
start
float
None
stop
float
None
steps
int
number of steps
number of steps
mode
str
Type of sweep, either 'IV' (voltage sweep),
'VI' (current sweep two probe setup) or
'VIfourprobe' (current sweep four probe setup)
Type of sweep either ' IV ' ( voltage sweep ) ' VI ' ( current sweep two probe setup ) or ' VIfourprobe ' ( current sweep four probe setup )