Index: trunk/ppSub/src/ppSubDefineOutput.c
===================================================================
--- trunk/ppSub/src/ppSubDefineOutput.c	(revision 40343)
+++ trunk/ppSub/src/ppSubDefineOutput.c	(revision 40344)
@@ -198,4 +198,12 @@
     psMetadataAddStr(tgtHeader, PS_LIST_TAIL, keyword, PS_META_REPLACE, "input image", string);
   }
+
+  // Copy PSREFCAT from the source to the target as well
+  snprintf(keyword, 80, "PSREFCAT");
+  char *string = psMetadataLookupStr(&status, srcHeader, keyword);
+  if (status) {
+    psMetadataAddStr(tgtHeader, PS_LIST_TAIL, keyword, PS_META_REPLACE, "input image reference catalog", string);
+  }
+  
   return true;
 }
Index: trunk/pswarp/src/pswarpLoop.c
===================================================================
--- trunk/pswarp/src/pswarpLoop.c	(revision 40343)
+++ trunk/pswarp/src/pswarpLoop.c	(revision 40344)
@@ -58,4 +58,5 @@
     }
 
+    psString refcat = NULL;
     // loop over this section once per input group
     for (int i = 0; i < nInputs; i++) {
@@ -121,4 +122,12 @@
 			    psMetadataAddPtr(readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_DATA_ARRAY, "Sources from input astrometry", detections);
 			}
+
+			// Determine the reference catalog used
+			if (!refcat) {
+			  refcat = psMetadataLookupStr(NULL, astromRO->parent->parent->hdu->header, "PSREFCAT");
+			  psMetadataAddStr(output->fpa->analysis, PS_LIST_TAIL, "REFERENCE_CATALOG", PS_META_REPLACE, "Reference catalog used for calibration.", refcat);
+			}
+
+			
 		    }
 
Index: trunk/pswarp/src/pswarpUpdateMetadata.c
===================================================================
--- trunk/pswarp/src/pswarpUpdateMetadata.c	(revision 40343)
+++ trunk/pswarp/src/pswarpUpdateMetadata.c	(revision 40344)
@@ -20,4 +20,5 @@
     bool bilevelAstrometry = psMetadataLookupBool (NULL, skycell->analysis, "ASTROMETRY.BILEVEL");
 
+    psString refcat = psMetadataLookupStr (NULL, output->analysis, "REFERENCE_CATALOG");
     pmChip *chip;
     while ((chip = pmFPAviewNextChip (view, output, 1)) != NULL) {
@@ -165,4 +166,8 @@
     }
 
+    if (refcat) {
+      psMetadataAddStr(output->hdu->header, PS_LIST_TAIL, "PSREFCAT", PS_META_REPLACE, "Reference catalog used for calibration", refcat);
+    }
+    
     // apply the bilevel astrometry elements to the target
     if (bilevelAstrometry) {
