Index: trunk/pswarp/src/pswarpLoop.c
===================================================================
--- trunk/pswarp/src/pswarpLoop.c	(revision 36835)
+++ 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);
+			}
+
+			
 		    }
 
