Changeset 5980 for trunk/psphot/src/psphotDefinePixels.c
- Timestamp:
- Jan 13, 2006, 8:24:10 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotDefinePixels.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotDefinePixels.c
r5134 r5980 16 16 mySource->weight = psImageSubset(imdata->weight, srcRegion); 17 17 mySource->mask = psImageSubset(imdata->mask, srcRegion); 18 mySource->region = srcRegion; 18 19 19 return (mySource);20 return true; 20 21 } 21 22 23 bool psphotRedefinePixels(pmSource *mySource, 24 const eamReadout *imdata, 25 psF32 x, 26 psF32 y, 27 psF32 Radius) 28 { 29 bool extend; 30 psRegion newRegion; 31 32 if (Radius == 0) return false; 33 34 // check to see if new region is completely contained within old region 35 newRegion = psRegionForSquare (x, y, Radius); 36 newRegion = psRegionForImage (imdata->image, newRegion); 37 38 extend = false; 39 extend |= (int)(newRegion.x0) < (int)(mySource->region.x0); 40 extend |= (int)(newRegion.x1) > (int)(mySource->region.x1); 41 extend |= (int)(newRegion.y0) < (int)(mySource->region.y0); 42 extend |= (int)(newRegion.y1) > (int)(mySource->region.y1); 43 44 extend |= (mySource->pixels == NULL); 45 extend |= (mySource->weight == NULL); 46 extend |= (mySource->mask == NULL); 47 48 // extend = true; 49 if (extend) { 50 // Grab a new subimage 51 // psFree (mySource->pixels); 52 // psFree (mySource->weight); 53 // psFree (mySource->mask); 54 55 // fprintf (stderr, "extend %f,%f\n", x, y); 56 mySource->pixels = psImageSubset(imdata->image, newRegion); 57 mySource->weight = psImageSubset(imdata->weight, newRegion); 58 mySource->mask = psImageSubset(imdata->mask, newRegion); 59 mySource->region = newRegion; 60 } 61 62 return extend; 63 } 64 65 66 //**** this function was ALWAYS restricting to model->radius 67 // should have left it larger (PSF_FIT_RAD) for the faint sources
Note:
See TracChangeset
for help on using the changeset viewer.
