The code of this examples are in example dir
Simple goto¶
Simple example that synchronize mount actual position to 0,0 and move forward and bacskwards and small angle
import synscan
'''Goto example'''
smc=synscan.motors()
#Synchronize mount actual position to (0,0)
smc.set_pos(0,0)
#Move forward and wait to finish
smc.goto(30,30,synchronous=True)
#Return to original position and exit without wait
smc.goto(0,0,synchronous=False)
Variable speed track¶
This example shows speed ramping
import synscan
import time
'''One axis variable speed track example'''
smc=synscan.motors()
AXIS=2
#FORWARD
#RAMP UP
for speed in range(0,50,1):
time.sleep(.1)
smc.axis_track(AXIS,speed/10)
#RAMP DOWN
for speed in range(50,0,-1):
time.sleep(.1)
smc.axis_track(AXIS,speed/10)
#BACKWARDS
#RAMP UP
for speed in range(0,50,1):
time.sleep(.1)
smc.axis_track(AXIS,-speed/10)
#RAMP DOWN
for speed in range(50,0,-1):
time.sleep(.1)
smc.axis_track(AXIS,-speed/10)
Panorama tool¶
This example shows how to walk a grid of space points. Also howto activate mount’s auxiliary switch to take a picture
import time
import synscan
smc=synscan.motors()
#Set actual position az=0 alt=0
smc.set_pos(0,0)
#define a grid and walk over his points
for az in range(0,180,30):
for alt in range(0,90,30):
smc.goto(az,alt,synchronous=True) #Goto and wait to finish
smc.set_switch(True) #Activate camera with the integrate switch
time.sleep(2)
smc.set_switch(False)