IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 5:03:33 PM (17 years ago)
Author:
Paul Price
Message:

Merging pap_branch_20090128. Resolved a small number of conflicts. Compiles, but not tested in detail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotAnnuli.c

    r21183 r21366  
    1111
    1212  psVector *radius = source->extpars->profile->radius;
    13   psVector *weight = source->extpars->profile->weight;
     13  psVector *variance = source->extpars->profile->variance;
    1414  psVector *flux = source->extpars->profile->flux;
    1515
     
    2222  psVector *fluxValues = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32);
    2323  psVector *fluxSquare = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32);
    24   psVector *fluxWeight = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32);
     24  psVector *fluxVariance = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32);
    2525  psVector *pixelCount = psVectorAlloc (radialBinsLower->n, PS_TYPE_F32);
    2626  psVectorInit (fluxValues, 0.0);
    2727  psVectorInit (fluxSquare, 0.0);
    28   psVectorInit (fluxWeight, 0.0);
     28  psVectorInit (fluxVariance, 0.0);
    2929  psVectorInit (pixelCount, 0.0);
    3030
    3131  // XXX this code assumes the radii are in pixels.  convert from arcsec with plate scale
    3232  // 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
    3434  // skip to the start of the annulus.
    3535  for (int i = 0; i < flux->n; i++) {
     
    3939      fluxValues->data.F32[j] += flux->data.F32[i];
    4040      fluxSquare->data.F32[j] += PS_SQR(flux->data.F32[i]);
    41       fluxWeight->data.F32[j] += weight->data.F32[i];
     41      fluxVariance->data.F32[j] += variance->data.F32[i];
    4242      pixelCount->data.F32[j] += 1.0;
    4343    }
     
    4949    fluxSquare->data.F32[j] -= PS_SQR(fluxValues->data.F32[j]);
    5050  }
    51  
     51
    5252  source->extpars->annuli = pmSourceAnnuliAlloc ();
    5353  source->extpars->annuli->flux    = fluxValues;
    54   source->extpars->annuli->fluxErr = fluxWeight;
     54  source->extpars->annuli->fluxErr = fluxVariance;
    5555  source->extpars->annuli->fluxVar = fluxSquare;
    5656
Note: See TracChangeset for help on using the changeset viewer.