#!/bin/csh
if ($#argv < 2)  then
  echo 'Usage: HowToUse NSide_HealPix OutFITSfile'
  exit 1
endif


echo '    *************************************************************';
echo '		creating spectral response powerlaw';
echo '    *************************************************************';
echo '  ' 
set cmd = "tgrsr $1 .2,120,50,-0.7,100,600 200 pl.fits"
echo ' ' 
echo 'Executing' $cmd
time $cmd

echo '	*************************************************************';
echo '		creating gaussian radiation spectra sky';
echo '	*************************************************************';
set cmd = "tgsky $1 0 140,30 gauss.fits"
echo ' ' 
echo 'Executing' $cmd
time $cmd

echo '	*************************************************************';
echo '		creating cosine/sine radiation spectra  sky';
echo '	*************************************************************';
set cmd = "tgsky $1 2 12,7,9,10 cossin.fits"
echo ' ' 
echo 'Executing' $cmd
time $cmd

echo '	*************************************************************';
echo '		creating noise radiation spectra sky';
echo '	*************************************************************';
set cmd = "tgsky $1 1 160,44 noise.fits"
echo ' ' 
echo 'Executing' $cmd
time $cmd

echo '	*************************************************************'
echo '		calling skymixer'
echo '	*************************************************************'
set xx = "@SKYMIX  3  $1"
echo $xx > test.d
cat howto.d >> test.d

set cmd = "skymixer test.d $2"
echo ' ' 
echo 'Executing' $cmd
time $cmd


