Index: trunk/Ohana/src/addstar/src/getusnob.c
===================================================================
--- trunk/Ohana/src/addstar/src/getusnob.c	(revision 16938)
+++ trunk/Ohana/src/addstar/src/getusnob.c	(revision 16939)
@@ -16,13 +16,15 @@
   int spd, spd_start, spd_end;
   int NUSNO, Nusno, Nstars;
-  short int USNO_RED, USNO_BLUE;
+  short int USNO_RED, USNO_BLUE, USNO_N;
   e_time USNOepoch;
   Stars *stars;
 
   /* require photcode */
-  NAMED_PHOTCODE (USNO_RED, "USNO_RED");
+  NAMED_PHOTCODE (USNO_RED,  "USNO_RED");
   NAMED_PHOTCODE (USNO_BLUE, "USNO_BLUE");
-  if (photcode == USNO_RED) goto good_code;
+  NAMED_PHOTCODE (USNO_N,    "USNO_N");
+  if (photcode == USNO_RED)  goto good_code;
   if (photcode == USNO_BLUE) goto good_code;
+  if (photcode == USNO_N)    goto good_code;
   Shutdown ("USNO photcode not specified");
 good_code:
@@ -148,14 +150,18 @@
       stars[Nusno].t     = USNOepoch;
 
-      /* one pass of addstar does either r or b */
+      /* one pass of addstar does r, b, or n */
       if (photcode == USNO_BLUE) {
-	m1 = fabs(0.01 * (buf[5] % 10000)); /* 1st blue mag */
-	m2 = fabs(0.01 * (buf[7] % 10000)); /* 1st blue mag */
-	stars[Nusno].code  = USNO_BLUE;
-      } else {
-	m1 = fabs(0.01 * (buf[6] % 10000)); /* 1st red mag */
-	m2 = fabs(0.01 * (buf[8] % 10000)); /* 2nd red mag */
-	stars[Nusno].code  = USNO_RED;
-      }	
+	  m1 = fabs(0.01 * (buf[5] % 10000)); /* 1st blue mag */
+	  m2 = fabs(0.01 * (buf[7] % 10000)); /* 1st blue mag */
+      }
+      if (photcode == USNO_RED) {
+	  m1 = fabs(0.01 * (buf[6] % 10000)); /* 1st red mag */
+	  m2 = fabs(0.01 * (buf[8] % 10000)); /* 2nd red mag */
+      }
+      if (photcode == USNO_N) {
+	  m1 = fabs(0.01 * (buf[9] % 10000)); /* N (IR) survey */
+	  m2 = 0;
+      }
+      stars[Nusno].code = photcode;
 
       /* if two mags are available, get an average */
