Index: trunk/Ohana/src/relphot/include/relphot.h
===================================================================
--- trunk/Ohana/src/relphot/include/relphot.h	(revision 41404)
+++ trunk/Ohana/src/relphot/include/relphot.h	(revision 41428)
@@ -667,5 +667,8 @@
 
 // in extra.c
+int isMosaicChip  (int photcode);
+
 int isGPC1chip  (int photcode);
+int isGPC2chip  (int photcode);
 int isGPC1stack (int photcode);
 int isGPC1warp  (int photcode);
Index: trunk/Ohana/src/relphot/src/ImageOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/ImageOps.c	(revision 41404)
+++ trunk/Ohana/src/relphot/src/ImageOps.c	(revision 41428)
@@ -848,5 +848,5 @@
     if (image[i].flags & IMAGE_BAD) continue;
 
-    if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
+    if (FREEZE_IMAGES && isMosaicChip(image[i].photcode)) continue;
 
     mlist[N] = image[i].McalPSF;
@@ -961,5 +961,5 @@
   for (i = 0; i < Nimage; i++) {
 
-    if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
+    if (FREEZE_IMAGES && isMosaicChip(image[i].photcode)) continue;
 
     Mlist[Nplot] = image[i].McalPSF;
@@ -1008,5 +1008,5 @@
 
   for (i = 0; i < Nimage; i++) {
-    if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
+    if (FREEZE_IMAGES && isMosaicChip(image[i].photcode)) continue;
 
     bin = image[i].dMcal / 0.00025;
@@ -1045,5 +1045,5 @@
     if (image[i].flags & IMAGE_BAD)  continue;
 
-    if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
+    if (FREEZE_IMAGES && isMosaicChip(image[i].photcode)) continue;
 
     N = 0;
@@ -1094,5 +1094,5 @@
     if (image[i].flags & IMAGE_BAD)  continue;
 
-    if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
+    if (FREEZE_IMAGES && isMosaicChip(image[i].photcode)) continue;
 
     list[n] = image[i].McalChiSq;
@@ -1127,5 +1127,5 @@
     if (image[i].flags & IMAGE_BAD)  continue;
 
-    if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
+    if (FREEZE_IMAGES && isMosaicChip(image[i].photcode)) continue;
 
     list[n] = image[i].McalPSF;
@@ -1160,5 +1160,5 @@
     if (image[i].flags & IMAGE_BAD)  continue;
 
-    if (FREEZE_IMAGES && isGPC1chip(image[i].photcode)) continue;
+    if (FREEZE_IMAGES && isMosaicChip(image[i].photcode)) continue;
 
     list[n] = image[i].dMcal;
Index: trunk/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 41404)
+++ trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 41428)
@@ -173,5 +173,5 @@
   int Nmoschip = 0;
   for (i = 0; i < Nsubset; i++) {
-    if (!isGPC1chip(subset[i].photcode)) continue;
+    if (!isMosaicChip(subset[i].photcode)) continue;
     startTimes[Nmoschip] = subset[i].tzero;
     Nmoschip ++;
@@ -238,5 +238,5 @@
     }
     
-    if (!isGPC1chip(image[i].photcode)) continue;
+    if (!isMosaicChip(image[i].photcode)) continue;
 
     /* set image time range */
@@ -262,5 +262,5 @@
     ImageToMosaic[i] = -1;
 
-    if (!isGPC1chip(subset[i].photcode)) {
+    if (!isMosaicChip(subset[i].photcode)) {
       Nsimple ++;
       continue;
@@ -346,5 +346,5 @@
   int Nmoschip = 0;
   for (i = 0; i < Nimage; i++) {
-    if (!isGPC1chip(image[i].photcode)) continue;
+    if (!isMosaicChip(image[i].photcode)) continue;
     startTimes[Nmoschip] = image[i].tzero;
     Nmoschip ++;
@@ -409,5 +409,5 @@
     ImageToMosaic[i] = -1;
 
-    if (!isGPC1chip(image[i].photcode)) {
+    if (!isMosaicChip(image[i].photcode)) {
       Nsimple ++;
       continue;
Index: trunk/Ohana/src/relphot/src/extra.c
===================================================================
--- trunk/Ohana/src/relphot/src/extra.c	(revision 41404)
+++ trunk/Ohana/src/relphot/src/extra.c	(revision 41428)
@@ -1,3 +1,12 @@
 # include "relphot.h"
+
+int isMosaicChip (int photcode) {
+
+  if (isGPC1chip(photcode)) return TRUE;
+  if (isGPC2chip(photcode)) return TRUE;
+  if (isHSCchip(photcode))  return TRUE;
+  if (isCFHchip(photcode))  return TRUE; // this is megacam
+  return FALSE;
+}
 
 // for now (20140710) I need to identify gpc1 chips explicitly.  generalize in the future
@@ -24,4 +33,17 @@
   if (((photcode > 10400) && (photcode < 10477)) || (photcode == 4500)) return TRUE; // y-band
   if (((photcode > 10500) && (photcode < 10577)) || (photcode == 4600)) return TRUE; // w-band
+
+  return FALSE;
+}
+
+// for now, I need to identify gpc2 chips explicitly.  generalize in the future
+int isGPC2chip (int photcode) {
+
+  if ((photcode >= 30000) && (photcode <= 30077)) return TRUE; // g-band
+  if ((photcode >= 30100) && (photcode <= 30177)) return TRUE; // r-band
+  if ((photcode >= 30200) && (photcode <= 30277)) return TRUE; // i-band
+  if ((photcode >= 30300) && (photcode <= 30377)) return TRUE; // z-band
+  if ((photcode >= 30400) && (photcode <= 30477)) return TRUE; // y-band
+  if ((photcode >= 30500) && (photcode <= 30577)) return TRUE; // w-band
 
   return FALSE;
