Index: /branches/eam_branches/ipp-20130419/pswarp/src/pswarpCleanup.c
===================================================================
--- /branches/eam_branches/ipp-20130419/pswarp/src/pswarpCleanup.c	(revision 35514)
+++ /branches/eam_branches/ipp-20130419/pswarp/src/pswarpCleanup.c	(revision 35515)
@@ -21,5 +21,7 @@
     pswarpFileActivation(config, photFiles, false);
     pswarpFileActivation(config, independentFiles, false);
+
     pswarpFileActivation(config, skycellFiles, true);
+    pmFPAfileActivate(config->files, true, "PSWARP.OUTPUT.SOURCES");
 
     pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, "PSWARP.OUTPUT");
Index: /branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoop.c
===================================================================
--- /branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoop.c	(revision 35514)
+++ /branches/eam_branches/ipp-20130419/pswarp/src/pswarpLoop.c	(revision 35515)
@@ -40,5 +40,5 @@
 
     // select the input data sources
-    pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PSWARP.INPUT");
+    pmFPAfile *input = psMetadataLookupPtr(&status, config->files, "PSWARP.INPUT");
     if (!input) {
         psError(PSWARP_ERR_CONFIG, true, "Can't find input data!\n");
@@ -47,5 +47,5 @@
 
     // use the external astrometry source if supplied
-    pmFPAfile *astrom = psMetadataLookupPtr(NULL, config->files, "PSWARP.ASTROM");
+    pmFPAfile *astrom = psMetadataLookupPtr(&status, config->files, "PSWARP.ASTROM");
     if (!astrom) {
         astrom = input;
@@ -58,5 +58,5 @@
 
     // select the input data sources
-    pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, "PSWARP.OUTPUT");
+    pmFPAfile *output = psMetadataLookupPtr(&status, config->files, "PSWARP.OUTPUT");
     if (!output) {
         psError(PSWARP_ERR_CONFIG, true, "Can't find output data!\n");
@@ -65,5 +65,5 @@
 
     // use the external astrometry source if supplied
-    pmFPAfile *skycell = psMetadataLookupPtr(NULL, config->files, "PSWARP.SKYCELL");
+    pmFPAfile *skycell = psMetadataLookupPtr(&status, config->files, "PSWARP.SKYCELL");
     if (!skycell) {
         psError(PSWARP_ERR_DATA, true, "Cannot find output astrometry.");
@@ -132,14 +132,11 @@
                 }
 
-/// XXX ignore sources for now
-# if (0)
                 // Copy the detections from the astrometry carrier to the input, so they can be accessed by
                 // pswarpTransformReadout
                 pmReadout *astromRO = pmFPAviewThisReadout(view, astrom->fpa); // Readout for astrometry
-                pmDetections *detections = psMetadataLookupPtr(&mdok, astromRO->analysis, "PSPHOT.DETECTIONS"); // Sources from astrometry
+                pmDetections *detections = psMetadataLookupPtr(&status, astromRO->analysis, "PSPHOT.DETECTIONS"); // Sources from astrometry
                 if (detections) {
                     psMetadataAddPtr(readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_DATA_ARRAY, "Sources from input astrometry", detections);
                 }
-# endif
 
                 pswarpTransformToTarget(output->fpa, readout, config);
