Changeset 15078
- Timestamp:
- Sep 28, 2007, 11:04:05 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotApResid.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotApResid.c
r15042 r15078 29 29 30 30 // XXX is this still needed? the pmTrend2D stuff should be auto-adjusting... 31 int NSTAR_APERTURE_CORRECTION_MIN = psMetadataLookupS32(&status, recipe, "NSTAR_APERTURE_CORRECTION_MIN"); 32 if (!status) { 33 NSTAR_APERTURE_CORRECTION_MIN = 5; 31 int APTREND_NSTAR_MIN = psMetadataLookupS32(&status, recipe, "APTREND.NSTAR.MIN"); 32 assert (status); 33 34 // maximum order for aperture correction 35 int APTREND_ORDER_MAX = psMetadataLookupS32(&status, recipe, "APTREND.ORDER.MAX"); 36 assert (status); 37 38 if (APTREND_ORDER_MAX < 1) { 39 psError(PSPHOT_ERR_CONFIG, true, "APTREND.ORDER.MAX must be 1 or more"); 40 return false; 34 41 } 35 42 … … 116 123 117 124 // XXX choose a better value here? 118 if (Npsf < NSTAR_APERTURE_CORRECTION_MIN) {125 if (Npsf < APTREND_NSTAR_MIN) { 119 126 psError(PSPHOT_ERR_APERTURE, true, "Only %d valid aperture residual sources (need %d), giving up", 120 Npsf, NSTAR_APERTURE_CORRECTION_MIN);127 Npsf, APTREND_NSTAR_MIN); 121 128 return false; 122 129 } … … 132 139 int entryMin = -1; 133 140 134 // *** iterate over spatial scale until error Floor increases 135 // *** fit out the dap vs mag trend? 136 // *** stop if Npsf / (Nx * Ny) < 3 137 for (int i = 1; i < 10; i++) { 141 // Fit out the dap vs mag trend, iterate over spatial scale until error Floor increases. 142 // Stop if Npsf / (Nx * Ny) < 3 143 for (int i = 1; i <= APTREND_ORDER_MAX; i++) { 138 144 139 145 if (!psphotApResidTrend (readout, psf, Npsf, i, &errorScale, &errorFloor, mask, xPos, yPos, apResid, dMag)) {
Note:
See TracChangeset
for help on using the changeset viewer.
