def __init__(self, name):
     Instrument.__init__(self, name, tags=['virtual'])
     
     self.add_parameter('temperature', type=types.FloatType,
         flags=Instrument.FLAG_GET, units='mK')
     
     self.t = tip_client('tip',address='pi-us74')   #tip raspberry instance
示例#2
0
 def __init__(self, name):
     Instrument.__init__(self, name, tags=['virtual'])
     
     self.add_parameter('temperature', type=float,
         flags=Instrument.FLAG_GET, units='mK')
     
     self.t = tip_client('tip',address='pi-us74')   #tip raspberry instance
示例#3
0
        return 0
    
def _parameters_critical(t,b):
    #returns True if a message is to be sent, False otherwise
    if b_mean > 35 and abs(b[-1]-b[-2]) < 15:   #if mean value of last [10] minutes > 35mK and the increase smooth
        if b[-2] > b[-1] or b[-1] < 35:   #if temperature is decreasing
            return False
        else:
            return True
    else:
        return False


if __name__ == "__main__":
    
    t = tip_client('tip',address='pi-us74')   #tip raspberry
    #print t.r_get_T()
    #_sendTemp("0 mK")
    
    buffer = []
    for i in range(10):
        buffer.append(18.0)
    m_sent = False
    while True:
	time.sleep(59)
	if int(time.strftime('%M')) == 0:   #every full hour
	    m_sent = False
	
	buffer.append(_getTemp(t))
	buffer = buffer[1:]
	b_mean = mean(buffer)
示例#4
0
        return 0
    
def _parameters_critical(t,b,temp_critical):
    #returns True if a message is to be sent, False otherwise
    if b_mean > temp_critical and abs(b[-1]-b[-2]) < 15:   #if mean value of last [10] minutes > 35mK and the increase smooth
        if b[-2] > b[-1] or b[-1] < temp_critical:   #if temperature is decreasing
            return False
        else:
            return True
    else:
        return False


if __name__ == "__main__":
    
    t = tip_client('tip',address='pi-us74')   #tip raspberry
    
    # readout critical temperature argument
    if len(sys.argv) == 1:   #no argument passed -> set default 35mK
        temp_critical = 35
    else:
        temp_critical = float(sys.argv[1])   #in mK
    
    buffer = []
    for i in range(10):
        buffer.append(18.0)
    m_sent = False
    while True:
    time.sleep(59)
    if int(time.strftime('%M')) == 0:   #every full hour
        m_sent = False