Changeset 26126
- Timestamp:
- Nov 13, 2009, 4:56:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091113/psModules/src/objects/pmPSFtryModel.c
r25819 r26126 72 72 } 73 73 74 // XXX set the min number of needed source more carefully (depends on psfTrendMode?) 75 int orderMax = PS_MAX (options->psfTrendNx, options->psfTrendNy); 76 if ((sources->n < 15) && (orderMax >= 3)) orderMax = 2; 77 if ((sources->n < 11) && (orderMax >= 2)) orderMax = 1; 78 if ((sources->n < 8) && (orderMax >= 1)) orderMax = 0; 74 // hard limit on minimum number of stars 79 75 if ((sources->n < 3)) { 80 76 psError (PS_ERR_UNKNOWN, true, "failed to determine PSF parameters"); … … 82 78 } 83 79 84 int orderMin; 80 // this is a bit tricky, because we have two cases (MAP vs POLY), and they have a different 81 // definition for 'order' (order_MAP = order_POLY + 1). in addition, we have a 82 // user-specified MAX order, which we should respect, regardless of the mode 83 84 // set the max order (0 = constant) which the number of psf stars can support: 85 // rule of thumb: require 3 stars per 'cell' (order+1)^2 86 int MaxOrderForStars = 0; 87 if (sources->n >= 12) MaxOrderForStars = 1; // 4 cells 88 if (sources->n >= 27) MaxOrderForStars = 2; // 9 cells 89 if (sources->n >= 48) MaxOrderForStars = 3; // 16 cells 90 if (sources->n > 75) MaxOrderForStars = 4; // 25 cells 91 92 int orderMax = PS_MAX (options->psfTrendNx, options->psfTrendNy); 93 int orderMin = 0; 85 94 if (options->psfTrendMode == PM_TREND_MAP) { 86 orderMin = 1; 87 orderMax = PS_MAX(orderMax, 1); 88 } else { 89 orderMin = 0; 90 } 95 MaxOrderForStars ++; 96 orderMin ++; 97 } 98 orderMax = PS_MIN (orderMax, MaxOrderForStars); 91 99 92 100 // save the raw source mask (generated by pmPSFtryFitEXT)
Note:
See TracChangeset
for help on using the changeset viewer.
