#!/bin/csh -f
#+
# py -- move telescope along the "y" direction in DEIMOS pixel units
#
# Purpose:
#	Move the telescope a given number of pixels in the "y"
#	direction (parallel to detector COLUMNS) on the DEIMOS detector
#
# Usage:
#	py y
# 
# Arguments:
#	y = offset in the direction parallel with CCD rows [pixels]
# 
# Exit values:
#	0 = normal completion
#	1 = wrong number of arguments
#	2 = arguments not floating point
#
# Example:
#	1) Move the telescope -100 pixels in "y":
#		pyr -100
#	Note that since this is a *telescope* move, the target will
#	"move" in the OPPOSITE direction!
#-
# Modification history:
#	Date unknown	RWG	Original version
#	2000-Jul-05	GDW	Added documentation
#-----------------------------------------------------------------------

# check args...
if ( $#argv != 1 ) then
  echo "Usage: pyr y"
  exit 1
endif

# verify floating-point values...
is_float $* > /dev/null
if ( $status ) then
  echo "ERROR -- Argument must be valid floating-point number"
  exit 2
endif

# set scale...
source $DEIMOS_PROC_DIR/tel/set_scale

# convert pixels to arcsec...
set dy = `calc "$pscale * $1"`

# make move...
mxy 0 $dy
