Index: /branches/czw_branch/20170908/ippconfig/hsc/psastro.config
===================================================================
--- /branches/czw_branch/20170908/ippconfig/hsc/psastro.config	(revision 40398)
+++ /branches/czw_branch/20170908/ippconfig/hsc/psastro.config	(revision 40399)
@@ -170,4 +170,5 @@
 
 
+
 # The slopes and radii and region below are all in FPA units, 1/13.5 of a regular pixel.
 GLINT.REGION			MULTI
@@ -185,5 +186,5 @@
     @R_TERMS			F32	-4375.9715493905  9717.6993803237   -5203.2424778605 # a comment
     FACTOR			F32	1.002
-    LIMIT			F32	14.0
+    LIMIT			F32	-23.0
   END
   GLINT.FILTER.TERM		METADATA
@@ -192,5 +193,5 @@
     @R_TERMS			F32	 -4263.2230039887  9457.4516871365  -5057.2762518308 # a comment
     FACTOR			F32	 1.0015
-    LIMIT			F32	 13.5
+    LIMIT			F32	 -23.5
   END
   GLINT.FILTER.TERM		METADATA
@@ -199,5 +200,5 @@
     @R_TERMS			F32	 -4154.5095389959  9215.4140278639  -4924.2923196315 # a comment
     FACTOR			F32	1.001
-    LIMIT			F32	13.5
+    LIMIT			F32	-23.5
   END
   GLINT.FILTER.TERM		METADATA
@@ -213,5 +214,5 @@
     @R_TERMS			F32	 -3637.0352789862  8104.8245491120  -4330.4583627761 # a comment
     FACTOR			F32	1.000
-    LIMIT			F32	13.0
+    LIMIT			F32	-23.0
   END
   GLINT.FILTER.TERM		METADATA
@@ -220,5 +221,5 @@
     @R_TERMS			F32	 -4154.5095389959  9215.4140278639  -4924.2923196315 # a comment
     FACTOR			F32	1.001
-    LIMIT			F32	13.5
+    LIMIT			F32	-24.0
   END
   GLINT.FILTER.TERM		METADATA
@@ -227,5 +228,5 @@
     @R_TERMS			F32	 -3878.4529585585  8619.7241050446  -4604.3603386145 # a comment
     FACTOR			F32	1.0005
-    LIMIT			F32	12.0
+    LIMIT			F32	-24.0
   END
 
@@ -261,4 +262,10 @@
 #   GLINT.TYPE                    STR HSC
 # END
+
+GLINT_TEST METADATA
+   REFSTAR_MASK_GLINTS   BOOL TRUE
+   REFSTAR_MASK_GHOST    BOOL TRUE
+END
+
 
 STATICSKY_CAL   METADATA
Index: /branches/czw_branch/20170908/ippconfig/recipes/psastro.config
===================================================================
--- /branches/czw_branch/20170908/ippconfig/recipes/psastro.config	(revision 40398)
+++ /branches/czw_branch/20170908/ippconfig/recipes/psastro.config	(revision 40399)
@@ -343,2 +343,4 @@
 END
 
+GLINT_TEST METADATA
+END
Index: /branches/czw_branch/20170908/ippconfig/recipes/reductionClasses.mdc
===================================================================
--- /branches/czw_branch/20170908/ippconfig/recipes/reductionClasses.mdc	(revision 40398)
+++ /branches/czw_branch/20170908/ippconfig/recipes/reductionClasses.mdc	(revision 40399)
@@ -164,4 +164,29 @@
 	ADDSTAR		  STR	  ADDSTAR
 	PSASTRO		  STR	  DEFAULT_RECIPE
+	STACKPHOT_PSPHOT  STR     STACKPHOT
+	STACKPHOT_PPSUB   STR     STACKPHOT
+	STACKPHOT_PPSTACK STR     STACKPHOT
+	STACKPHOT_SINGLE_PSPHOT  STR     STACKPHOT_SINGLE
+	BACKGROUND_PPBACKGROUND	STR	BACKGROUND
+	BACKGROUND_PSWARP	STR	BACKGROUND
+        PSVIDEOPHOT             STR     PSVIDEOPHOT
+        STATICSKY_CALIBRATION   STR     STATICSKY_CAL
+        FULLFORCE_PSPHOT  STR   FULLFORCE_WARP
+END
+
+GLINT_TEST		METADATA
+	CHIP_PPIMAGE	  STR	  CHIP
+	CHIP_PSPHOT	  STR	  CHIP
+	WARP_PSWARP	  STR	  WARP
+	STACK_PPSTACK	  STR	  STACK
+	STACK_PPSUB	  STR	  STACK
+	STACK_PSPHOT	  STR	  STACK
+	DIFF_PPSUB	  STR	  DIFF
+	DIFF_PSPHOT	  STR	  DIFF
+	JPEG_BIN1	  STR	  PPIMAGE_J1
+	JPEG_BIN2	  STR	  PPIMAGE_J2
+	FAKEPHOT	  STR	  FAKEPHOT
+	ADDSTAR		  STR	  ADDSTAR
+	PSASTRO		  STR	  GLINT_TEST
 	STACKPHOT_PSPHOT  STR     STACKPHOT
 	STACKPHOT_PPSUB   STR     STACKPHOT
Index: /branches/czw_branch/20170908/psastro/src/psastroLoadGlints.c
===================================================================
--- /branches/czw_branch/20170908/psastro/src/psastroLoadGlints.c	(revision 40398)
+++ /branches/czw_branch/20170908/psastro/src/psastroLoadGlints.c	(revision 40399)
@@ -345,4 +345,5 @@
 		scale_factor = psMetadataLookupF32(&status, refItem->data.md, "FACTOR");
 		double limit = psMetadataLookupF32(&status, refItem->data.md, "LIMIT");
+		limit += MagOffset;
 		if (star->Mag > limit) { continue; }
 	      }
@@ -407,5 +408,6 @@
 	      psPlane *tp = psPlaneAlloc();
 
-	      fprintf(stderr,"HSC GLINT: x1x2(%f %f) (%f %f) x1sx1e (%f %f %f %f) x2sx2e (%f %f %f %f)\n",
+	      fprintf(stderr,"HSC GLINT %f: x1x2(%f %f) (%f %f) x1sx1e (%f %f %f %f) x2sx2e (%f %f %f %f)\n",
+		      star->Mag,
 		      x1,y1,x2,y2,
 		      x1s,y1s,x1e,y1e,
