Index: branches/eam_branches/psphot.stack.20100120/src/psphotAddNoise.c
===================================================================
--- branches/eam_branches/psphot.stack.20100120/src/psphotAddNoise.c	(revision 26681)
+++ branches/eam_branches/psphot.stack.20100120/src/psphotAddNoise.c	(revision 26688)
@@ -31,5 +31,5 @@
 }
 
-bool psphotAddOrSubNoise (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe, bool add) {
+bool psphotAddOrSubNoiseReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe, bool add) {
 
     bool status = false;
@@ -40,5 +40,5 @@
     // find the currently selected readout
     pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest
-    psAssert (readout, "missing file?");
+    psAssert (file, "missing file?");
 
     pmReadout *readout = pmFPAviewThisReadout(view, file->fpa);
@@ -47,5 +47,8 @@
     psAssert (readout->parent->concepts, "missing concepts?");
 
-    psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES");
+    pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
+    psAssert (detections, "missing detections?");
+
+    psArray *sources = detections->allSources;
     psAssert (sources, "missing sources?");
 
