Ejemplo n.º 1
0
# Support script for repeatability tests
# Moves the system to the position to tare it

import scansupport as ss
from repeat_config import *

ss.motorPositions()
ss.commandMotor(0.0, repeat_tare_pos)
Ejemplo n.º 2
0
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Forces the motors to move the window to the center position of the FoV

import scanconfig
import scansupport as sws

#### START EXECUTION ######

if (scanconfig.cte_disable_motors_first):
    sws.disableMotors()

print("Check initial motor positions")
sws.motorPositions()

if (scanconfig.cte_enable_motors_first):
    sws.enableMotors()

# Calculate the center position of the window over the FoV
lsx = 0.0
lsy = 0.0

print("lsx: " + str(lsx))
print("lsy: " + str(lsy))

sws.commandMotor(lsx, lsy)

print("Check motor positions after resets")
sws.motorPositions()

sws.motorClose()
Ejemplo n.º 3
0
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Forces ONLY the X and Y motors to move the window to the center of the FoV.  Comp is not commanded.

import scanconfig
import scansupport as sws

#### START EXECUTION ######

if (scanconfig.cte_disable_motors_first):
    sws.disableMotors()

print("Check initial motor positions")
sws.motorPositions()

if (scanconfig.cte_enable_motors_first):
    sws.enableMotors()

# Calculate the center position of the window over the FoV
lsx = 0.0
lsy = 0.0

print("lsx: "+str(lsx))
print("lsy: "+str(lsy))

sws.commandMotorWindow(lsx, lsy)

print("Check motor positions after resets")
sws.motorPositions()
Ejemplo n.º 4
0
        print("* Vertical: " + str(cam.get(cv2.CAP_PROP_FRAME_HEIGHT)))

        # subprocess.check_call("exit 1", shell=True)

if scanconfig.cte_disable_motors_first:
    sws.disableMotors()

if scanconfig.cte_enable_motors_first:
    sws.enableMotors()

if scanconfig.cte_reset_motors_first:
    sws.resetMotors()
    if scanconfig.cte_verbose:
        print("Check motor positions after resets")
    sleep(scanconfig.cte_stabilization_time)
    sws.motorPositions()
elif scanconfig.cte_home_motors_first:
    sws.homeMotors()
    if scanconfig.cte_verbose:
        print("Check motor positions after resets")
    sleep(scanconfig.cte_stabilization_time)
    sws.motorPositions()
else:
    if scanconfig.cte_verbose:
        print("Check initial motor positions")
    sleep(scanconfig.cte_stabilization_time)
    sws.motorPositions()

# Prepare the Database
db = sqlite3.connect('./db/log.sqlite3')
if not db:
Ejemplo n.º 5
0
        print ("* Vertical: " + str(cam.get(cv2.CAP_PROP_FRAME_HEIGHT)))

        # subprocess.check_call("exit 1", shell=True)

if scanconfig.cte_disable_motors_first:
    sws.disableMotors()

if scanconfig.cte_enable_motors_first:
    sws.enableMotors()

if scanconfig.cte_reset_motors_first:
    sws.resetMotors()
    if scanconfig.cte_verbose:
        print("Check motor positions after resets")
    sleep(scanconfig.cte_stabilization_time)
    sws.motorPositions()
elif scanconfig.cte_home_motors_first:
    sws.homeMotors()
    if scanconfig.cte_verbose:
        print("Check motor positions after resets")
    sleep(scanconfig.cte_stabilization_time)
    sws.motorPositions()
else:
    if scanconfig.cte_verbose:
        print("Check initial motor positions")
    sleep(scanconfig.cte_stabilization_time)
    sws.motorPositions()

# Prepare the Database
db = sqlite3.connect('./db/log.sqlite3')
if not db: