#!/bin/sh
#----------------------------------------------------
#  Generate AladinScript commands 
# for a visualisation of Optical images + Radio Contours
#
#  Argument: coordinates
#----------------------------------------------------

pos="$*"
test -z "$theCat" && theCat=VIII/85

cat <<====AladinScript | tee /tmp/SPECFIND.tmp
timeout 5 ;
DSS2R = get aladin(DSS2,POSSII,F) $pos ; 
get NVSS $pos ; sync ; 
cview NVSS; contour 10; 
SED = get VizieR($theCat/spectra); 
waste = get VizieR($theCat/waste);
sync; hide NVSS; 
rename Contours Radio;
cview DSS2R ; show DSS2R ; select SED A1; zoom 2/3x;
set Radio color=blue ;
set SED color=rgb(200,0,0);
set waste color=rgb(200,200,0);
#set SED opacity=10;
#set waste opacity=10;
filter show_beam {
#   \${beam}>5  { draw fillellipse(\${beam}, \${beam}, 0) }
#   \${beam}<=5 { draw }
    \${beam}>5  { draw ellipse(\${beam}, \${beam}, 0) }
    \${beam}<=5 { draw }
}
sync; sync;
hide waste; show DSS2R
filter show_beam on; sync
====AladinScript
