Index: /branches/eam_branches/ipp-20130904/psphot/test/tap_psphot_galaxygrid.pro
===================================================================
--- /branches/eam_branches/ipp-20130904/psphot/test/tap_psphot_galaxygrid.pro	(revision 36316)
+++ /branches/eam_branches/ipp-20130904/psphot/test/tap_psphot_galaxygrid.pro	(revision 36317)
@@ -611,5 +611,5 @@
   $psphotConfig = $psphotConfig -Db PSPHOT:POISSON.ERRORS.PHOT.LMM F
   $psphotConfig = $psphotConfig -Db PSPHOT:EXTENDED_SOURCE_FITS_POISSON F
-  $psphotConfig = $psphotConfig -Di PSPHOT:EXT_FIT_ITER 20
+  $psphotConfig = $psphotConfig -Di PSPHOT:EXT_FIT_ITER 15
   $psphotConfig = $psphotConfig -Df PSPHOT:PSF_FIT_RADIUS_SCALE 3.75
   $psphotConfig = $psphotConfig -Df PSPHOT:EXT_FIT_NSIGMA_CONV $NSIGMA_CONV
@@ -673,5 +673,7 @@
 
   break -auto off
+  output -err /dev/null
   read -fits Chip.xfit X_EXT Y_EXT EXT_INST_MAG EXT_WIDTH_MAJ EXT_WIDTH_MIN EXT_THETA MODEL_TYPE EXT_PAR_07
+  output -err stderr
   $reread = not($STATUS)
   break -auto on
@@ -707,11 +709,11 @@
   reindex rin_m = RminIn using index2
   
-  if ("$3" == "SERSIC")
+  # if ("$3" == "SERSIC")
     reindex Iot_m = EXT_PAR_07 using index1
     reindex Iin_m = IndexIn using index2
    $fields = X Y M T R r MT I
-  else
-   $fields = X Y M T R r MT
-  end
+  # else
+  # $fields = X Y M T R r MT
+  # end
   
   foreach field $fields
@@ -1332,10 +1334,10 @@
 
 macro check.fit
-  if ($0 != 3)
-    echo "USAGE: check.fit (dat) (cmf)"
-    break
-  end
-
-  cmf.load.concat $1 $2 EXP
+  if ($0 != 4)
+    echo "USAGE: check.fit (dat) (cmf) (type)"
+    break
+  end
+
+  cmf.load.concat $1 $2 $3
   set dM_m = Mot_m - Min_m
   vstat -q dM_m
@@ -1386,4 +1388,28 @@
 end
 
+macro check.convolve.loop
+  if ($0 != 2)
+    echo "check.convolve.loop (intype)"
+    break
+  end
+
+  local radius
+
+  $radius = 3.0
+
+  cmf.load.reset
+
+  # foreach Cin 3 5 7 9 11
+  foreach Cin 11
+    sprintf nameIn tests.20131120/test.nsig.%02d $Cin
+    foreach Cot 3 5 7 9 11
+      sprintf nameOt tests.20131120/test.serdev.%02d.%02d $Cin $Cot
+      echo -no-return $Cin $Cot " "
+      check.fit $nameIn.dat $nameOt.cmf $1
+    end
+  end
+  grid.plots.devexp a
+end
+
 macro run.convolve.loop
   local radius
@@ -1391,19 +1417,21 @@
   $radius = 3.0
 
-  foreach Cin 3 5 7 9 11
+  # foreach Cin 3 5 7 9 11
+  foreach Cin 11
     $CONVOLVE_NSIGMA = $Cin
     sprintf nameIn tests.20131120/test.nsig.%02d $Cin
-    mkexp.devexp.single $nameIn EXP $radius 1.0
+    # mkexp.devexp.single $nameIn EXP $radius 1.0
     foreach Cot 3 5 7 9 11
       $NSIGMA_CONV = $Cot
-      sprintf nameOt tests.20131120/test.nsig.%02d.%02d $Cin $Cot
+      sprintf nameOt tests.20131120/test.nsig.x.%02d.%02d $Cin $Cot
       fitexp $nameIn $nameOt EXP_CONV
     end
   end
 
-  foreach Cin 3 5 7 9 11
+  # foreach Cin 3 5 7 9 11
+  foreach Cin 11
     sprintf nameIn tests.20131120/test.nsig.%02d $Cin
     foreach Cot 3 5 7 9 11
-      sprintf nameOt tests.20131120/test.nsig.%02d.%02d $Cin $Cot
+      sprintf nameOt tests.20131120/test.nsig.x.%02d.%02d $Cin $Cot
       check.fit $nameIn.dat $nameOt.cmf 
     end
@@ -1412,2 +1440,84 @@
 end
 
+macro run.convolve.loop.dev
+  local radius
+
+  $radius = 3.0
+
+  foreach Cin 11
+    $CONVOLVE_NSIGMA = $Cin
+    sprintf nameIn tests.20131120/test.dev.%02d $Cin
+    mkexp.devexp.single $nameIn DEV $radius 1.0
+    foreach Cot 3 5 7 9 11
+      $NSIGMA_CONV = $Cot
+      sprintf nameOt tests.20131120/test.dev.%02d.%02d $Cin $Cot
+      fitexp $nameIn $nameOt DEV_CONV
+    end
+  end
+
+  # foreach Cin 3 5 7 9 11
+  foreach Cin 11
+    sprintf nameIn tests.20131120/test.dev.%02d $Cin
+    foreach Cot 3 5 7 9 11
+      sprintf nameOt tests.20131120/test.dev.%02d.%02d $Cin $Cot
+      check.fit $nameIn.dat $nameOt.cmf DEV
+    end
+  end
+  grid.plots.devexp a
+end
+
+macro run.convolve.loop.serexp
+  local radius
+
+  $radius = 3.0
+
+  foreach Cin 11
+    $CONVOLVE_NSIGMA = $Cin
+    sprintf nameIn tests.20131120/test.nsig.%02d $Cin
+    foreach Cot 3 5 7 9 11
+      $NSIGMA_CONV = $Cot
+      sprintf nameOt tests.20131120/test.serexp.%02d.%02d $Cin $Cot
+      fitexp $nameIn $nameOt SER_CONV
+    end
+  end
+
+  # foreach Cin 3 5 7 9 11
+  foreach Cin 11
+    sprintf nameIn tests.20131120/test.nsig.%02d $Cin
+    foreach Cot 3 5 7 9 11
+      sprintf nameOt tests.20131120/test.serexp.%02d.%02d $Cin $Cot
+      check.fit $nameIn.dat $nameOt.cmf EXP
+    end
+  end
+  grid.plots.devexp a
+end
+
+
+macro run.convolve.loop.serdev
+  local radius
+
+  $radius = 3.0
+
+  cmf.load.reset
+
+  foreach Cin 11
+    $CONVOLVE_NSIGMA = $Cin
+    sprintf nameIn tests.20131120/test.dev.%02d $Cin
+    foreach Cot 3 5 7 9 11
+      $NSIGMA_CONV = $Cot
+      sprintf nameOt tests.20131120/test.serdev.%02d.%02d $Cin $Cot
+      fitexp $nameIn $nameOt SER_CONV
+    end
+  end
+
+  # foreach Cin 3 5 7 9 11
+  foreach Cin 11
+    sprintf nameIn tests.20131120/test.dev.%02d $Cin
+    foreach Cot 3 5 7 9 11
+      sprintf nameOt tests.20131120/test.serdev.%02d.%02d $Cin $Cot
+      check.fit $nameIn.dat $nameOt.cmf DEV
+    end
+  end
+  grid.plots.devexp a
+end
+
