#!/bin/csh -f
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# National Laboratory.
# Copyright (c) 2002 The Regents of the University of California, as
# Operator of Los Alamos National Laboratory.
# This file is distributed subject to a Software License Agreement found
# in the file LICENSE that is included with this distribution. 
#*************************************************************************
#set HOST_ARCH = `/usr/local/epics/startup/HostArch`
#setenv HOST_ARCH  $HOST_ARCH
set PVT_LOC = $EPICS_EXTENSIONS/bin/$HOST_ARCH

if ${?EPICS_EXTENSIONS_PVT} == 1 then 
	set PVT_LOC = $EPICS_EXTENSIONS_PVT/bin/$HOST_ARCH
endif

setenv IDL_DEVICE X

source $PVT_LOC/ezcaidl_setup
source $PVT_LOC/idluserdir_setup
cd ${IDL_USERDIR}

	set exe = "-rt=$PVT_LOC/scanSee.exe2.idl53"
	if -e scanSee.exe2.idl53 then
	set exe = "scanSee.exe2.idl53"
	endif

if ( "$1" == "" ) then
#setenv IDL_NCOLORS 32
	source /usr/local/rsi/idl/bin/idl_setup
	idl -32 $exe
exit
endif

set xdr = "DC"

echo ".run readScan.pro" >! go_viewer
echo ".run panimage.pro" >>! go_viewer
echo ".run vw2d.pro" >>! go_viewer
echo ".run DC.pro" >>! go_viewer
echo "$xdr" >>! go_viewer
	source /usr/local/rsi/idl/bin/idl_setup
	idl -32 go_viewer
rm go_viewer
