Index: branches/eam_branches/ipp-20130509/psphot/test/tap_psphot_galaxies.pro
===================================================================
--- branches/eam_branches/ipp-20130509/psphot/test/tap_psphot_galaxies.pro	(revision 35651)
+++ branches/eam_branches/ipp-20130509/psphot/test/tap_psphot_galaxies.pro	(revision 35652)
@@ -54,15 +54,15 @@
 $FakeConfig = $FakeConfig -Db GALAXY.GRID T                        ; # generate a grid of galaxies (constant mag)
 #$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_GAUSS
-$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_EXP
+#$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_EXP
 #$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_SERSIC
 #$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_DEV
 $FakeConfig = $FakeConfig -Df GALAXY.RMAJOR.MIN 10.0
 $FakeConfig = $FakeConfig -Df GALAXY.RMAJOR.MAX 10.0
-$FakeConfig = $FakeConfig -Df GALAXY.ARATIO.MIN 0.5
-$FakeConfig = $FakeConfig -Df GALAXY.ARATIO.MAX 0.5
+$FakeConfig = $FakeConfig -Df GALAXY.ARATIO.MIN 0.25
+$FakeConfig = $FakeConfig -Df GALAXY.ARATIO.MAX 0.25
 $FakeConfig = $FakeConfig -Df GALAXY.THETA.MIN 0 
 $FakeConfig = $FakeConfig -Df GALAXY.THETA.MAX 180
-$FakeConfig = $FakeConfig -Df GALAXY.INDEX.MIN 1
-$FakeConfig = $FakeConfig -Df GALAXY.INDEX.MAX 1
+$FakeConfig = $FakeConfig -Df GALAXY.INDEX.MIN 1.66
+$FakeConfig = $FakeConfig -Df GALAXY.INDEX.MAX 1.66
 $FakeConfig = $FakeConfig -Di GALAXY.GRID.DX 120
 $FakeConfig = $FakeConfig -Di GALAXY.GRID.DY 120
@@ -95,6 +95,6 @@
 # create a realistic distribution of fake stars, GAUSS PSF
 macro mkexp
-  if ($0 != 3)
-    echo "USAGE: mkexp basename fwhm"
+  if ($0 != 4)
+    echo "USAGE: mkexp basename (fwhm) (model)"
     break
   end
@@ -105,4 +105,5 @@
 
   # create the raw image
+  $FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_$3
   echo ppSim $FakeOptions $FakeConfig $basename -seeing $fwhm
   exec ppSim $FakeOptions $FakeConfig $basename -seeing $fwhm
@@ -447,4 +448,41 @@
 end
 
+macro plot.angles
+  if ($0 != 2)
+    echo "USAGE: plot.angles (file.dat)"
+    break
+  end
+
+  data $1
+  read x 1 y 2 type 4 trad 9 
+  set t = trad * 180 / 3.14159265
+  subset xs = x if (type == 1)
+  subset ys = y if (type == 1)
+  subset ts = t if (type == 1)
+
+  set cs = dcos(ts)
+  set sn = dsin(ts)
+
+  delete xp yp
+  erase red
+  for i 0 xs[]
+    point red LINE xs[$i] ys[$i] {10*cs[$i]} {10*sn[$i]}
+  end
+  plot xp yp -pt 100
+end
+
+macro check.flux
+  if ($0 != 2)
+    echo "USAGE: plot.angles (file.dat)"
+    break
+  end
+
+  data $1
+  read f 3 type 4
+  subset F = f if (type == 1)
+  set M = -2.5*log(F)
+  vstat M
+end
+
 if ($SCRIPT)
   echo "no default action defined"
