IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37881 for trunk/psphot


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

drop models with major axis > 100 pixels.

Location:
trunk/psphot/src
Files:
2 edited

Legend:

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

    r37624 r37881  
    534534              Nconvolve ++;
    535535              if (!(modelFit->flags & badModel)) {
     536                  float *PAR = modelFit->params->data.F32;
     537                  psEllipseAxes axes = pmPSF_ModelToAxes (PAR, modelFit->class->useReff);
     538                  if (axes.major >= 100) {
     539                      Nfail ++;
     540                      source->mode2 |= PM_SOURCE_MODE2_EXT_FITS_FAIL;
     541                      psFree(modelFit);
     542                      continue;
     543                  }
    536544                  NconvolvePass ++;
    537545                  source->mode |= PM_SOURCE_MODE_EXTENDED_FIT;
  • 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.