Index: trunk/psastro/src/psastroExtractStars.c
===================================================================
--- trunk/psastro/src/psastroExtractStars.c	(revision 23665)
+++ trunk/psastro/src/psastroExtractStars.c	(revision 23666)
@@ -76,4 +76,5 @@
 
     int nExt = 0;
+    int nExtGhost = 0;
 
     // open the output file handle: we are just saving a series of extensions to this file
@@ -157,4 +158,5 @@
                     psMetadataAddF32 (header, PS_LIST_TAIL, "FPA_Y",   0, "focal-plane coordinate", ref->FP->y);
                     psMetadataAddF32 (header, PS_LIST_TAIL, "MAG",     0, "magnitude",              ref->Mag);
+                    psMetadataAddF32 (header, PS_LIST_TAIL, "INST_MAG",0, "instrumental magnitude", ref->Mag - MagOffset);
 
 		    snprintf (extname, 80, "extname.%05d", nExt);
@@ -175,5 +177,5 @@
 
 		    pmReadout *inReadout = pmFPAviewThisReadout (view, input->fpa);
-		    psImage *subraster = psastroExtractStar (inReadout->image, ghost->chip->x, ghost->chip->y, 200.0, 200.0);
+		    psImage *subraster = psastroExtractStar (inReadout->image, ghost->chip->x, ghost->chip->y, 400.0, 400.0);
 		    if (!subraster) continue;
 		    
@@ -187,8 +189,9 @@
                     psMetadataAddF32 (header, PS_LIST_TAIL, "FPA_Y0",  0, "star focal-plane coordinate", ghost->TP->y); // note : over-loaded value 
                     psMetadataAddF32 (header, PS_LIST_TAIL, "MAG",     0, "magnitude",              ghost->Mag);
-
-		    snprintf (extname, 80, "extname.%05d", nExt);
-		    psFitsWriteImage (outStars, header, subraster, 0, extname);
-		    nExt ++;
+                    psMetadataAddF32 (header, PS_LIST_TAIL, "INST_MAG",0, "instrumental magnitude", ghost->Mag - MagOffset);
+
+		    snprintf (extname, 80, "extname.%05d", nExtGhost);
+		    psFitsWriteImage (outGhosts, header, subraster, 0, extname);
+		    nExtGhost ++;
 		    
 		    psFree (header);
@@ -204,4 +207,5 @@
 
     psFitsClose (outStars);
+    psFitsClose (outGhosts);
     psFree (view);
     return true;
