def __init__(self, host, port, s=None, name='ppms'): self._name = name if s == None: self._s = connect_socket(host, port) else: self._s = s self._units = {'temperature': 'K', 'temperature_rate': 'K/min','field': 'Oe', 'field_rate': 'Oe/min'} for param in ['temperature', 'temperature_rate', 'field', 'field_rate', 'temperature_approach', 'field_approach', 'field_mode']: setattr(PPMS,param,property(fget=eval("lambda self: self._get_param('%s')" %param), fset=eval("lambda self, value: self._set_param('%s',value)" %param))) for param in ['temperature_status', 'field_status', 'chamber']: setattr(PPMS,param,property(fget=eval("lambda self: self._get_param('%s')" %param))) self._params = ['temperature', 'temperature_rate', 'temperature_approach', 'field', 'field_rate', 'field_approach', 'field_mode', 'temperature_status', 'field_status', 'chamber'] self._functions = []
def __init__(self, host, port=7773, name='cryostation'): self._s = connect_socket(host, port) self._units = {'temperature': 'K', 'temperature_setpoint': 'K'} super(MontanaCryostation, self).__init__(name)