示例#1
0
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
示例#2
0
#! /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()
示例#3
0
#! /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()
示例#4
0
#! /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 ...')
            
示例#5
0
#! /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()
示例#6
0
文件: base.py 项目: ars096/forest
 def __init__(self):
     self.db = forest.db_writer(self.table)
     pass
示例#7
0
文件: base.py 项目: ars096/forest
 def __init__(self):
     self.log = forest.db_writer('operation_log')
     self.stdout = stdout()
     self.stderr = stderr()
     pass
示例#8
0
文件: base.py 项目: ars096/forest
 def __init__(self):
     self.db = forest.db_writer(self.table)
     pass
示例#9
0
#! /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()
示例#10
0
#! /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()
示例#11
0
#! /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()
        
示例#12
0
#! /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:
示例#13
0
#! /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:
示例#14
0
#! /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 ...')
示例#15
0
#! /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:
示例#16
0
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
示例#17
0
文件: base.py 项目: ars096/forest
 def __init__(self):
     self.log = forest.db_writer('operation_log')
     self.stdout = stdout()
     self.stderr = stderr()
     pass