- Timestamp:
- Sep 19, 2009, 8:49:41 AM (17 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090715/psphot/src/psphotRadialProfileByAngles.c
r25433 r25452 10 10 psVector *psphotLineValuesBresen (psImage *image, int X1, int Y1, int X2, int Y2, int dW, int swapcoords); 11 11 12 bool psphotRadialProfilesByAngles (pmSource *source, pmPetrosian *petrosian,int Nsec, float Rmax) {12 bool psphotRadialProfilesByAngles (pmSource *source, int Nsec, float Rmax) { 13 13 14 14 // we want to have an even number of sectors so we can do 180 deg symmetrizing … … 16 16 float dtheta = 2.0*M_PI / Nsec; 17 17 18 psFree(petrosian->radii); 19 psFree(petrosian->fluxes); 20 psFree(petrosian->theta); 21 22 petrosian->radii = psArrayAllocEmpty(Nsec); 23 petrosian->fluxes = psArrayAllocEmpty(Nsec); 24 petrosian->theta = psVectorAllocEmpty(Nsec, PS_TYPE_F32); 18 pmSourceRadialProfile *profile = source->extpars->profile; 19 psFree(profile->radii); 20 psFree(profile->fluxes); 21 psFree(profile->theta); 22 23 profile->radii = psArrayAllocEmpty(Nsec); 24 profile->fluxes = psArrayAllocEmpty(Nsec); 25 profile->theta = psVectorAllocEmpty(Nsec, PS_TYPE_F32); 25 26 26 27 … … 72 73 } 73 74 74 psArrayAdd (p etrosian->radii, 100, radius);75 psArrayAdd (p etrosian->fluxes, 100, flux);76 psVectorAppend (p etrosian->theta, theta);75 psArrayAdd (profile->radii, 100, radius); 76 psArrayAdd (profile->fluxes, 100, flux); 77 psVectorAppend (profile->theta, theta); 77 78 78 79 // psphotPetrosianVisualProfileByAngle (radius, flux); … … 84 85 for (int i = 0; i < Nsec / 2; i++) { 85 86 86 psVector *r1 = p etrosian->radii->data[i];87 psVector *r2 = p etrosian->radii->data[i+Nsec/2];88 89 psVector *f1 = p etrosian->fluxes->data[i];90 psVector *f2 = p etrosian->fluxes->data[i+Nsec/2];87 psVector *r1 = profile->radii->data[i]; 88 psVector *r2 = profile->radii->data[i+Nsec/2]; 89 90 psVector *f1 = profile->fluxes->data[i]; 91 psVector *f2 = profile->fluxes->data[i+Nsec/2]; 91 92 92 93 psAssert (r1->n == r2->n, "mis-matched vectors");
Note:
See TracChangeset
for help on using the changeset viewer.
