- Timestamp:
- Mar 9, 2009, 3:41:26 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090215
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppSub/src/ppSubMatchPSFs.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090215
- Property svn:mergeinfo changed
/branches/eam_branches/eam_branch_20090303 (added) merged: 23158,23175-23181,23202-23210,23220-23225 /trunk merged: 23211-23219,23226-23238
- Property svn:mergeinfo changed
-
branches/cnb_branches/cnb_branch_20090215/ppSub/src/ppSubMatchPSFs.c
r22419 r23239 50 50 51 51 // Sources in image, used for stamps: these must be loaded from previous analysis stages 52 pmReadout *sourcesRO = pmFPAfileThisReadout(config->files, view, "PPSUB.SOURCES"); // Readout with sources 53 psArray *sources = NULL; // Sources in image; used for stamps 54 if (sourcesRO) { 55 sources = psMetadataLookupPtr(&mdok, sourcesRO->analysis, "PSPHOT.SOURCES"); 52 psArray *inSources = psMetadataLookupPtr(&mdok, inRO->analysis, "PSPHOT.SOURCES"); // Input source list 53 psArray *refSources = psMetadataLookupPtr(&mdok, refRO->analysis, "PSPHOT.SOURCES"); // Ref source list 54 55 psArray *sources = NULL; // Merged list of sources 56 if (inSources && refSources) { 57 float radius = psMetadataLookupF32(NULL, recipe, "SOURCE.RADIUS"); // Matching radius 58 psArray *lists = psArrayAlloc(2); // Source lists 59 lists->data[0] = psMemIncrRefCounter(inSources); 60 lists->data[1] = psMemIncrRefCounter(refSources); 61 sources = pmSourceMatchMerge(lists, radius); 62 psFree(lists); 63 if (!sources) { 64 psError(PS_ERR_UNKNOWN, false, "Unable to merge source lists"); 65 return false; 66 } 67 } else if (inSources) { 68 sources = psMemIncrRefCounter(inSources); 69 } else if (refSources) { 70 sources = psMemIncrRefCounter(refSources); 56 71 } 72 73 psMetadataAddArray(inConv->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE, 74 "Merged source list", sources); 75 psMetadataAddArray(refConv->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE, 76 "Merged source list", sources); 77 psFree(sources); // Drop reference 57 78 58 79 int footprint = psMetadataLookupS32(NULL, recipe, "STAMP.FOOTPRINT"); // Stamp half-size … … 129 150 130 151 // XXX drop the pixels associated with inRO and refRO (now that we have inConv and refConf) 131 152 #ifdef TESTING 132 153 psphotSaveImage (NULL, inRO->image, "inRO.fits"); 133 154 psphotSaveImage (NULL, refRO->image, "refRO.fits"); 134 155 psphotSaveImage (NULL, inConv->image, "inConv.fits"); 135 156 psphotSaveImage (NULL, refConv->image, "refConv.fits"); 157 #endif 136 158 137 159 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
