- Timestamp:
- Sep 17, 2009, 2:26:32 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/psphot/src/psphotRadialProfileByAngle.c
r25361 r25433 1 1 # include "psphotInternal.h" 2 2 3 // Given a source at (x,y), generate a collection of radial profiles at even angular 4 // separations 5 3 // Given a source at (x,y), generate a collection of radial profiles at even angular separations 4 5 // These functions are used to calculate the stats in a rectangle at arbitrary orientation. 6 // XXX Move these elsewhere (psLib?) 6 7 float psphotMeanSectorValue (psImage *image, float x, float y, float dL, float dW, float theta); 7 8 psVector *psphotBoxValues (psImage *image, float x0, float y0, float dL, float dW, float theta); … … 9 10 psVector *psphotLineValuesBresen (psImage *image, int X1, int Y1, int X2, int Y2, int dW, int swapcoords); 10 11 11 bool psphotRadialProfilesByAngles (pm Petrosian *petrosian, pmSource *source, int Nsec, float Rmax) {12 bool psphotRadialProfilesByAngles (pmSource *source, pmPetrosian *petrosian, int Nsec, float Rmax) { 12 13 13 14 // we want to have an even number of sectors so we can do 180 deg symmetrizing … … 124 125 125 126 psVector *values = psphotBoxValues (image, x, y, dL, dW, theta); 127 if (!values) goto escape; 128 if (!values->n) goto escape; 126 129 127 130 psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN); … … 134 137 135 138 return value; 139 140 escape: 141 psFree(values); 142 return NAN; 136 143 } 137 144
Note:
See TracChangeset
for help on using the changeset viewer.
