Changeset 37881 for trunk/psphot
- Timestamp:
- Jan 29, 2015, 2:15:11 PM (11 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 2 edited
-
psphotExtendedSourceFits.c (modified) (1 diff)
-
psphotGalaxyParams.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotExtendedSourceFits.c
r37624 r37881 534 534 Nconvolve ++; 535 535 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 } 536 544 NconvolvePass ++; 537 545 source->mode |= PM_SOURCE_MODE_EXTENDED_FIT; -
trunk/psphot/src/psphotGalaxyParams.c
r37811 r37881 152 152 153 153 // set this to 0 to run without threading 154 # if ( 0)154 # if (1) 155 155 if (!psThreadJobAddPending(job)) { 156 156 psError(PS_ERR_UNKNOWN, false, "Unable to guess model."); … … 270 270 badModel |= PM_MODEL_PCM_FAIL_GUESS; 271 271 272 badModel |= PM_MODEL_STATUS_LIMITS; 273 272 274 pmModelType sersicModelType = pmModelClassGetType("PS_MODEL_SERSIC"); 273 275 … … 334 336 if (!sersicModel) SKIP (Nskip8); 335 337 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; 336 350 Next ++; 337 351 … … 353 367 // do we need this? 354 368 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 367 372 // and we will integrate out to 2 * half light radius 368 373 psF32 R = 2 * axes.major;
Note:
See TracChangeset
for help on using the changeset viewer.
