def test_sr850(): # Test if instantiation fails SR850(SimulatedTransport())
def test_ppms(): # Test if instantiation fails PPMS(SimulatedTransport(), max_field=10e4)
def test_mps4g(): # Test if instantiation fails MPS4G(SimulatedTransport())
def test_K6221(): # Test if instantiation fails K6221(SimulatedTransport())
import slave from slave.transport import SimulatedTransport from slave.cryomagnetics.mps4g import MPS4G from slave.transport import Visa from time import sleep from threading import Thread from threading import Lock transport_default = SimulatedTransport() class cryomagnet(MPS4G): """Wrapper for mps4g module from slave""" def __init__(self, transport): #, transport=Visa('GPIB::05')): # self.magnet = MPS4G(transport=transport_default) MPS4G.__init__(self, transport) self.field = 0 self.is_ready = True self.lock = Lock() self._current_field = self.current def ramp_to_field(self, field, speed='SLOW', unit='G', block=False): t = Thread(self._ramp(field, speed, unit, block)) t.run() def ramp_to_zero(self, speed='SLOW', block=False): t = Thread(self._ramp_to_zero(speed, block)) t.run() def _ramp_to_zero(self, speed, block): self.sweep('ZERO')
def test_K2182(): # Test if instantiation fails K2182(SimulatedTransport())
def test_sr830(): # Test if instantiation fails ICS4807(SimulatedTransport())
def test_sr7225(): # Test if instantiation fails SR7225(SimulatedTransport())
def test_sr5113(): # Test if instantiation fails SR5113(SimulatedTransport())
def test_ls370(): # Test if instantiation fails LS370(SimulatedTransport())