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/psphotEllipticalContour.c

    r25433 r25452  
    55psF32 psphotEllipticalContourFunc (psVector *deriv, const psVector *params, const psVector *coord);
    66
    7 bool psphotEllipticalContour (pmSource *source, pmPetrosian *petrosian) {
     7bool psphotEllipticalContour (pmSource *source) {
     8
     9    pmSourceRadialProfile *profile = source->extpars->profile;
    810
    911    // use LMM to fit theta vs radius to an ellipse
    10     psVector *theta = petrosian->theta;
    11     psVector *radius = petrosian->isophotalRadii;
     12    psVector *theta = profile->theta;
     13    psVector *radius = profile->isophotalRadii;
    1214
    1315    // find Rmin and Rmax for the initial guess
     
    8385    /// XXX rationalize? if epsilon > 1, flip major and minor axes (rotate by 90 degrees)
    8486    if (params->data.F32[PAR_EPSILON] < 1.0) {
    85         petrosian->axes.major = params->data.F32[PAR_RMIN] / params->data.F32[PAR_EPSILON];
    86         petrosian->axes.minor = params->data.F32[PAR_RMIN];
    87         petrosian->axes.theta = params->data.F32[PAR_PHI];
     87        profile->axes.major = params->data.F32[PAR_RMIN] / params->data.F32[PAR_EPSILON];
     88        profile->axes.minor = params->data.F32[PAR_RMIN];
     89        profile->axes.theta = params->data.F32[PAR_PHI];
    8890    } else {
    89         petrosian->axes.major = params->data.F32[PAR_RMIN];
    90         petrosian->axes.minor = params->data.F32[PAR_RMIN] / params->data.F32[PAR_EPSILON];
    91         petrosian->axes.theta = params->data.F32[PAR_PHI] + 0.5*M_PI;
     91        profile->axes.major = params->data.F32[PAR_RMIN];
     92        profile->axes.minor = params->data.F32[PAR_RMIN] / params->data.F32[PAR_EPSILON];
     93        profile->axes.theta = params->data.F32[PAR_PHI] + 0.5*M_PI;
    9294    }
    9395
    9496    psTrace ("psphot", 4, "# fitted values:\n");
    95     psTrace ("psphot", 4, "Phi:   %f\n", petrosian->axes.theta*PS_DEG_RAD);
    96     psTrace ("psphot", 4, "Rmaj:  %f\n", petrosian->axes.major);
    97     psTrace ("psphot", 4, "Rmin:  %f\n", petrosian->axes.minor);
     97    psTrace ("psphot", 4, "Phi:   %f\n", profile->axes.theta*PS_DEG_RAD);
     98    psTrace ("psphot", 4, "Rmaj:  %f\n", profile->axes.major);
     99    psTrace ("psphot", 4, "Rmin:  %f\n", profile->axes.minor);
    98100   
    99101    // show the results
Note: See TracChangeset for help on using the changeset viewer.