예제 #1
0
    def __init__(self, InstrumentAddress="", **kwargs):
        """init: get the driver connection to the Lock-In, set up default conf"""
        super().__init__(**kwargs)

        self.lockin = SR830(InstrumentAddress)
        self.__name__ = "SR830_Updater " + InstrumentAddress

        # self.interval = 0.05
        self.ShuntResistance_Ohm = 0
        self.ContactResistance_Ohm = 0
예제 #2
0
파일: live.py 프로젝트: bklebel/scripts
#             with self.lock:
#                 for ct, entry in enumerate(self.data):
#                     ent0, ent1 = shaping(entry)
#                     self.lines[ct].set_xdata(ent0)
#                     self.lines[ct].set_ydata(ent1)
#             self.ax.relim()
#             self.ax.autoscale_view()
#             self.canvas.draw()
#         except ValueError as e_val:
#             print('ValueError: ', e_val.args[0])

#     def closeEvent(self, event):
#         """stop the timer for updating the plot, super to parent class method"""
#         self.timer.stop()
#         super().closeEvent(event)
#     #     del self

if __name__ == '__main__':
    lockin1 = SR830('GPIB::9')

    data = [lockin1.x, lockin1.y]

    app = QtWidgets.QApplication(sys.argv)
    form = Window_plotting(data, 'X', 'Y', 'something', 1)
    form.show()
    sys.exit(app.exec_())

    while True:
        data[0] = lockin1.x
        data[1] = lockin1.y
예제 #3
0
inlet_pressure = args.inlet  # bar
# goal_pressure = 5 # bar, this is max pressure we want to achieve

for goal_pressure in range(6, 7, 1):

    volt = goal_pressure / 1.7898
    volt_max = inlet_pressure / 1.7898

    if inlet_pressure < goal_pressure:
        sys.exit("Goal prressure exceeds the limit, bitch!!")

    ramp1 = np.linspace(0, volt, int(volt / 0.1))
    ramp2 = np.linspace(volt, 0, int(volt / 0.1))
    print(ramp1)

    lockin1 = SR830("GPIB::9")

    print(lockin1.frequency)
    lockin1.frequency = 11.425
    print(lockin1.frequency)

    for no_cycle in range(1):

        CNT = 0
        for ramp in [ramp1, ramp2]:
            for set_voltage in ramp:

                lockin1.auxv3 = set_voltage
                time.sleep(1)

                for no_mes in range(50):
예제 #4
0
             temp=[],
             tempres=[],
             rho=[],
             resistivity=[],
             pressure=[],
             set_pressure=[],
             read_pressure=[],
             dac3=[],
             read_voltage=[],
             x=[],
             y=[],
             frequency=[],
             sine_voltage=[]))

    LS = LS350(None, 'GPIB::1::INSTR')
    lockin = SR830('GPIB::9')

    SAMPLE_DIMENSIONS = dict(cs1=cs1, cs2=cs2, length=length)
    print(df)

    for goal_pressure in range(1, 9, 1):

        if inlet_pressure < goal_pressure:
            raise AssertionError('Goal prressure exceeds the limit')

        ramp1 = np.linspace(0, goal_pressure, int(goal_pressure / 0.1))
        ramp2 = np.linspace(goal_pressure, 0, int(goal_pressure / 0.1))
        # print(ramp1)
        for ramp in (ramp1, ramp2):
            for voltage in ramp:
예제 #5
0
 def startup(self):
     log.info("Setting the seed of the random number generator")
     # random.seed(self.seed)
     self.lockin1 = SR830('GPIB::9')