#! /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 2MASS 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\-2MASS-K/mosaic.fits $sl\s $su\s -green $outnam\-2MASS-H/mosaic.fits $sl\s $su\s -blue $outnam\-2MASS-J/mosaic.fits $sl\s $su\s -out 2MASS-JHK.jpg
#
\ls -ltr 2MASS-JHK.jpg
echo "Done!"

