def Test(slopeList, acquizDelay=0.1, acquizTime=6): Stopwatch = MainTimerClass() Stopwatch.Activate() Line = GeneratorLine() Line.Activate() # dont forget to activate the instruments before opening the output file: Data = OutputHandler() Data.setDataFileName() for slope in slopeList: intercept = slope / 10.0 Data.analysis.mark_from() #begin DATA ACQUISITION script here: print 'starteing data generation. Slope>', slope, 'intercept:', intercept Stopwatch.zeroTimer() while Stopwatch.getSinceLastZeroed() < 1.2: Stopwatch.Wait(0.1) Stopwatch.Measure() Line.Measure(slope, intercept) Data.acquireData() print 'data gen finished, starting analysis' Data.analysis.mark_to() print 'analysing data in range', Data.analysis.get_markers() print 'average:', Data.analysis.average_marked("U(V)") print 'average last 10 points:', Data.analysis.average_last('U(V)', 10) print 'linear regression:', Data.analysis.linear_regres_marked( "time(s)", "U(V)")
# this is script for testing of FET # Uses the Keithley Dual SourceMeter 2602 (GIPB addr 26) device to measure # the source drain current-voltage characteristics at list of fixed Gates. # project libraries imports: # instruments: from instruments.TimeMeter import MainTimerClass #from instruments.Keithley import SM2602_sweepV from instruments.Keithley import SM2602_channel # file-output libraries from Output.Output import OutputHandler # define and ACTIVATE the instruments Stopwatch = MainTimerClass() Stopwatch.Activate() Channel = SM2602_channel('dualSmeter', channel='a', NPLC=10) Channel.Activate() Gate = SM2602_channel('dualSmeter', channel='b', NPLC=10) Gate.Activate() # don`t forget to activate the instruments before opening the output file: Data = OutputHandler() Data.setDataFileName() import time def report(message, file='report.info'): date = time.asctime(time.localtime())
#!/usr/bin/python # this is script meant to be executable file # allowing to perform measurments # EXAMPLE file # project libraries imports: # instruments: from instruments.DummyMeter import GeneratorLine from instruments.TimeMeter import MainTimerClass # file-output libraries from Output.Output import OutputHandler # define and ACTIVATE the instruments Stopwatch = MainTimerClass() Stopwatch.Activate() Line = GeneratorLine() Line.Activate() # dont forget to activate the instruments before opening the output file: Data = OutputHandler() Data.setDataFileName('test-01.dat') Data.analysis.mark_from() #begin DATA ACQUISITION script here: Stopwatch.zeroTimer() while Stopwatch.getSinceLastZeroed() < 5: Stopwatch.Wait(0.1) Stopwatch.Measure() Line.Measure() Data.acquireData()
################################################################ ## Here begins the initialization of devices ################## ################################################################ # project libraries imports: # instruments: from instruments.TimeMeter import MainTimerClass from instruments.Keithley import Electrometer617 from instruments.PID import PIDHeater from instruments.Agilent import A34401_4ohm # file-output libraries from Output.Output import OutputHandler # define and ACTIVATE the instruments Stopwatch = MainTimerClass() Stopwatch.Activate() PeltierP = PIDHeater() # temperature regulation PeltierP.Activate() Platinum = A34401_4ohm('FastMultimeter') Platinum.Activate() # don`t forget to activate the instruments before opening the output file: Data = OutputHandler() Data.setDataFileName() PeltierP.set_PID_params(Kp=Gain, Ti=Tinteg, Td=Tderiv, looptime=LoopTime) PeltierP.startRegulation() for temperature in temperatures: PeltierP.setNew_setpoint(value=temperature, tolerance=Tolerance,
# project libraries imports: # instruments: from instruments.TimeMeter import MainTimerClass #from instruments.Keithley import SM2602_sweepV from instruments.Keithley import SM2602_channel # file-output libraries from Output.Output import OutputHandler # define and ACTIVATE the instruments Stopwatch = MainTimerClass() Stopwatch.Activate() Wire = SM2602_channel('dualSmeter', channel='a', NPLC=2) Wire.Activate() Piezo = SM2602_channel('dualSmeter', channel='b', NPLC=2) Piezo.Activate() # don`t forget to activate the instruments before opening the output file: Data = OutputHandler() Data.setDataFileName() import time def report(message, file='report.info'): date = time.asctime(time.localtime()) message = ('%(date)s: %(message)s \n' % \ {'date':date, 'message':message}) print message, f = open(file, 'a') f.write(message)
################################################################ ## Here begins the initialization of devices ################## ################################################################ # project libraries imports: # instruments: from instruments.TimeMeter import MainTimerClass from instruments.Keithley import Electrometer617 from instruments.PID import PIDHeater from instruments.Agilent import A34401_4ohm # file-output libraries from Output.Output import OutputHandler # define and ACTIVATE the instruments Stopwatch = MainTimerClass() Stopwatch.Activate() Electrometer = Electrometer617('Electrometer') Electrometer.Activate() PeltierP = PIDHeater() # temperature regulation PeltierP.Activate() Platinum = A34401_4ohm('FastMultimeter') Platinum.Activate() # don`t forget to activate the instruments before opening the output file: Data = OutputHandler() Data.setDataFileName() ################################################################ ## Here begins the experimetal part ########################### ################################################################