(file) Return to regmake CVS log (file) (dir) Up to [Development] / JSOC / proj / globalhs / scripts / pkbgn

File: [Development] / JSOC / proj / globalhs / scripts / pkbgn / regmake (download)
Revision: 1.4, Thu Oct 23 13:37:35 2014 UTC (3 years, 11 months ago) by tplarson
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-12, Ver_8-11, Ver_8-10, HEAD
Changes since 1.3: +16 -0 lines
add option to call doasymweed.pro

#
set nargs=$#argv
if ($nargs<2) then
  set cadd=1
else
  set cadd=$2
endif

set vars = `cat script.parms`
@ i = 1
while ($i <= $#vars )
  set $vars[$i]
@ i++
end

if (! $?ica) set ica=2
if (! $?iweed) set iweed=0
if (! $?iasymweed) set iasymweed=0

if ($iweed && $iasymweed) then
  echo ERROR: cannot set both iweed and iasymweed.
  exit 1
endif

set iter=$1
@ iter2=$iter + 1
@ iter0=$iter - 1
set file='tmp'$iter'.idl'

set prev=`filetest -e 'm'$iter0'qx'`

cat parms.idl > $file
echo q=readx\(\'eee\'\) >>$file
echo hldc=plotbad\(q,icasea=icasea\) >>$file

if ($iweed > 0) then
  if ($prev == 0) then
    echo doweed,\'m$iter{q}\',\'m$iter{qw}\',icasea=icasea,ndt=ndt,tsample=tsample,weedthresh=weedthresh >>$file
    echo spawn,\'mv m$iter'qw m'$iter'qx'\' >>$file
  else
    echo doweed,\'m$iter{q}\',\'m$iter{qw}\',prev=\'m$iter0{qx}\',icasea=icasea,ndt=ndt,tsample=tsample,weedthresh=weedthresh >>$file
    echo madd,icasea=icasea >>$file
    echo 'm'$iter0'qx' >>$file
    echo 'm'$iter'qw' >>$file
    echo 'm'$iter'qx' >>$file
  endif
else if ($iasymweed > 0) then
  if ($prev == 0) then
    echo doasymweed,\'m$iter{q}\',\'m$iter{qw}\',icasea=icasea >>$file
    echo spawn,\'mv m$iter'qw m'$iter'qx'\' >>$file
  else
    echo doasymweed,\'m$iter{q}\',\'m$iter{qw}\',icasea=icasea >>$file
    echo madd,icasea=icasea >>$file
    echo 'm'$iter0'qx' >>$file
    echo 'm'$iter'qw' >>$file
    echo 'm'$iter'qx' >>$file
  endif
else
  if ($prev == 0) then
    echo spawn,\'mv m$iter'q m'$iter'qx'\' >>$file
  else
    echo madd,icasea=icasea >>$file
    echo 'm'$iter0'qx' >>$file
    echo 'm'$iter'q' >>$file
    echo 'm'$iter'qx' >>$file
  endif
endif
echo p=fusk\(icasea=icasea\) >>$file
echo 'm'$iter'qx' >>$file
echo 'par'$iter2 >>$file
echo 'c=hldc+'$cadd >>$file
echo select,p,c,icasea=icasea,lmin=lmin,lmax=lmax >>$file
echo 'par'$iter2'q' >>$file

Karen Tian
Powered by
ViewCVS 0.9.4