IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 19, 2009, 8:49:41 AM (17 years ago)
Author:
eugene
Message:

further work on the petrosian analysis & extended sources

File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/psphot/src/psphotRadialProfileByAngles.c

    r25433 r25452  
    1010psVector *psphotLineValuesBresen (psImage *image, int X1, int Y1, int X2, int Y2, int dW, int swapcoords);
    1111
    12 bool psphotRadialProfilesByAngles (pmSource *source, pmPetrosian *petrosian, int Nsec, float Rmax) {
     12bool psphotRadialProfilesByAngles (pmSource *source, int Nsec, float Rmax) {
    1313
    1414    // we want to have an even number of sectors so we can do 180 deg symmetrizing
     
    1616    float dtheta = 2.0*M_PI / Nsec;
    1717
    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);
    2526
    2627
     
    7273        }
    7374
    74         psArrayAdd (petrosian->radii, 100, radius);
    75         psArrayAdd (petrosian->fluxes, 100, flux);
    76         psVectorAppend (petrosian->theta, theta);
     75        psArrayAdd (profile->radii, 100, radius);
     76        psArrayAdd (profile->fluxes, 100, flux);
     77        psVectorAppend (profile->theta, theta);
    7778
    7879        // psphotPetrosianVisualProfileByAngle (radius, flux);
     
    8485    for (int i = 0; i < Nsec / 2; i++) {
    8586
    86         psVector *r1 = petrosian->radii->data[i];
    87         psVector *r2 = petrosian->radii->data[i+Nsec/2];
    88 
    89         psVector *f1 = petrosian->fluxes->data[i];
    90         psVector *f2 = petrosian->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];
    9192
    9293        psAssert (r1->n == r2->n, "mis-matched vectors");
Note: See TracChangeset for help on using the changeset viewer.