Changeset 41877 for branches/eam_branches/ipp-dev-20210817/psastro
- Timestamp:
- Nov 3, 2021, 11:52:26 AM (5 years ago)
- Location:
- branches/eam_branches/ipp-dev-20210817/psastro/src
- Files:
-
- 4 edited
-
psastroAstromGuess.c (modified) (1 diff)
-
psastroMetadataStats.c (modified) (1 diff)
-
psastroMosaicOneChip.c (modified) (4 diffs)
-
psastroOneChipFit.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-dev-20210817/psastro/src/psastroAstromGuess.c
r41833 r41877 342 342 if (!updates) goto skip_chip; 343 343 344 // in psastroOneChipFit & psastroMosaicOneCihp, astrometry failures are marked with NASTRO = 0 345 // these should be ignored when checking the overall solution 344 346 int nAstro = psMetadataLookupS32 (&status, updates, "NASTRO"); 345 347 if (!nAstro) goto skip_chip; 346 348 349 // it is not clear when astError = 0.0 347 350 float astError = psMetadataLookupF32 (&status, updates, "CERROR"); 348 351 if (fabs(astError) < 1e-6) goto skip_chip; -
branches/eam_branches/ipp-dev-20210817/psastro/src/psastroMetadataStats.c
r41071 r41877 37 37 psMetadataItemSupplement(&status, stats, header, "ZPT_ERR"); 38 38 psMetadataItemSupplement(&status, stats, header, "CERROR"); 39 psMetadataItemSupplement(&status, stats, header, "CERSTD"); 39 40 psMetadataItemSupplement(&status, stats, header, "NASTRO"); 40 41 psMetadataItemSupplement(&status, stats, header, "AST_R0"); -
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 -
branches/eam_branches/ipp-dev-20210817/psastro/src/psastroOneChipFit.c
r41833 r41877 40 40 // allowed limits for valid solutions 41 41 REQUIRED_RECIPE_VALUE (float maxError, "PSASTRO.MAX.ERROR", F32); 42 REQUIRED_RECIPE_VALUE (int minNstar, "PSASTRO.MIN.NSTAR", S32); 42 REQUIRED_RECIPE_VALUE (float maxStdev, "PSASTRO.MAX.STDEV", F32); 43 REQUIRED_RECIPE_VALUE (int minNstar, "PSASTRO.MIN.NSTAR", S32); 43 44 44 45 psArray *match = NULL; … … 208 209 validSolution = false; 209 210 } 211 if (astStdev > maxStdev) { 212 psLogMsg("psastro", PS_LOG_INFO, "residual stdev is too large, failed to find a solution: %f > %f", astStdev, maxStdev); 213 validSolution = false; 214 } 210 215 if (astNstar < minNstar) { 211 216 psLogMsg("psastro", PS_LOG_INFO, "solution uses too few stars: %d < %d", astNstar, minNstar); … … 220 225 psMetadataAddF32 (updates, PS_LIST_TAIL, "CPRECISE", PS_META_REPLACE, "astrometry precision (arcsec)", astError/sqrt(astNstar)); 221 226 psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTRO", PS_META_REPLACE, "number of astrometry stars", astNstar); 227 psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTUSED", PS_META_REPLACE, "number of astrometry stars", astNstar); 222 228 } else { 223 229 psastroChipFailureHeader (updates); 230 psMetadataAddS32 (updates, PS_LIST_TAIL, "NASTUSED", PS_META_REPLACE, "number of astrometry stars", astNstar); 224 231 } 225 232 psMetadataAddF32 (updates, PS_LIST_TAIL, "EQUINOX", PS_META_REPLACE, "equinox of ref catalog", 2000.0); // XXX this is bogus: should be defined based on equinox of refstars
Note:
See TracChangeset
for help on using the changeset viewer.
