Ejemplo n.º 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
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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 ...')
            
Ejemplo n.º 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()
Ejemplo n.º 6
0
 def __init__(self):
     self.db = forest.db_writer(self.table)
     pass
Ejemplo n.º 7
0
 def __init__(self):
     self.log = forest.db_writer('operation_log')
     self.stdout = stdout()
     self.stderr = stderr()
     pass
Ejemplo n.º 8
0
 def __init__(self):
     self.db = forest.db_writer(self.table)
     pass
Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 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()
        
Ejemplo n.º 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:
Ejemplo n.º 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:
Ejemplo n.º 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 ...')
Ejemplo n.º 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:
Ejemplo n.º 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
Ejemplo n.º 17
0
 def __init__(self):
     self.log = forest.db_writer('operation_log')
     self.stdout = stdout()
     self.stderr = stderr()
     pass