def is_operating(): db = forest.db_writer('operation_log') ret = db.get_latest_item() status = ret[2] if is_observing(): return True if status == 'START': return True return False
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest loatt_monitor = forest.loatt_monitor() sql = forest.db_writer('lo_att') # -- def printlog(bias): forest.print_timestamp() forest.print_loatt(bias) return # -- ch = range(1, 9) try: while True: t0 = time.time() bias = loatt_monitor.read_bias()
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest rxrot_monitor = forest.rx_rotator_monitor() sql_status = forest.db_writer('rxrot_status') sql_error = forest.db_writer('rxrot_errors') sql_cosmos = forest.db_writer('rxrot_cosmos_log') # -- def printlog(status): forest.print_rxrot(status) return # -- try: while True: forest.print_timestamp() t0 = time.time()
#! /usr/bin/env python interval = 60.0 # ---- import pickle import zlib import time import forest sql_status = forest.db_writer('spana') # -- def printlog(status): forest.print_spana(status) return # -- try: while True: forest.print_timestamp() t0 = time.time() if forest.is_operating(): print('operation is running ...')
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest tm = forest.dewar_temp() sql = forest.db_writer('dewar_temp') # -- def printlog(k): ts = time.strftime('%Y/%m/%d.%H:%M:%S') temp = ', '.join(['%.2f K' % (_k) for _k in k]) print('[%s] %s' % (ts, temp)) return # -- ch = tm.ch name = ['%s, %s' % (_n, _sn) for _n, _sn in zip(tm.curve_name, tm.curve_sn)] try: while True: t0 = time.time()
def __init__(self): self.db = forest.db_writer(self.table) pass
def __init__(self): self.log = forest.db_writer('operation_log') self.stdout = stdout() self.stderr = stderr() pass
def __init__(self): self.db = forest.db_writer(self.table) pass
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest slider_monitor = forest.slider_monitor() sql_status = forest.db_writer('slider_status') # -- def printlog(status): forest.print_slider(status) return # -- try: while True: forest.print_timestamp() t0 = time.time() position = slider_monitor.read_position() count = slider_monitor.read_count()
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest sql_status = forest.db_writer('lo_sg') # -- def printlog(status): forest.print_losg(status) return # -- try: while True: forest.print_timestamp() t0 = time.time() if forest.is_observing(): print('observation is running ...') else: losg = forest.losg()
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest loatt_monitor = forest.loatt_monitor() sql = forest.db_writer('lo_att') # -- def printlog(bias): forest.print_timestamp() forest.print_loatt(bias) return # -- ch = range(1, 9) try: while True: t0 = time.time() bias = loatt_monitor.read_bias()
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest tm = forest.dewar_temp() sql = forest.db_writer('dewar_temp') # -- def printlog(k): ts = time.strftime('%Y/%m/%d.%H:%M:%S') temp = ', '.join(['%.2f K'%(_k) for _k in k]) print('[%s] %s'%(ts, temp)) return # -- ch = tm.ch name = ['%s, %s'%(_n, _sn) for _n, _sn in zip(tm.curve_name, tm.curve_sn)] try: while True:
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest sql_status = forest.db_writer('IF_switch') # -- def printlog(status): forest.print_switch(status) return # -- try: while True: forest.print_timestamp() t0 = time.time() if forest.is_operating(): print('operation is running ...') else:
#! /usr/bin/env python interval = 60.0 # ---- import pickle import zlib import time import forest sql_status = forest.db_writer('spana') # -- def printlog(status): forest.print_spana(status) return # -- try: while True: forest.print_timestamp() t0 = time.time() if forest.is_operating(): print('operation is running ...')
#! /usr/bin/env python check_interval = 1.0 update_interval = 600.0 # ---- import time import forest sql_status = forest.db_writer('IF_switch') # -- def printlog(status): forest.print_switch(status) return # -- try: while True: forest.print_timestamp() t0 = time.time() if forest.is_operating(): print('operation is running ...') else:
def is_observing(): db = forest.db_writer('operation_log') ret = db.get_latest_item() status = ret[3] if status == 'observation_mode': return True return False
def __init__(self): self.log = forest.db_writer('operation_log') self.stdout = stdout() self.stderr = stderr() pass