Index: trunk/psastro/src/psastroDataSave.c
===================================================================
--- trunk/psastro/src/psastroDataSave.c	(revision 27065)
+++ trunk/psastro/src/psastroDataSave.c	(revision 33669)
@@ -72,4 +72,8 @@
                 if (hdu && hdu != lastHDU) {
                     psastroVersionHeaderFull(hdu->header);
+		    // Append teh reference catalog to the header as well.
+		    psMetadata *recipe = psMetadataLookupPtr(NULL, config->recipes, PSASTRO_RECIPE);
+		    psMetadataAddStr(hdu->header,PS_LIST_TAIL,"PSREFCAT",PS_META_REPLACE,NULL,
+				     psMetadataLookupStr(NULL,recipe,"PSASTRO.CATDIR"));
                     lastHDU = hdu;
                 }
