Changeset 26261
- Timestamp:
- Nov 22, 2009, 3:01:17 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotApResid.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotApResid.c
r25755 r26261 217 217 } 218 218 219 // XXX set the min number of needed source more carefully 220 if ((Npsf < 15) && (APTREND_ORDER_MAX >= 4)) APTREND_ORDER_MAX = 3; 221 if ((Npsf < 11) && (APTREND_ORDER_MAX >= 3)) APTREND_ORDER_MAX = 2; 222 if ((Npsf < 8) && (APTREND_ORDER_MAX >= 2)) APTREND_ORDER_MAX = 1; 219 // this is a bit tricky, because we have two cases (MAP vs POLY), and they have a different 220 // definition for 'order' (order_MAP = order_POLY + 1). in addition, we have a 221 // user-specified MAX order, which we should respect, regardless of the mode 222 223 // set the max order (0 = constant) which the number of psf stars can support: 224 // rule of thumb: require 3 stars per 'cell' (order+1)^2 225 int MaxOrderForStars = 0; 226 if (Npsf >= 12) MaxOrderForStars = 1; // 4 cells 227 if (Npsf >= 27) MaxOrderForStars = 2; // 9 cells 228 if (Npsf >= 48) MaxOrderForStars = 3; // 16 cells 229 if (Npsf > 75) MaxOrderForStars = 4; // 25 cells 230 231 pmTrend2DMode mode = PM_TREND_MAP; 232 if (mode == PM_TREND_MAP) { 233 MaxOrderForStars ++; 234 } 235 APTREND_ORDER_MAX = PS_MIN (APTREND_ORDER_MAX, MaxOrderForStars); 223 236 224 237 psFree (psf->ApTrend);
Note:
See TracChangeset
for help on using the changeset viewer.
