IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 29, 2015, 2:15:11 PM (11 years ago)
Author:
bills
Message:

drop models with major axis > 100 pixels.

File:
1 edited

Legend:

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

    r37811 r37881  
    152152
    153153// set this to 0 to run without threading
    154 # if (0)           
     154# if (1)           
    155155            if (!psThreadJobAddPending(job)) {
    156156                psError(PS_ERR_UNKNOWN, false, "Unable to guess model.");
     
    270270    badModel |= PM_MODEL_PCM_FAIL_GUESS;
    271271
     272    badModel |= PM_MODEL_STATUS_LIMITS;
     273
    272274    pmModelType sersicModelType = pmModelClassGetType("PS_MODEL_SERSIC");
    273275
     
    334336        if (!sersicModel) SKIP (Nskip8);
    335337        if (sersicModel->flags & badModel) SKIP (Nskip8);
     338
     339        // check out the model params and skip those that are too large
     340        psF32 *PAR = sersicModel->params->data.F32;
     341        psF32 Xo = PAR[PM_PAR_XPOS];
     342        psF32 Yo = PAR[PM_PAR_YPOS];
     343        psF32 Io = PAR[PM_PAR_I0];
     344        //
     345        // The half light radius to the major axis of the model
     346        psEllipseAxes axes = pmPSF_ModelToAxes (PAR, sersicModel->class->useReff);
     347        if (axes.major >= 100) SKIP (Nskip8);
     348
     349        source->extpars->ghalfLightRadius = axes.major;
    336350        Next ++;
    337351
     
    353367            // do we need this?
    354368            source->mode |= PM_SOURCE_MODE_NONLINEAR_FIT;
    355 #ifdef notdef
    356 #endif
    357         }
    358 
    359 
    360         psF32 *PAR = sersicModel->params->data.F32;
    361         psF32 Xo = PAR[PM_PAR_XPOS];
    362         psF32 Yo = PAR[PM_PAR_YPOS];
    363         psF32 Io = PAR[PM_PAR_I0];
    364         // For now: set the half light radius to the major axis of the model
    365         psEllipseAxes axes = pmPSF_ModelToAxes (PAR, sersicModel->class->useReff);
    366         source->extpars->ghalfLightRadius = axes.major;
     369        }
     370
     371
    367372        // and we will integrate out to 2 * half light radius
    368373        psF32 R = 2 * axes.major;
Note: See TracChangeset for help on using the changeset viewer.