Changeset 41877
- Timestamp:
- Nov 3, 2021, 11:52:26 AM (5 years ago)
- Location:
- branches/eam_branches
- Files:
-
- 11 edited
-
ipp-dev-20210817/ippconfig/gpc1/psastro.config (modified) (1 diff)
-
ipp-dev-20210817/ippconfig/recipes/psastro.config (modified) (2 diffs)
-
ipp-dev-20210817/ippconfig/recipes/pswarp.config (modified) (1 diff)
-
ipp-dev-20210817/ppViz/src/ppCoord/ppCoordLoop.c (modified) (2 diffs)
-
ipp-dev-20210817/psastro/src/psastroAstromGuess.c (modified) (1 diff)
-
ipp-dev-20210817/psastro/src/psastroMetadataStats.c (modified) (1 diff)
-
ipp-dev-20210817/psastro/src/psastroMosaicOneChip.c (modified) (4 diffs)
-
ipp-dev-20210817/psastro/src/psastroOneChipFit.c (modified) (3 diffs)
-
ipp-dev-20210817/pswarp/src/pswarpLoadAstrometry.c (modified) (1 diff)
-
ipp-dev-20210817/pswarp/src/pswarpOptions.c (modified) (1 diff)
-
psModules.20211028/src/astrom/pmAstrometryWCS.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-dev-20210817/ippconfig/gpc1/psastro.config
r41750 r41877 82 82 PSASTRO.MOSAIC.UNIQ.ITER S32 3 # for iterations >= N, require a single match per reference 83 83 84 PSASTRO.MOSAIC.MAX.ERROR.N0 F32 0.00 # max allow error for valid solution (arcsec) 85 PSASTRO.MOSAIC.MAX.ERROR.N1 F32 0.00 # max allow error for valid solution (arcsec) 86 PSASTRO.MOSAIC.MAX.ERROR.N2 F32 0.00 # max allow error for valid solution (arcsec) 87 PSASTRO.MOSAIC.MAX.ERROR.N3 F32 0.00 # max allow error for valid solution (arcsec) 88 PSASTRO.MOSAIC.MAX.ERROR.N4 F32 0.00 # max allow error for valid solution (arcsec) 89 PSASTRO.MOSAIC.MAX.ERROR.N5 F32 0.30 # max allow error for valid solution (arcsec) 84 PSASTRO.MOSAIC.MAX.ERROR.N0 F32 0.00 # max allowed error for valid solution (arcsec) 85 PSASTRO.MOSAIC.MAX.ERROR.N1 F32 0.00 # max allowed error for valid solution (arcsec) 86 PSASTRO.MOSAIC.MAX.ERROR.N2 F32 0.00 # max allowed error for valid solution (arcsec) 87 PSASTRO.MOSAIC.MAX.ERROR.N3 F32 0.00 # max allowed error for valid solution (arcsec) 88 PSASTRO.MOSAIC.MAX.ERROR.N4 F32 0.00 # max allowed error for valid solution (arcsec) 89 PSASTRO.MOSAIC.MAX.ERROR.N5 F32 0.30 # max allowed error for valid solution (arcsec) 90 91 PSASTRO.MOSAIC.MAX.STDEV.N0 F32 0.00 # max allowed stdev for valid solution (arcsec) 92 PSASTRO.MOSAIC.MAX.STDEV.N1 F32 0.00 # max allowed stdev for valid solution (arcsec) 93 PSASTRO.MOSAIC.MAX.STDEV.N2 F32 0.00 # max allowed stdev for valid solution (arcsec) 94 PSASTRO.MOSAIC.MAX.STDEV.N3 F32 0.00 # max allowed stdev for valid solution (arcsec) 95 PSASTRO.MOSAIC.MAX.STDEV.N4 F32 0.00 # max allowed stdev for valid solution (arcsec) 96 PSASTRO.MOSAIC.MAX.STDEV.N5 F32 0.00 # max allowed stdev for valid solution (arcsec) 90 97 91 98 # mosaic radius match in pixels (do these make sense?) -
branches/eam_branches/ipp-dev-20210817/ippconfig/recipes/psastro.config
r41554 r41877 91 91 PSASTRO.CHIP.NSIGMA F32 3 # fit clipping sigmas 92 92 93 PSASTRO.MAX.ERROR F32 1.5 # max allow error for valid solution (UNITS?) 93 PSASTRO.MAX.ERROR F32 1.5 # max allowed error for valid solution (arcsec) 94 PSASTRO.MAX.STDEV F32 1.0 # max allowed stdev for valid solution (arcsec) 94 95 PSASTRO.MIN.NSTAR S32 3 # min fitted stars in solution 95 96 PSASTRO.MAX.NSTAR S32 300 # max fitted stars in solution … … 135 136 PSASTRO.MOSAIC.CHIP.NSIGMA F32 3 # fit clipping sigmas 136 137 137 PSASTRO.MOSAIC.MAX.ERROR.N0 F32 1.5 # max allow error for valid solution (UNITS?) 138 PSASTRO.MOSAIC.MAX.ERROR.N1 F32 1.5 # max allow error for valid solution (UNITS?) 139 PSASTRO.MOSAIC.MAX.ERROR.N2 F32 1.5 # max allow error for valid solution (UNITS?) 140 PSASTRO.MOSAIC.MAX.ERROR.N3 F32 1.5 # max allow error for valid solution (UNITS?) 141 PSASTRO.MOSAIC.MAX.ERROR.N4 F32 1.5 # max allow error for valid solution (UNITS?) 142 PSASTRO.MOSAIC.MAX.ERROR.N5 F32 1.5 # max allow error for valid solution (UNITS?) 138 PSASTRO.MOSAIC.MAX.ERROR.N0 F32 1.5 # max allowed error for valid solution (arcsec) 139 PSASTRO.MOSAIC.MAX.ERROR.N1 F32 1.5 # max allowed error for valid solution (arcsec) 140 PSASTRO.MOSAIC.MAX.ERROR.N2 F32 1.5 # max allowed error for valid solution (arcsec) 141 PSASTRO.MOSAIC.MAX.ERROR.N3 F32 1.5 # max allowed error for valid solution (arcsec) 142 PSASTRO.MOSAIC.MAX.ERROR.N4 F32 1.5 # max allowed error for valid solution (arcsec) 143 PSASTRO.MOSAIC.MAX.ERROR.N5 F32 1.5 # max allowed error for valid solution (arcsec) 144 145 PSASTRO.MOSAIC.MAX.STDEV.N0 F32 1.5 # max allowed stdev for valid solution (arcsec) 146 PSASTRO.MOSAIC.MAX.STDEV.N1 F32 1.5 # max allowed stdev for valid solution (arcsec) 147 PSASTRO.MOSAIC.MAX.STDEV.N2 F32 1.5 # max allowed stdev for valid solution (arcsec) 148 PSASTRO.MOSAIC.MAX.STDEV.N3 F32 1.5 # max allowed stdev for valid solution (arcsec) 149 PSASTRO.MOSAIC.MAX.STDEV.N4 F32 1.5 # max allowed stdev for valid solution (arcsec) 150 PSASTRO.MOSAIC.MAX.STDEV.N5 F32 1.5 # max allowed stdev for valid solution (arcsec) 143 151 144 152 # need at least this fraction of chips to pass for exposure to be considered acceptable -
branches/eam_branches/ipp-dev-20210817/ippconfig/recipes/pswarp.config
r41656 r41877 14 14 APPLY.PIXELNAN BOOL FALSE # Apply NAN'ing of pixels underneath masks 15 15 16 MAX.CERROR F32 0.1 # Maximum allowed CERROR value (astrometric error in arcsec) 16 MAX.CERROR F32 0.30 # Maximum allowed CERROR value (astrometric error in arcsec) 17 MAX.CERSTD F32 0.15 # Maximum allowed CERSTD value (astrometric error in arcsec) 17 18 18 19 NO.COMPRESS BOOL FALSE # turn off image compression (if enabled) -
branches/eam_branches/ipp-dev-20210817/ppViz/src/ppCoord/ppCoordLoop.c
r41827 r41877 228 228 psWarning("More than one cell present for chip %d", view->chip); 229 229 } 230 231 fprintf (stderr, "chip: %s\n", chipName); 230 232 231 233 // read WCS data from the corresponding header … … 368 370 src.sky.d = dec->data.F64[i]; 369 371 coordSky2Chip(&src, data->radians, astromFile->fpa, chip); 372 fprintf (stderr, "x,y: %.2f %.2f\n", src.pix.x, src.pix.y); 370 373 if ((src.pix.x < 0 || src.pix.x > numCols || src.pix.y < 0 || src.pix.y > numRows)) { 371 374 // Not on this chip -
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 -
branches/eam_branches/ipp-dev-20210817/pswarp/src/pswarpLoadAstrometry.c
r41526 r41877 94 94 } 95 95 } 96 96 97 // apply the bilevel astrometry elements to the target 97 98 if (bilevelAstrometry) { 98 int additional_orders = 4;99 bool status = false;100 int config_additional_orders = psMetadataLookupS32(&status,config->arguments,"ADDITIONAL_WCS_ORDERS");101 if (status) {102 additional_orders = config_additional_orders;103 }104 psMetadataAddS32(astrom->fpa->analysis,PS_LIST_TAIL, "ADDITIONAL_WCS_ORDERS", PS_META_REPLACE,105 "Additional orders for bilevel fit.", additional_orders);106 107 108 99 if (!pmAstromReadBilevelMosaic(astrom->fpa, phu->header)) { 109 100 psError(psErrorCodeLast(), false, "Unable to read bilevel mosaic astrometry for skycell."); -
branches/eam_branches/ipp-dev-20210817/pswarp/src/pswarpOptions.c
r41526 r41877 104 104 config_additional_orders = 0; 105 105 } 106 107 106 pmAstrometryGetExtraOrders(config_additional_orders); 107 // This is the number of orders that should be added to all non-linear inverse transformations 108 108 109 109 // Set recipe values in the recipe (since we've possibly altered some) -
branches/eam_branches/psModules.20211028/src/astrom/pmAstrometryWCS.c
r41832 r41877 705 705 psFree (fpa->fromTPA); 706 706 int additional_orders = pmAstrometryGetExtraOrders(); // This is the number of orders that should be added. 707 bool status = false;708 int config_additional_orders = psMetadataLookupS32(&status,fpa->analysis, "ADDITIONAL_WCS_ORDERS");709 if (status) { // If this keyword is found, then use that number of orders instead710 additional_orders = config_additional_orders;711 }712 707 fpa->fromTPA = psPlaneTransformInvert(NULL, fpa->toTPA, region, 50, additional_orders); 713 708 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
