run.rts.loop 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. set eorig = ECG_epiRTslt_scan_4.1D
  2. set rorig = Resp_epiRTslt_scan_4.1D
  3. set odir = many.tests
  4. set nmax = 100
  5. # choose whether to test with dylan's update
  6. if ( 0 ) then
  7. set odir = $odir.dylan
  8. set path = ( `pwd`/jz.dylan $path )
  9. rehash
  10. endif
  11. echo using: `which RetroTS.py`
  12. # make clean output directory
  13. rm -fr $odir
  14. mkdir $odir
  15. cd $odir
  16. # note base file names or prefixes
  17. set ebase = e.15000.1D
  18. set rbase = r.15000.1D
  19. set epre = t.e
  20. set rpre = t.r
  21. # start with input having length % 100 == 0
  22. head -n 15000 ../$eorig > $ebase
  23. head -n 15000 ../$rorig > $rbase
  24. # add 0..199 (nah, 200) lines of zeros to see:
  25. # 1. how the number of lines changes
  26. # 2. are there the same errors for line counts mod 100
  27. foreach ind ( `count -digits 3 0 $nmax` )
  28. set efile = $epre.$ind.1D
  29. set rfile = $rpre.$ind.1D
  30. set lfile = out.rts.$ind
  31. cp $ebase $efile
  32. cp $rbase $rfile
  33. if ( $ind > 0 ) then
  34. 1deval -num $ind -expr 0 >> $efile
  35. 1deval -num $ind -expr 0 >> $rfile
  36. endif
  37. set cmd = (RetroTS.py -c $efile -r $rfile -v 2 -p 50 -n 10 -prefix rts.$ind)
  38. echo $cmd | tee $lfile
  39. $cmd >>& $lfile
  40. end
  41. echo ""
  42. foreach rfile ( rts.*.1D)
  43. echo $rfile : `1d_tool.py -infile $rfile -show_rows_cols`
  44. end
  45. echo ""