calmirror

Show or modify the position of the calibration mirror

usage: calmirror: [-h, --help] position [-nomove] [-quiet]

-h , --help

show this help message and exit

position

Calibration mirror position (Sky, Mirror, Filter

-nomove

If set, do not execute the move, only set targets

-quiet

If set, disable progress bar

#! @KPYTHON@

from KCWI import Calibration
import argparse
import sys

# Parsing arguments
description = "Show or modify the position of the calibration mirror"
parser = argparse.ArgumentParser(description=description)
parser.add_argument('position',nargs="?",default=None, help='Calibration mirror  position (Sky, Mirror, Filter')
parser.add_argument('-nomove',required=False, default=False,action='store_true', help='If set, do not execute the move, only set targets')
parser.add_argument('-quiet',required=False, default=False,action='store_true', help='If set, disable progress bar')


if __name__ == '__main__':

   args = parser.parse_args()

   print "Calibration mirror: "+str(args.position)
   print "NoMove: "+str(args.nomove)

   if args.nomove == True:
      move = False
   else:
      move = True

   calmirror = Calibration.cal_mirror(position=args.position, move=move, quiet=args.quiet)
   sys.stdout.write("Caibration mirror position: %s\n" % (calmirror))