def init_devices(self): from Devices import Clock, Thermometer,\ LCR_LockIn, LCR_HIOKI deviceName = self.get_parameter_value('Chopper device') if deviceName == 'SRS Lock-In Amp': self.Channel = LCR_LockIn() self.append_active_devices_list(self.Channel) if deviceName == 'HIOKI LCR HI-TESTER': self.Channel = LCR_HIOKI() self.append_active_devices_list(self.Channel) #from instruments.Keithley import Electrometer617 #from instruments.Agilent import A34401_4ohm ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments #PeltierP = PID_CBdriver(TCchannel=1, count=20) #PeltierP.Activate() self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper)
def init_devices(self): from Devices import Clock, Thermostat self.Thermostat = Thermostat() self.append_active_devices_list(self.Thermostat) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch)
def init_devices(self): from Devices import Clock, Thermometer, LCR_LockIn_Agilent ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments self.LCR = LCR_LockIn_Agilent() self.append_active_devices_list(self.LCR) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper)
def init_devices(self): from Devices import Clock, Thermometer, SMU_FET_tester ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments # self.Channel = SMU_channelA() # self.append_active_devices_list(self.Channel) # self.Gate = SMU_channelB() # self.append_active_devices_list(self.Gate) # self.FET = SMU_FET_tester() self.append_active_devices_list(self.FET) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper)
def init_devices(self): from Devices import Clock, Thermometer, PowerSource,\ Monochromator, LockIn,\ HamamatsuPhotodiode, GeneratorSquare self.Channel = LockIn() self.append_active_devices_list(self.Channel) deviceName = self.get_parameter_value('Chopper device') if deviceName == 'Wheel chopper SR530': self.Filter = Monochromator() self.append_active_devices_list(self.Filter) self.Lamp = PowerSource() self.append_active_devices_list(self.Lamp) if deviceName == 'Agilent 33220A Waveform generator': self.Filter = Monochromator() self.append_active_devices_list(self.Filter) self.Chopper = GeneratorSquare() self.append_active_devices_list(self.Chopper) #from instruments.Keithley import Electrometer617 #from instruments.Agilent import A34401_4ohm ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments #PeltierP = PID_CBdriver(TCchannel=1, count=20) #PeltierP.Activate() self.LightMeter = HamamatsuPhotodiode() self.append_active_devices_list(self.LightMeter) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper)
def init_devices(self): from Devices import Electrometer, Clock, Thermometer, PowerSource,\ SMU_channelA, SMU_channelB, Monochromator, LockIn,\ HamamatsuPhotodiode deviceName = self.get_parameter_value('Device') if deviceName == 'Keithley 617': self.Channel = Electrometer() self.append_active_devices_list(self.Channel) if deviceName == 'SR830 Lock In Amplifier': self.Channel = LockIn() self.append_active_devices_list(self.Channel) if deviceName == 'Keithley 2602 - channel A': self.Channel = SMU_channelA() self.append_active_devices_list(self.Channel) if deviceName == 'Keithley 2602 - channel B': self.Channel = SMU_channelB() self.append_active_devices_list(self.Channel) #from instruments.Keithley import Electrometer617 #from instruments.Agilent import A34401_4ohm ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments #PeltierP = PID_CBdriver(TCchannel=1, count=20) #PeltierP.Activate() self.Filter = Monochromator() self.append_active_devices_list(self.Filter) self.LightMeter = HamamatsuPhotodiode() self.append_active_devices_list(self.LightMeter) self.Lamp = PowerSource() self.append_active_devices_list(self.Lamp) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper)
class Test(TestScript): def __init__(self): TestScript.__init__(self) self.Name = 'RRT protocol output chars of FET' self.Description = """Filed-effect transistor 'output' and 'transfer' characteristic Intended for fast scans utilizing the Keithley dual source meter (K 2602) unit with built in TSP programming \nSpecialized for the FlexNet RRT""" return def init_parameters(self): """ create the list of the parameter and initialize some basic values """ #voltages, acquizDelay=0.1, voltStepDelay=5 self.generate_parameter( Name='Source-Drain (ChA) voltages', Unit='Volts', Type='float', Iterable=True, Limits=[40, -40, None], Description= 'List of voltages (in Volts) to be applied to the sample given order, usually between Source-Drain' ) #self.set_parameter_value('Source-Drain (ChA) voltages', [0.1,0.2]) self.generate_parameter( Name='Gate-Source (ChB) voltages', Unit='Volts', Type='float', Iterable=True, Limits=[40, -40, None], Description= """List of voltages (in Volts) to be applied to the sample given order, Usually between Source and Gate. This voltage is held constant, while testing a sequence of Source-Drain (ChA) voltages, then the next channel 'B' voltage is applied and cycle of Source-Drain (ChA) voltages is repeated.""" ) #self.set_parameter_value('Gate-Source (ChB) voltages', [0.1,0.2]) self.generate_parameter( Name='Source-Drain settle time', Unit='Seconds', Type='float', Iterable=False, Limits=[None, 0.001, None], Description='delay between the voltage steps in seconds') self.set_parameter_value('Source-Drain settle time', 0.1) self.generate_parameter( Name='Gate-Source settle time', Unit='Seconds', Type='float', Iterable=False, Limits=[None, 0.001, None], Description= 'delay between the voltage steps of the Channel in seconds') self.set_parameter_value('Gate-Source settle time', 1.0) self.generate_parameter( Name='Current integration time', Unit='NPLC', Type='float', Iterable=False, Limits=[25.0, 0.001, None], Description= 'Integration time of current measurement in NPLC \nNumber of Power Line Cycles, 1 PLC = 20 ms.' ) self.set_parameter_value('Current integration time', 1) # self.generate_parameter(Name='Device', # Unit='name', # Type='name', # Iterable = False, # Limits = [ None, None, ['Keithley 617','Keithley 2602 - channel A','Keithley 2602 - channel A, fast sweep','Keithley 2602 - channel B','Keithley 2602 - channel B, fast sweep','TTi TSX3510P']], # Description='Device to measure the current voltage characteristics with') # self.set_parameter_value('Device', 'Keithley 617') return def init_devices(self): from Devices import Clock, Thermometer, SMU_FET_tester ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments # self.Channel = SMU_channelA() # self.append_active_devices_list(self.Channel) # self.Gate = SMU_channelB() # self.append_active_devices_list(self.Gate) # self.FET = SMU_FET_tester() self.append_active_devices_list(self.FET) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper) def _run(self): """ simple current-voltage characteristics measurement """ ################################################################ ## Here begins the experimetal part ########################### ################################################################ # switch on the voltage source: SDvoltages = self.get_parameter_value('Source-Drain (ChA) voltages') self.FET.Upload_source_drain_voltages(SDvoltages) Gvoltages = self.get_parameter_value('Gate-Source (ChB) voltages') SDwait = self.get_parameter_value('Source-Drain settle time') Gwait = self.get_parameter_value('Gate-Source settle time') Integr = self.get_parameter_value('Current integration time') self.FET.cfg_measure_current_integration_time(NPLC=Integr) self.datastore.report( 'Starting new FET measurement of I-V characteristic S-D for various Gate voltages' ) self.FET.set_volts(0.0, channel='a') self.FET.set_volts(0.0, channel='b') self.FET.set_output_on(channel='b') # set gate channel B output ON self.Stopwatch.zeroTimer() for Vgate in Gvoltages: self.datastore.report('applying Gate voltage = %0.3f V' % Vgate) self.FET.set_volts(Vgate, channel='b') self.Stopwatch.Wait(Gwait) self.Stopwatch.Measure() self.Temper.Measure() self.FET.MeasureSweepChannelA(SDsettle_time=SDwait) self.datastore.acquireData() self.datastore.separateData() self.FET.set_output_off(channel='b') self.FET.set_output_off(channel='a') #self.Channel.set_output_off() self.datastore.report('Experiment finished') return
class Test(TestScript): def __init__(self): TestScript.__init__(self) self.Name = 'Temperature control' self.Description = """Sets the thermostat temperature and waits for stabilization""" return def init_parameters(self): """ create the list of the parameter and initialize some basic values """ self.generate_parameter(Name='NEW temperature', Unit='Celsius', Type='float', Iterable = False, Limits = [ 120, -40.0, None], Description='Temperature to be reached by HAAKE thermostat inside the sample chamber') self.set_parameter_value('NEW temperature', 0.05) self.generate_parameter(Name='Acquisition delay', Unit='Seconds', Type='float', Iterable = False, Limits = [ None, None, [1, 2, 5, 10, 20, 40]], Description='delay of the subsequent temperature readings in seconds') self.set_parameter_value('Acquisition delay', 2) self.generate_parameter(Name='Stabilization period', Unit='Minutes', Type='float', Iterable = False, Limits = [ None, 1.0, None], Description='How long the reached stable temperature should be kept') self.set_parameter_value('Stabilization period', 5.0) self.generate_parameter(Name='Stabilization tolerance', Unit='Celsius', Type='float', Iterable = False, Limits = [ None, 0.01, None], Description='How how much the temperature can vary in the "stabilized" condition') self.set_parameter_value('Stabilization tolerance', 0.05) return def init_devices(self): from Devices import Clock, Thermostat self.Thermostat = Thermostat() self.append_active_devices_list(self.Thermostat) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) def _run(self): """ simple current-voltage characteristics measurement """ ################################################################ ## Here begins the experimetal part ########################### ################################################################ Setpoint = self.get_parameter_value('NEW temperature') WaitDAQ = self.get_parameter_value('Acquisition delay') WaitSetpoint = self.get_parameter_value('Stabilization period') Tolerance = self.get_parameter_value('Stabilization tolerance') WaitSetpointSeconds = WaitSetpoint * 60.0 self.datastore.report('Setting the thermostat HAAKE to NEW temperature setpoint: %(Setpoint)+0.2f degrees Celsius' % \ {'Setpoint':Setpoint}) self.Thermostat.set_regulation_external() self.Thermostat.set_regulation_on() self.Thermostat.set_setpoint(Setpoint) self.Thermostat.Measure() self.Stopwatch.Measure() self.datastore.acquireData() # get the timer key: keyTimer = self.Stopwatch.Readings.keys()[0] keyTemperature = 'HAAKEtempEXT(degC)' # main data acquisistion loop while True: # periodically check the actual tempearure and evaluate the deviation self.Stopwatch.Wait(WaitDAQ) self.Thermostat.Measure() self.Stopwatch.Measure() self.datastore.acquireData() # get the timestaps of the temperature readings: timestamps = self.datastore.datagram.extract_data(key=keyTimer) historicalTimestamp = timestamps[-1] - WaitSetpointSeconds # if the measurement history is long enough, find an index if historicalTimestamp > 0: # if the measurement history is long enough, find an index of recent reading historicalIndex = numpy.searchsorted(timestamps,historicalTimestamp) historicalTemperatures = self.datastore.datagram.extract_data(key=keyTemperature,from_to=([historicalIndex,None])) #filter for reading errors historicalTemperatures = numpy.delete(historicalTemperatures, numpy.argwhere(historicalTemperatures==-1e999)) # calcualte the root mean square of the deviation of the recent temperature readings : TempSTD = numpy.std(historicalTemperatures) #self.datastore.report('%d, %f, %f' % historicalIndex, historicalTimestamp, TempSTD) print 'standard deviation of measured temperature:', TempSTD if len(historicalTemperatures) > 2: if TempSTD < Tolerance: break return
class Test(TestScript): def __init__(self): TestScript.__init__(self) self.Name = 'Modulated photocurrent frequency spectrum' self.Description = """Measurement of the modulation frequency spectrum of photocurrent""" return def init_parameters(self): """ create the list of the parameter and initialize some basic values """ #voltages, acquizDelay=0.1, voltStepDelay=5 self.generate_parameter(Name='Tested wavelength', Unit='nm', Type='float', Iterable = False, Limits = [ 1200, 200, None], Description='Wavelengths to irradiate the sample with') self.set_parameter_value('Tested wavelength', 800) self.generate_parameter(Name='Tested frequencies', Unit='Hz', Type='float', Iterable = True, Limits = [ 1e5, 0.01, None], Description='Light chopper modulation frequencies') #self.set_parameter_value('Tested frequencies', 64) self.generate_parameter(Name='Lamp voltage', Unit='Volts', Type='float', Iterable = False, Limits = [ 20, 0.0, None], Description='Voltage to be applied to the light source (Tungsten Lamp, or LED)') self.set_parameter_value('Lamp voltage', 20.0) self.generate_parameter(Name='Lamp voltage offset', Unit='Volts', Type='float', Iterable = False, Limits = [ 5, 0.0, None], Description='Offset voltage to be applied to the LED light source in case of Agilent Waveform generator is used') self.set_parameter_value('Lamp voltage offset', 0.0) self.generate_parameter(Name='Acquisition delay', Unit='Seconds', Type='float', Iterable = False, Limits = [ None, None, [0.01, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0]], Description='delay of the data acquizition loop in seconds') self.set_parameter_value('Acquisition delay', 2.0) self.generate_parameter(Name='Settle time frequency', Unit='Seconds', Type='float', Iterable = False, Limits = [ None, 0.001, None], Description='Delay to settle signal at each frequency in seconds') self.set_parameter_value('Settle time frequency', 5.0) self.generate_parameter(Name='Settle time DC volts', Unit='Seconds', Type='float', Iterable = False, Limits = [ None, 0.001, None], Description='Delay before the irradiation starts, with applied voltage to settle the current (in seconds)') self.set_parameter_value('Settle time DC volts', 5.0) self.generate_parameter(Name='DC voltage', Unit='Volts', Type='float', Iterable = False, Limits = [ 10.5, -10.5, None], Description='DC voltage to be applied to the sample from AUX OUT 1 of the LockIn Apmlifier') self.set_parameter_value('DC voltage', 0.0) self.generate_parameter(Name='Chopper device', Unit='', Type='name', Iterable = False, Limits = [ None, None, ['Wheel chopper SR530','Agilent 33220A Waveform generator']], Description="""Device to provide modulation of irradiation. In case of Wheel chopper, the wavelength will be adjusted by monochromator and chopper frequency will be adjusted by LockIn AUX OUT 2 (0.6 - 10.5 V) connected to the control voltage input of the wheel controler. In case of Agilent 33220A Waveform generator, the set frequencies will be selected on the output terminal of the device, e.g. to feed LED""") self.set_parameter_value('Chopper device', 'Wheel chopper SR530') return def init_devices(self): from Devices import Clock, Thermometer, PowerSource,\ Monochromator, LockIn,\ HamamatsuPhotodiode, GeneratorSquare self.Channel = LockIn() self.append_active_devices_list(self.Channel) deviceName = self.get_parameter_value('Chopper device') if deviceName == 'Wheel chopper SR530': self.Filter = Monochromator() self.append_active_devices_list(self.Filter) self.Lamp = PowerSource() self.append_active_devices_list(self.Lamp) if deviceName == 'Agilent 33220A Waveform generator': self.Filter = Monochromator() self.append_active_devices_list(self.Filter) self.Chopper = GeneratorSquare() self.append_active_devices_list(self.Chopper) #from instruments.Keithley import Electrometer617 #from instruments.Agilent import A34401_4ohm ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments #PeltierP = PID_CBdriver(TCchannel=1, count=20) #PeltierP.Activate() self.LightMeter = HamamatsuPhotodiode() self.append_active_devices_list(self.LightMeter) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper) def _run(self): """ simple current-voltage characteristics measurement """ ################################################################ ## Here begins the experimetal part ########################### ################################################################ deviceName = self.get_parameter_value('Chopper device') Wavelength = self.get_parameter_value('Tested wavelength') Frequencies = self.get_parameter_value('Tested frequencies') DCvoltage = self.get_parameter_value('DC voltage') LampVolt = self.get_parameter_value('Lamp voltage') LampOffset = self.get_parameter_value('Lamp voltage offset') WaitDC = self.get_parameter_value('Settle time DC volts') WaitWL = self.get_parameter_value('Settle time frequency') WaitDAQ = self.get_parameter_value('Acquisition delay') # parameters for recalcualtion of the frequencies to the voltages: WheelChopperVoltageCoeff = 0.005 WheelChopperVoltageOffset = 0.0 self.datastore.report('Using device "%(device)s" for modulation' % \ {'device':deviceName}) # initializing the measurement for given instrument: if deviceName == 'Wheel chopper SR530': self.Filter.close_shutter() self.Filter.set_wave(Wavelength) self.Lamp.set_volts(LampVolt) self.Lamp.set_amperes_limit(10) self.Lamp.set_output_on() # calculate the voltages set to regulate frequencies self.Channel.set_aux_output(2, 1.0) self.Filter.open_shutter() self.Stopwatch.Wait(3) # initializing the measurement for given instrument: if deviceName == 'Agilent 33220A Waveform generator': self.Filter.close_shutter() self.Filter.set_wave(Wavelength) self.Chopper.set_duty_cycle(50) self.Chopper.set_freq(1000) LEDamplitude = LampVolt - LampOffset LEDoffset = LampOffset self.Chopper.set_amplitude_vrms(LEDamplitude) self.Chopper.set_offset(LEDoffset) self.Chopper.set_output_on() self.Filter.open_shutter() self.Stopwatch.Wait(3) # apply DC voltage to the sample and # measure during 1kHz irradiation self.datastore.report('Stabilizing the DC voltage at the sample, irradiation modulation at 1 kHz' ) self.Channel.set_aux_output(channel=1, voltage=DCvoltage) self.datastore.report('Irradiation wavelength %0.1f nm' % Wavelength ) self.observe(WaitDC,WaitDAQ) #self.datastore.report ('estimation of LockIn amplifier gain for desired Frequencies:') self.datastore.report('Starting the modulated photocurrent spectra measurement from %(from)f to %(to)f Hz' % \ {'from':Frequencies[0], 'to':Frequencies[-1]}) self.datastore.report ('Starting Frequency scanning:') for freq in Frequencies: if deviceName == 'Wheel chopper SR530': ChopperVoltage = freq * WheelChopperVoltageCoeff + WheelChopperVoltageOffset self.Channel.set_aux_output(channel=2, voltage=ChopperVoltage) if deviceName == 'Agilent 33220A Waveform generator': self.Chopper.set_freq(freq) self.Stopwatch.Wait(0.1) self.datastore.report ('Set New frequency: %0.1f' % freq) if freq > 9.99: gain = self.Channel.auto_gain() self.datastore.report('Found new Lock-In Amplifier GAIN: %d' % gain) else: gain = self.Channel.get_gain() self.datastore.report('Kept old Lock-In Amplifier GAIN: %d' % gain) minimumWait = WaitWL + 10/freq self.observe(WaitWL, WaitDAQ) self.datastore.separateData() self.datastore.report ('Experiment finished') self.Channel.set_aux_output(channel=1, voltage=0.0) if deviceName == 'Wheel chopper SR530': #self.Lamp.set_output_off() #self.Filter.close_shutter() self.Channel.set_aux_output(channel=2, voltage=1.0) if deviceName == 'Agilent 33220A Waveform generator': #self.Chopper.set_output_off() pass #self.datastore.report('finished the Modulated frequency photocurrent spectrum measurement') return
class Test(TestScript): def __init__(self): TestScript.__init__(self) self.Name = 'Mott-Schottky characteristics' self.Description = """Measurement of the DC bias voltage dependence of the device capacitance.\n Using devices: - SR830 Lock In amplifier for current measurement - Agilent Waveform generator for applying a superposition of AC harmonic voltage signal and DC bias It can perform DC bias scans for given frequency """ return def init_parameters(self): """ create the list of the parameter and initialize some basic values """ #voltages, acquizDelay=0.1, voltStepDelay=5 self.generate_parameter( Name='Probing frequency', Unit='Hz', Type='float', Iterable=False, Limits=[1e3, 1e-1, None], Description='Frequencies (in Hz) to probe the AC capacitance with.' ) self.set_parameter_value('Probing frequency', 1e3) self.generate_parameter( Name='DC bias voltages', Unit='Volts', Type='float', Iterable=True, Limits=[4.5, -4.5, None], Description= 'List of frequencies (in Volts) to probe the AC capacitance') self.generate_parameter( Name='AC probing signal', Unit='Volts, RMS', Type='float', Iterable=False, Limits=[0.35, -0.35, None], Description= 'List of frequencies (in Volts) to probe the AC capacitance') self.set_parameter_value('AC probing signal', 0.1) self.generate_parameter( Name='Settle time frequency', Unit='Seconds', Type='float', Iterable=False, Limits=[None, 0.001, None], Description='delay after applying given frequency, in seconds') self.set_parameter_value('Settle time frequency', 5.0) self.generate_parameter( Name='Settle time DC bias', Unit='Seconds', Type='float', Iterable=False, Limits=[None, 0.001, None], Description='delay after applying given DC voltage, in seconds') self.set_parameter_value('Settle time DC bias', 5.0) self.generate_parameter( Name='Acquisition delay', Unit='Seconds', Type='float', Iterable=False, Limits=[None, None, [0.01, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0]], Description='delay of the data acquizition loop in seconds') self.set_parameter_value('Acquisition delay', 0.1) return def init_devices(self): from Devices import Clock, Thermometer, LCR_LockIn_Agilent ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments self.LCR = LCR_LockIn_Agilent() self.append_active_devices_list(self.LCR) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper) def _run(self): """ simple current-voltage characteristics measurement """ ################################################################ ## Here begins the experimetal part ########################### ################################################################ # switch on the voltage source: DCvoltages = self.get_parameter_value('DC bias voltages') DCwait = self.get_parameter_value('Settle time DC bias') ACvoltage = self.get_parameter_value('AC probing signal') Freq = self.get_parameter_value('Probing frequency') FreqWait = self.get_parameter_value('Settle time frequency') WaitDAQ = self.get_parameter_value('Acquisition delay') self.datastore.report('Starting the Schottky barrier measurement') # set the AC signal source in the LOCKIN amplifier self.LCR.setFreq(1.0e+3) self.LCR.setACLevelV(ACvoltage) self.LCR.setBias(2 * ACvoltage) self.LCR.set_output_on() self.datastore.report(('Applying frequency %f' % Freq)) self.LCR.setFreq(Freq) #Sine.set_offset(ACvoltage) self.Stopwatch.Wait(FreqWait) self.LCR.auto_gain() for DCvoltage in DCvoltages: self.datastore.report(('Applying DC voltage %f' % DCvoltage)) self.LCR.setBias(DCvoltage) self.observe(DCwait, WaitDAQ) self.datastore.separateData() self.datastore.report('Experiment finished') return
class Test(TestScript): def __init__(self): TestScript.__init__(self) self.Name = 'Impedance frequency spectrum' self.Description = """Measurement of the Impedance frequency spectrum""" return def init_parameters(self): """ create the list of the parameter and initialize some basic values """ self.generate_parameter(Name='Tested frequencies', Unit='Hz', Type='float', Iterable=True, Limits=[1e5, 0.01, None], Description='List of modulation frequencies') #self.set_parameter_value('Tested frequencies', 64) self.generate_parameter( Name='AC voltage', Unit='Volts', Type='float', Iterable=False, Limits=[4.5, 0.0, None], Description='Signal of AC voltage to be applied') self.set_parameter_value('AC voltage', 0.05) self.generate_parameter( Name='Acquisition delay', Unit='Seconds', Type='float', Iterable=False, Limits=[None, None, [0.01, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0]], Description='delay of the data acquizition loop in seconds') self.set_parameter_value('Acquisition delay', 2.0) self.generate_parameter( Name='Settle time frequency', Unit='Seconds', Type='float', Iterable=False, Limits=[None, 0.001, None], Description='Delay to settle signal at each frequency in seconds') self.set_parameter_value('Settle time frequency', 5.0) self.generate_parameter( Name='Chopper device', Unit='', Type='name', Iterable=False, Limits=[None, None, ['SRS Lock-In Amp', 'HIOKI LCR HI-TESTER']], Description="""Device to provide measurement.""") self.set_parameter_value('Chopper device', 'SRS Lock-In Amp') return def init_devices(self): from Devices import Clock, Thermometer,\ LCR_LockIn, LCR_HIOKI deviceName = self.get_parameter_value('Chopper device') if deviceName == 'SRS Lock-In Amp': self.Channel = LCR_LockIn() self.append_active_devices_list(self.Channel) if deviceName == 'HIOKI LCR HI-TESTER': self.Channel = LCR_HIOKI() self.append_active_devices_list(self.Channel) #from instruments.Keithley import Electrometer617 #from instruments.Agilent import A34401_4ohm ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments #PeltierP = PID_CBdriver(TCchannel=1, count=20) #PeltierP.Activate() self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) self.Temper = Thermometer() self.append_active_devices_list(self.Temper) def _run(self): """ simple current-voltage characteristics measurement """ ################################################################ ## Here begins the experimetal part ########################### ################################################################ deviceName = self.get_parameter_value('Chopper device') Frequencies = self.get_parameter_value('Tested frequencies') ACvoltage = self.get_parameter_value('AC voltage') WaitWL = self.get_parameter_value('Settle time frequency') WaitDAQ = self.get_parameter_value('Acquisition delay') self.datastore.report('Using device "%(device)s" for measurement' % \ {'device':deviceName}) # initializing the measurement for given instrument: if deviceName == 'SRS Lock-In Amp': self.Channel.setACLevelV(ACvoltage) self.Channel.setFreq(Frequencies[0]) self.Channel.auto_gain() self.Stopwatch.Wait(3) # initializing the measurement for given instrument: if deviceName == 'HIOKI LCR HI-TESTER': self.Channel.setACLevelV(ACvoltage) self.Channel.setFreq(Frequencies[0]) self.Stopwatch.Wait(3) #self.datastore.report ('estimation of LockIn amplifier gain for desired Frequencies:') self.datastore.report('Starting the impedance spectra measurement from %(from)f to %(to)f Hz' % \ {'from':Frequencies[0], 'to':Frequencies[-1]}) self.datastore.report('Starting Frequency scanning:') for freq in Frequencies: self.Channel.setFreq(freq) self.datastore.report('Set New frequency: %0.2f' % freq) if deviceName == 'SRS Lock-In Amp': if freq > 0.01: gain = self.Channel.auto_gain() #self.datastore.report('Found new Lock-In Amplifier GAIN: %d' % gain) else: gain = self.Channel.LockIn.get_gain() #self.datastore.report('Kept old Lock-In Amplifier GAIN: %d' % gain) minimumWait = WaitWL + 10 / freq self.observe(minimumWait, WaitDAQ) self.datastore.separateData() self.datastore.report('Experiment finished') if deviceName == 'SRS Lock-In Amp': #self.Lamp.set_output_off() #self.Filter.close_shutter() #self.Channel.set_aux_output(channel=2, voltage=1.0) pass if deviceName == 'HIOKI LCR HI-TESTER': #self.Chopper.set_output_off() pass self.Channel.Close() #self.datastore.report('finished the Modulated frequency photocurrent spectrum measurement') return
def init_devices(self): from Devices import Clock, SMU_4PP_tester self.Elmeter = SMU_4PP_tester() self.append_active_devices_list(self.Elmeter) self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch)
def init_devices(self): from Devices import Clock, Thermometer self.deviceName = self.get_parameter_value('Device') LampVoltage = self.get_parameter_value('Tungsten lamp voltage') if LampVoltage > 0: from Devices import PowerSource, Monochromator, HamamatsuPhotodiode self.Filter = Monochromator() self.append_active_devices_list(self.Filter) self.LightMeter = HamamatsuPhotodiode() self.append_active_devices_list(self.LightMeter) if self.deviceName != 'TTi TSX3510P': self.Lamp = PowerSource() self.Lamp.set_amperes_limit(10.0) if self.deviceName == 'Keithley 6517A (A)': from Devices import ElectrometerA self.Elmeter = ElectrometerA() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 6517A (B)': from Devices import ElectrometerB self.Elmeter = ElectrometerB() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 617': from Devices import Electrometer self.Elmeter = Electrometer() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'TTi TSX3510P': from Devices import PowerSource self.Elmeter = PowerSource() self.Elmeter.set_amperes_limit(10.0) self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel A': from Devices import SMU_channelA self.Elmeter = SMU_channelA() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel B': from Devices import SMU_channelB self.Elmeter = SMU_channelB() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel A, fast sweep': from Devices import SMU_channelA self.Elmeter = SMU_channelA() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel B, fast sweep': from Devices import SMU_channelB self.Elmeter = SMU_channelB() self.append_active_devices_list(self.Elmeter) #from instruments.Keithley import Electrometer617 #from instruments.Agilent import A34401_4ohm ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) if self.get_parameter_value('Thermo') == "HAAKE F6": self.Temper = Thermometer() self.append_active_devices_list(self.Temper)
class Test(TestScript): def __init__(self): TestScript.__init__(self) self.Name = 'Current-Voltage' self.Description = """Current Voltage characteristic measurement""" return def init_parameters(self): """ create the list of the parameter and initialize some basic values """ #voltages, acquizDelay=0.1, voltStepDelay=5 self.generate_parameter( Name='Tungsten lamp voltage', Unit='Volts', Type='float', Iterable=False, Limits=[20, 0.0, None], Description= 'Select value > 0 to activate irradiation of the sample with light' ) self.set_parameter_value('Tungsten lamp voltage', 0.0) self.generate_parameter( Name='Tested wavelength', Unit='nm', Type='float', Iterable=False, Limits=[1200, 200, None], Description= 'List of wavelengths to irradiate the sample with, in the given order' ) self.set_parameter_value('Tested wavelength', 800) self.generate_parameter( Name='Tested voltages', Unit='Volts', Type='float', Iterable=True, Limits=[1000, -1000, None], Description= 'List of voltages (in Volts) to be applied to the sample given order' ) #self.set_parameter_value('Tested voltages', [0.1,0.2]) self.generate_parameter( Name='Acquisition delay', Unit='Seconds', Type='float', Iterable=False, Limits=[None, None, [0.01, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0]], Description='delay of the data acquizition loop in seconds') self.set_parameter_value('Acquisition delay', 0.1) self.generate_parameter( Name='Acquisition time', Unit='Seconds', Type='float', Iterable=False, Limits=[None, 0.001, None], Description='delay between the voltage steps in seconds') self.set_parameter_value('Acquisition time', 5.0) self.generate_parameter( Name='Device', Unit='name', Type='name', Iterable=False, Limits=[ None, None, [ 'Keithley 617', 'Keithley 6517A (A)', 'Keithley 6517A (B)', 'Keithley 2602 - channel A', 'Keithley 2602 - channel A, fast sweep', 'Keithley 2602 - channel B', 'Keithley 2602 - channel B, fast sweep', 'TTi TSX3510P' ] ], Description= 'Device to measure the current voltage characteristics with') self.set_parameter_value('Device', 'Keithley 617') self.generate_parameter( Name='Thermo', Unit='name', Type='name', Iterable=False, Limits=[None, None, ["HAAKE F6", "none"]], Description='Device to measure the temperature with') self.set_parameter_value('Thermo', 'none') return def init_devices(self): from Devices import Clock, Thermometer self.deviceName = self.get_parameter_value('Device') LampVoltage = self.get_parameter_value('Tungsten lamp voltage') if LampVoltage > 0: from Devices import PowerSource, Monochromator, HamamatsuPhotodiode self.Filter = Monochromator() self.append_active_devices_list(self.Filter) self.LightMeter = HamamatsuPhotodiode() self.append_active_devices_list(self.LightMeter) if self.deviceName != 'TTi TSX3510P': self.Lamp = PowerSource() self.Lamp.set_amperes_limit(10.0) if self.deviceName == 'Keithley 6517A (A)': from Devices import ElectrometerA self.Elmeter = ElectrometerA() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 6517A (B)': from Devices import ElectrometerB self.Elmeter = ElectrometerB() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 617': from Devices import Electrometer self.Elmeter = Electrometer() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'TTi TSX3510P': from Devices import PowerSource self.Elmeter = PowerSource() self.Elmeter.set_amperes_limit(10.0) self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel A': from Devices import SMU_channelA self.Elmeter = SMU_channelA() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel B': from Devices import SMU_channelB self.Elmeter = SMU_channelB() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel A, fast sweep': from Devices import SMU_channelA self.Elmeter = SMU_channelA() self.append_active_devices_list(self.Elmeter) if self.deviceName == 'Keithley 2602 - channel B, fast sweep': from Devices import SMU_channelB self.Elmeter = SMU_channelB() self.append_active_devices_list(self.Elmeter) #from instruments.Keithley import Electrometer617 #from instruments.Agilent import A34401_4ohm ################################################################ ## Here begins the initialization of devices ################## ################################################################ # define and ACTIVATE the instruments self.Stopwatch = Clock() self.append_active_devices_list(self.Stopwatch) if self.get_parameter_value('Thermo') == "HAAKE F6": self.Temper = Thermometer() self.append_active_devices_list(self.Temper) def _run(self): """ simple current-voltage characteristics measurement """ ################################################################ ## Here begins the experimetal part ########################### ################################################################ # switch on the voltage source: voltages = self.get_parameter_value('Tested voltages') voltStepDelay = self.get_parameter_value('Acquisition time') acquizDelay = self.get_parameter_value('Acquisition delay') LampVoltage = self.get_parameter_value('Tungsten lamp voltage') Wavelength = self.get_parameter_value('Tested wavelength') if LampVoltage > 0: #self.LightMeter.Measure() if self.deviceName != 'TTi TSX3510P': self.Lamp.set_volts(LampVoltage) self.Lamp.set_output_on() self.Filter.set_wave(Wavelength) self.Filter.open_shutter() if self.deviceName in ['Keithley 617']: self.Elmeter.zero_check('off') self.observe(voltStepDelay, acquizDelay) self.datastore.separateData() if self.deviceName in [ 'Keithley 617', 'Keithley 6517A (A)', 'Keithley 6517A (B)' ]: self.Elmeter.set_output_on() self.Elmeter.zero_check('off') for voltage in voltages: self.Elmeter.set_volts(voltage) self.observe(voltStepDelay, acquizDelay) #self.datastore.separateData() self.Elmeter.zero_check('on') self.Elmeter.set_output_off() if self.deviceName in [ 'TTi TSX3510P', 'Keithley 2602 - channel A', 'Keithley 2602 - channel B' ]: self.Elmeter.set_output_on() for voltage in voltages: self.Elmeter.set_volts(voltage) self.observe(voltStepDelay, acquizDelay) self.datastore.separateData() self.Elmeter.set_output_off() if self.deviceName in [ 'Keithley 2602 - channel A, fast sweep', 'Keithley 2602 - channel B, fast sweep' ]: numberOfPoints = len(voltages) self.Temper.Measure() self.Stopwatch.Measure() self.Elmeter.MeasureIListV(voltages, settle_time=voltStepDelay) self.datastore.acquireData()