- Timestamp:
- Nov 3, 2021, 11:52:26 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-dev-20210817/psastro/src/psastroMosaicOneChip.c
r41833 r41877 44 44 45 45 // allowed limits for valid solutions 46 // CERROR is currently tested during the iterations, but not CERSTD 46 47 snprintf (errorWord, 64, "PSASTRO.MOSAIC.MAX.ERROR.N%d", iteration); 47 REQUIRED_RECIPE_VALUE (float maxError, errorWord, F32, "failed to find single-chip max allowed error\n"); 48 REQUIRED_RECIPE_VALUE (int minNstar, "PSASTRO.MOSAIC.MIN.NSTAR", S32, "failed to find single-chip min allowed stars\n"); 48 snprintf (stdevWord, 64, "PSASTRO.MOSAIC.MAX.STDEV.N%d", iteration); 49 REQUIRED_RECIPE_VALUE (float maxError, errorWord, F32, "failed to find single-chip max allowed error\n"); 50 REQUIRED_RECIPE_VALUE (float maxStdev, stdevWord, F32, "failed to find single-chip max allowed stdev\n"); 51 REQUIRED_RECIPE_VALUE (int minNstar, "PSASTRO.MOSAIC.MIN.NSTAR", S32, "failed to find single-chip min allowed stars\n"); 49 52 50 53 // set the order of the per-chip fit (higher order only if iteration > 0) … … 146 149 bool validSolution = true; 147 150 148 // XXX should these result in errors or be handled another way? 149 // psLogMsg ("psastro", PS_LOG_INFO, "astrometry solution: error: %f arcsec, Nstars: %d", astError, astNstar); 151 // We have options to exclude chips on the basis of NASTRO, CERROR, CERSTD 150 152 psLogMsg ("psastro", PS_LOG_INFO, "astrometry solution: error: %f arcsec, Nstars: %d, stdev: %f arcsec", astError, astNstar, astStdev); 151 153 if ((maxError > 0) && (astError > maxError)) { 152 154 psLogMsg("psastro", PS_LOG_INFO, "residual error is too large, failed to find a solution: %f > %f", astError, maxError); 155 validSolution = false; 156 } 157 if ((maxStdev > 0) && (astStdev > maxStdev)) { 158 psLogMsg("psastro", PS_LOG_INFO, "residual stdev is too large, failed to find a solution: %f > %f", astStdev, maxStdev); 153 159 validSolution = false; 154 160 } … … 158 164 } 159 165 160 // DVO expects NASTRO = 0 if we fail to find a solution 166 // DVO expects NASTRO = 0 if we fail to find a solution, NASTUSED is the true number 161 167 psMetadataAddF32 (updates, PS_LIST_TAIL, "PERROR", PS_META_REPLACE, "astrometry error (pixels)", pixError); 162 168 psMetadataAddF32 (updates, PS_LIST_TAIL, "CERROR", PS_META_REPLACE, "astrometry error (arcsec)", astError); … … 165 171 psMetadataAddF32 (updates, PS_LIST_TAIL, "CPRECISE", PS_META_REPLACE, "astrometry precision (arcsec)", astError/sqrt(astNstar)); 166 172 psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTRO", PS_META_REPLACE, "number of astrometry stars", astNstar); 173 psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTUSED", PS_META_REPLACE, "number of astrometry stars", astNstar); 167 174 } else { 168 175 psMetadataAddF32 (updates, PS_LIST_TAIL, "CPRECISE", PS_META_REPLACE, "astrometry precision (arcsec)", 0.0); 169 176 psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTRO", PS_META_REPLACE, "number of astrometry stars", 0); 177 psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTUSED", PS_META_REPLACE, "number of astrometry stars", astNstar); 170 178 } 171 179 psMetadataAddF32 (updates, PS_LIST_TAIL, "EQUINOX", PS_META_REPLACE, "", 2000.0); // XXX this is bogus: should be defined based on equinox of refstars
Note:
See TracChangeset
for help on using the changeset viewer.
