Exemplo n.º 1
0
def initialize(event):
    print(event)
    obs_log.start_script(name)
    obs_log.weather_log()

    time.sleep(2)
    ctrl.drive_on()
    ctrl.contactor_on()
    print("dome_open")
    ctrl.dome_open()

    if opt:
        print("memb_open")
        ctrl.memb_open()
        print("Init end")
    ctrl.dome_track()
    time.sleep(0.8)
    ctrl.dome_track_end()

    obs_log.end_script(name)
Exemplo n.º 2
0
opt = ''

# Argument handler
# ================

p = argparse.ArgumentParser(description=description)
p.add_argument('--opt', type=str, help='For optical. Need 1.')

args = p.parse_args()

if args.opt is not None: opt = args.opt

# Main
# ====

obs_log.start_script(name)
obs_log.weather_log()

ctrl = controller.controller()
ctrl.drive_on()
print("dome_open")
ctrl.dome_open()

if opt:
    print("memb_open")
    ctrl.memb_open()
print("Init end")
ctrl.dome_track()

obs_log.end_script(name)
Exemplo n.º 3
0
# Main
# ====
import os
import shutil
import sys
import time
import signal
import numpy
import obs_log
import doppler_nanten
dp = doppler_nanten.doppler_nanten()

list = []
list.append("--obsfile")
list.append(obsfile)
obs_log.start_script(name, list)



obs_items = open(obsfile, 'r').read().split('\n')
obs = {}
for _item in obs_items:
    print(_item)
    if _item.startswith('script;'): break
    _item = _item.split('#')[0]
    _key, _value = _item.split('=', 1)
    _key = _key.strip()
    _value = _value.strip()
    try:
        obs[_key] = eval(_value)
    #except NameError:
Exemplo n.º 4
0
# Main
# ====
import os
import shutil
import sys
import time
import signal
import numpy
import obs_log
import doppler_nanten
dp = doppler_nanten.doppler_nanten()

list = []
list.append("--obsfile")
list.append(obsfile)
obs_log.start_script(name, list)

obs_items = open(obsfile, 'r').read().split('\n')
obs = {}
for _item in obs_items:
    print(_item)
    if _item.startswith('script;'): break
    _item = _item.split('#')[0]
    _key, _value = _item.split('=', 1)
    _key = _key.strip()
    _value = _value.strip()
    try:
        obs[_key] = eval(_value)
    #except NameError:
    except:
        try:
Exemplo n.º 5
0
# Argument handler
# ================

p = argparse.ArgumentParser(description=description)
p.add_argument('--opt', type=str,
               help='For optical. Need 1.')

args = p.parse_args()

if args.opt is not None: opt = args.opt

# Main
# ====

obs_log.start_script(name)
obs_log.weather_log()

ctrl = controller.controller()
ctrl.drive_on()
print("dome_open")
ctrl.dome_open()

if opt:
    print("memb_open")
    ctrl.memb_open()
print("Init end")
ctrl.dome_track()

obs_log.end_script(name)