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 edited

Legend:

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

    r25433 r25452  
    11# include "psphotInternal.h"
    22
    3 // Given the Petrosian data (radii, fluxes) determine the radius for each profile at the desisred isophote
     3// Given the Radial Profiles (radii, fluxes) determine the radius for each profile at the desired isophote
    44
    5 bool psphotRadiiFromProfiles (pmSource *source, pmPetrosian *petrosian, float fluxMin, float fluxMax) {
     5bool psphotRadiiFromProfiles (pmSource *source, float fluxMin, float fluxMax) {
    66
    7   petrosian->isophotalRadii = psVectorAlloc(petrosian->theta->n, PS_TYPE_F32);
     7    pmSourceRadialProfile *profile = source->extpars->profile;
    88
    9   for (int i = 0; i < petrosian->theta->n; i++) {
    10       psVector *radii = petrosian->radii->data[i];
    11       psVector *fluxes = petrosian->fluxes->data[i];
    12       float radius = psphotRadiusFromProfile (source, radii, fluxes, fluxMin, fluxMax);
     9    psFree(profile->isophotalRadii);
     10    profile->isophotalRadii = psVectorAlloc(profile->theta->n, PS_TYPE_F32);
    1311
    14       // psphotPetrosianVisualProfileByAngle (radii, fluxes, radius);
     12    for (int i = 0; i < profile->theta->n; i++) {
     13        psVector *radii = profile->radii->data[i];
     14        psVector *fluxes = profile->fluxes->data[i];
     15        float radius = psphotRadiusFromProfile (source, radii, fluxes, fluxMin, fluxMax);
    1516
    16       // warn on NAN?
    17       petrosian->isophotalRadii->data.F32[i] = radius;
    18   }
    19   return true;
     17        // psphotPetrosianVisualProfileByAngle (radii, fluxes, radius);
     18
     19        // warn on NAN?
     20        profile->isophotalRadii->data.F32[i] = radius;
     21    }
     22    return true;
    2023}
    2124
     
    7982
    8083        // sort the flux by the radius
    81         psphotPetrosianSortPair (radius, flux);
     84        pmSourceRadialProfileSortPair (radius, flux);
    8285
    8386        int nOut = 0;
     
    128131            // XXX is there a macro in psLib that does this interpolation?
    129132            if (i == 0) {
    130                 psLogMsg ("psphot", 3, "bogus radial profile for ..., skipping");
     133                psTrace ("psphot", 4, "bogus radial profile for source at %f, %f, skipping", source->peak->xf, source->peak->yf);
    131134                psFree (fluxBinned);
    132135                psFree (radiusBinned);
Note: See TracChangeset for help on using the changeset viewer.