Changeset 30096
- Timestamp:
- Dec 17, 2010, 9:20:43 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psphot/src/psphotSourceMatch.c
r29936 r30096 187 187 pmPhotObj *obj = objects->data[i]; 188 188 189 // we will find the input source with the max number of spans and reproduce that footprint 190 int nSpansMax = 0; 191 int iSpansMax = -1; 192 189 193 // mark the images for which sources have been found 190 194 psVectorInit (found, 0); … … 196 200 psAssert (index < found->n, "invalid index"); 197 201 202 if (src->peak && src->peak->footprint && src->peak->footprint->nspans > nSpansMax) { 203 nSpansMax = src->peak->footprint->nspans; 204 iSpansMax = j; 205 } 206 198 207 found->data.U8[index] = 1; 208 } 209 210 // we make a copy of the largest footprint; this will be used for all new sources associated with this object 211 pmFootprint *footprint = NULL; 212 if (iSpansMax != -1) { // copy the footprint info 213 pmSource *src = obj->sources->data[iSpansMax]; 214 psAssert(src->peak, "source does not exist?"); 215 psAssert(src->peak->footprint, "footprint does not exist"); 216 psAssert(src->peak->footprint->nspans == nSpansMax, "wrong footprint?"); 217 218 // we only care about the spans, do not worry about the image of this footprint 219 footprint = pmFootprintCopyData(src->peak->footprint, NULL); 199 220 } 200 221 … … 219 240 peak->dy = NAN; 220 241 221 // XXX assign to a footprint? 242 // assign to a footprint on this readout->image 243 peak->footprint = pmFootprintCopyData(footprint, readout->image); 222 244 223 245 // create a new source … … 241 263 psFree (peak); 242 264 } 265 psFree (footprint); 243 266 } 244 267
Note:
See TracChangeset
for help on using the changeset viewer.
