#! /bin/csh -f
#
if ( $#argv == 3) then
  set outnam = $argv[1]
  set sl = $argv[2]
  set su = $argv[3]
else
  echo -n "Enter base name for existing SDSS FITS images:"
  set outnam = $<
  echo -n "Lower sigma limit for RGB stretch (recommended -1): "
  set sl = $<
  echo -n "Upper sigma limit for RGB stretch (recommended 5): "
  set su = $<
endif
#
# Create RGB jpg
mJPEG -red $outnam\-SDSSi/mosaic.fits $sl\s $su\s -green $outnam\-SDSSr/mosaic.fits $sl\s $su\s -blue $outnam\-SDSSg/mosaic.fits $sl\s $su\s -out SDSS-gri.jpg
#
\ls -ltr SDSS-gri.jpg
echo "Done!"

