def __init__(self, params, filename): # Define the temperature controllers self.cryocon = Cryocon32B(GPIB_CRYOCON32B) self.lakeshore = Lakeshore332(GPIB_LAKESHORE332) # Save parameters self.measurement_interval = float(params["sampling interval / s"]) gpib_ch1 = int(params["Ch1 Keithley617 GPIB"]) self.keithley617 = keithley.Keithley617(gpib_ch1) gpib_ch2 = int(params["Ch2 SR830 GPIB"]) self.lockin2 = stanford.SR830(gpib_ch2) self.R_series2 = float(params["Ch2 R_series / Ohm"]) self.magnet = fake_magnets.ConstMagnet() # Initialise variables self.current_values = VAR_INIT.copy() self.var_titles = VAR_TITLES.copy() # create a csv logger self.logger = csvlogger.Logger(filename, self.var_order, self.var_titles, self.format_strings)
def __init__(self, params, filename): gpib_sr830 = int(params["SR830 GPIB"]) lockin1 = stanford.SR830(gpib_sr830) sens = float(params["PAR124 sens / V"]) theta = float(params["PAR124 theta / degrees"]) f = float(params["PAR124 f / Hz"]) Vout = float(params["PAR124 Vout / V"]) transformer = (int(params["PAR124 transformer mode"]) != 0) gpib_dmm = int(params["PAR124 DMM GPIB"]) dmm = keithley.Keithley196(gpib_dmm) lockin2 = par.PAR124A(dmm, sens=sens, theta=theta, f=f, Vout=Vout, transformer=transformer) magnet = fake_magnets.ConstMagnet() p = params.copy() p["R_series1 / Ohm"] = params["SR830 R_series / Ohm"] p["R_series2 / Ohm"] = params["PAR124 R_series / Ohm"] super().__init__(p, filename, lockin1, lockin2, magnet)
def __init__(self, params, filename): # Save parameters gpib = int(params["RTD SR830 GPIB"]) rtd_lockin = stanford.SR830(gpib) rtd_Rs = float(params["RTD R_series / Ohm"]) thermometer = RTD(rtd_lockin, rtd_Rs) magnet = fake_magnets.ConstMagnet() p = params.copy() super().__init__(p, filename, thermometer, magnet)
def __init__(self, params, filename): sens = float(params["sens / V"]) theta = float(params["theta / degrees"]) f = float(params["f / Hz"]) Vout = float(params["Vout / V"]) transformer = (int(params["transformer mode"]) != 0) gpib_dmm = int(params["GPIB DMM"]) dmm = keithley.Keithley196(gpib_dmm) lockin1 = par.PAR124A(dmm, sens=sens, theta=theta, f=f, Vout=Vout, transformer=transformer) lockin2 = fake_lockins.ConstLockin(float("nan")) magnet = fake_magnets.ConstMagnet() p = params.copy() p["R_series2 / Ohm"] = "0" super().__init__(p, filename, lockin1, lockin2, magnet)
def __init__(self, params, filename): # Save parameters gpib1 = int(params["GPIB SR844 1st"]) self.lockin1 = stanford.SR844(gpib1) gpib2 = int(params["GPIB SR844 2nd"]) self.lockin2 = stanford.SR844(gpib2) self.magnet = fake_magnets.ConstMagnet() self.measurement_interval = float(params["sampling interval / s"]) gpib_lakeshore = int(params["GPIB Lakeshore 340"]) # Define the temperature controllers self.lakeshore = Lakeshore340(gpib_lakeshore) # Initialise variables self.current_values = VAR_INIT.copy() # = {"name": "value"} # create a csv logger self.logger = csvlogger.Logger(filename, self.var_order, self.var_titles, self.format_strings)
# The main procedure if __name__ == '__main__': print("starting.......") timestring = time.strftime("%Y%m%d_%H.%M.%S") logfilename = os.path.join(save_path, "{0}_{1}.csv".format(timestring, filename)) notesfilename = os.path.join( save_path, "{0}_{1}_notes.txt".format(timestring, filename)) dmm = keithley.Keithley2000(15) thermometer = lakeshore.SiDiode(dmm, THERMOMETER_CALI) lockin = stanford.SR830(30) magnet = fake_magnets.ConstMagnet() experiment = MI_Tscan(thermometer, magnet, lockin, logfilename) with open(notesfilename, "w") as notesfile: notesfile.write("experiment: \"{}\"\n".format(experiment.title)) notesfile.write("Local time (YYYY/MM/DD, HH:MM:SS): {}\n".format( time.strftime("%Y/%m/%d, %H:%M:%S"))) notesfile.write(NOTES) notesfile.write( "thermometer calibration file: \"{}\".\n".format(THERMOMETER_CALI)) gali = galileo.Galileo(experiment, SAMPLING_INTERVAL, PLOT_VARS, plot_refresh_interval=PLOT_REFRESH,