IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2010, 12:49:05 PM (16 years ago)
Author:
eugene
Message:

merging changes from trunk into branches/pap

Location:
branches/pap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap

  • branches/pap/psphot/src/psphotRadialProfile.c

    r25755 r28003  
    33bool psphotRadialProfile (pmSource *source, psMetadata *recipe, float skynoise, psImageMaskType maskVal) {
    44
     5    bool status;
     6
    57    // allocate pmSourceExtendedParameters, if not already defined
    68    if (!source->extpars) {
    79        source->extpars = pmSourceExtendedParsAlloc ();
    8     }
    9 
    10     if (!source->extpars->profile) {
    11         source->extpars->profile = pmSourceRadialProfileAlloc ();
    1210    }
    1311
     
    1715    float fluxMin = 0.0;
    1816    float fluxMax = source->peak->flux;
     17
     18    bool RAW_RADIUS = psMetadataLookupBool (&status, recipe, "EXTENDED_SOURCE_RAW_RADIUS");
    1919
    2020    // generate a series of radial profiles at Nsec evenly spaced angles.  the profile flux
     
    2828    // use the radial profiles to determine the radius of a given isophote.  this isophote
    2929    // is used to determine the elliptical shape of the object, so it has a relatively high
    30     // value (nominally 50% of the peak)
     30    // value (nominally 25% of the peak)
    3131    if (!psphotRadiiFromProfiles (source, fluxMin, fluxMax)) {
    3232        psError (PS_ERR_UNKNOWN, false, "failed to measure isophotal radii from profiles");
     
    4242    // generate a single, normalized radial profile following the elliptical contours.
    4343    // the radius is normalized by the axis ratio so that on the major axis, 1 pixel = 1 pixel
    44     if (!psphotEllipticalProfile (source)) {
     44    if (!psphotEllipticalProfile (source, RAW_RADIUS)) {
    4545        psError (PS_ERR_UNKNOWN, false, "failed to generate elliptical profile");
     46        return false;
     47    }
     48 
     49    // generated profile in averaged bins
     50    if (!psphotRadialBins (recipe, source, Rmax, skynoise)) {
     51        psError (PS_ERR_UNKNOWN, false, "failed to generate radial bins");
    4652        return false;
    4753    }
Note: See TracChangeset for help on using the changeset viewer.