Changeset 21366 for trunk/psphot/src/psphotAnnuli.c
- Timestamp:
- Feb 5, 2009, 5:03:33 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotAnnuli.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotAnnuli.c
r21183 r21366 11 11 12 12 psVector *radius = source->extpars->profile->radius; 13 psVector * weight = source->extpars->profile->weight;13 psVector *variance = source->extpars->profile->variance; 14 14 psVector *flux = source->extpars->profile->flux; 15 15 … … 22 22 psVector *fluxValues = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32); 23 23 psVector *fluxSquare = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32); 24 psVector *flux Weight= psVectorAlloc (radialBinsLower->n, PS_TYPE_F32);24 psVector *fluxVariance = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32); 25 25 psVector *pixelCount = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32); 26 26 psVectorInit (fluxValues, 0.0); 27 27 psVectorInit (fluxSquare, 0.0); 28 psVectorInit (flux Weight, 0.0);28 psVectorInit (fluxVariance, 0.0); 29 29 psVectorInit (pixelCount, 0.0); 30 30 31 31 // XXX this code assumes the radii are in pixels. convert from arcsec with plate scale 32 32 // XXX assume the annulii above are not overlapping? much faster... 33 // XXX this might be must faster in the reverse order: loop over annulii and use disection to 33 // XXX this might be must faster in the reverse order: loop over annulii and use disection to 34 34 // skip to the start of the annulus. 35 35 for (int i = 0; i < flux->n; i++) { … … 39 39 fluxValues->data.F32[j] += flux->data.F32[i]; 40 40 fluxSquare->data.F32[j] += PS_SQR(flux->data.F32[i]); 41 flux Weight->data.F32[j] += weight->data.F32[i];41 fluxVariance->data.F32[j] += variance->data.F32[i]; 42 42 pixelCount->data.F32[j] += 1.0; 43 43 } … … 49 49 fluxSquare->data.F32[j] -= PS_SQR(fluxValues->data.F32[j]); 50 50 } 51 51 52 52 source->extpars->annuli = pmSourceAnnuliAlloc (); 53 53 source->extpars->annuli->flux = fluxValues; 54 source->extpars->annuli->fluxErr = flux Weight;54 source->extpars->annuli->fluxErr = fluxVariance; 55 55 source->extpars->annuli->fluxVar = fluxSquare; 56 56
Note:
See TracChangeset
for help on using the changeset viewer.
