Changeset 36754 for trunk/psphot/src
- Timestamp:
- May 16, 2014, 9:15:12 AM (12 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 2 edited
-
psphot.h (modified) (1 diff)
-
psphotGalaxyShape.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphot.h
r36747 r36754 547 547 bool psphotGalaxyShapeSource (pmPCMdata *pcm, pmSource *source, pmSourceGalaxyFits *galaxyFits, psImageMaskType maskVal, int psfSize, bool saveResults); 548 548 psphotGalaxyShapeOptions *psphotGalaxyShapeOptionsAlloc(); 549 voidpsphotGalaxyShapeOptionsSet(pmSource *source, pmSourceGalaxyFits *galaxyFits, psphotGalaxyShapeOptions *defaultOptions);549 bool psphotGalaxyShapeOptionsSet(pmSource *source, pmSourceGalaxyFits *galaxyFits, psphotGalaxyShapeOptions *defaultOptions); 550 550 551 551 bool psphotRadialProfileWings (pmConfig *config, const pmFPAview *view, const char *filerule); -
trunk/psphot/src/psphotGalaxyShape.c
r36747 r36754 259 259 psF32 *PAR = pcm->modelConv->params->data.F32; 260 260 261 // double check that the guess is carried along... 261 pmSourceGalaxyFits *galaxyFits = pmSourceGalaxyFitsAlloc(); 262 263 // set the options for this source 264 if (!psphotGalaxyShapeOptionsSet(source, galaxyFits, opt)) { 265 // this source won't work 266 psFree(pcm); 267 psFree(galaxyFits); 268 continue; 269 } 270 262 271 if (!source->galaxyFits) { 263 272 source->galaxyFits = psArrayAllocEmpty(1); 264 273 } 265 pmSourceGalaxyFits *galaxyFits = pmSourceGalaxyFitsAlloc();266 274 psArrayAdd(source->galaxyFits, 1, galaxyFits); 267 275 psFree(galaxyFits); 268 269 // set the options for this source270 psphotGalaxyShapeOptionsSet(source, galaxyFits, opt);271 276 272 277 // I have some source guess (e0, e1, e2) … … 414 419 psMemSetDeallocator(opt, (psFreeFunc) psphotGalaxyShapeOptionsFree); 415 420 416 #ifdef notdef417 opt->fRmajorMin = 0.5;418 opt->fRmajorMax = 2.0;419 opt->fRmajorDel = 0.1;420 opt->fRminorMin = 0.5;421 opt->fRminorMax = 2.0;422 opt->fRminorDel = 0.1;423 opt->snMinAllTrials = 20; // for sources with cff SN < 20 ...424 opt->reduceTrialsFactor = 2; // cut the number of trials in half (double the deltas)425 #endif426 427 421 return opt; 428 422 } 429 423 430 voidpsphotGalaxyShapeOptionsSet(pmSource *source, pmSourceGalaxyFits *galaxyFits, psphotGalaxyShapeOptions *options)424 bool psphotGalaxyShapeOptionsSet(pmSource *source, pmSourceGalaxyFits *galaxyFits, psphotGalaxyShapeOptions *options) 431 425 { 432 426 // XXX: put these in recipe … … 437 431 float f_min = 1 - options->NSigma * f_del; 438 432 float f_max = 1 + options->NSigma * f_del; 433 434 // if f_min goes negative skip this object 435 if (f_min < 0) return false; 439 436 440 437 galaxyFits->fRmajorMin = f_min; … … 444 441 galaxyFits->fRminorMax = f_max; 445 442 galaxyFits->fRminorDel = f_del; 446 } 447 443 444 return true; 445 } 446
Note:
See TracChangeset
for help on using the changeset viewer.
