IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 17, 2009, 2:26:32 PM (17 years ago)
Author:
eugene
Message:

change radius for extended sources to use footprint; clean up some of the visualizations; plug some leaks

File:
1 edited

Legend:

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

    r25361 r25433  
    11# include "psphotInternal.h"
    22
    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?)
    67float psphotMeanSectorValue (psImage *image, float x, float y, float dL, float dW, float theta);
    78psVector *psphotBoxValues (psImage *image, float x0, float y0, float dL, float dW, float theta);
     
    910psVector *psphotLineValuesBresen (psImage *image, int X1, int Y1, int X2, int Y2, int dW, int swapcoords);
    1011
    11 bool psphotRadialProfilesByAngles (pmPetrosian *petrosian, pmSource *source, int Nsec, float Rmax) {
     12bool psphotRadialProfilesByAngles (pmSource *source, pmPetrosian *petrosian, int Nsec, float Rmax) {
    1213
    1314    // we want to have an even number of sectors so we can do 180 deg symmetrizing
     
    124125
    125126    psVector *values = psphotBoxValues (image, x, y, dL, dW, theta);
     127    if (!values) goto escape;
     128    if (!values->n) goto escape;
    126129   
    127130    psStats *stats = psStatsAlloc(PS_STAT_SAMPLE_MEDIAN);
     
    134137   
    135138    return value;
     139
     140escape:
     141    psFree(values);
     142    return NAN;   
    136143}
    137144
Note: See TracChangeset for help on using the changeset viewer.