Changeset 23688 for trunk/pswarp
- Timestamp:
- Apr 2, 2009, 2:51:37 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 6 edited
- 1 copied
-
. (modified) (1 prop)
-
pswarp/src/Makefile.am (modified) (1 diff)
-
pswarp/src/pswarp.h (modified) (1 diff)
-
pswarp/src/pswarpArguments.c (modified) (3 diffs)
-
pswarp/src/pswarpErrorCodes.dat (modified) (1 diff)
-
pswarp/src/pswarpLoop.c (modified) (5 diffs)
-
pswarp/src/pswarpPixelFraction.c (deleted)
-
pswarp/src/pswarpPixelsLit.c (copied) (copied from branches/pap/pswarp/src/pswarpPixelsLit.c )
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/pap (added) merged: 23511,23520-23521,23532,23578-23581,23596-23599,23603-23604,23606-23608,23619-23621,23638-23639,23641,23646-23648,23651-23653,23656,23672-23674,23677-23684
- Property svn:mergeinfo changed
-
trunk/pswarp/src/Makefile.am
r23170 r23688 24 24 pswarpMatchRange.c \ 25 25 pswarpParseCamera.c \ 26 pswarpPixel Fraction.c \26 pswarpPixelsLit.c \ 27 27 pswarpSetMaskBits.c \ 28 28 pswarpSetThreads.c \ -
trunk/pswarp/src/pswarp.h
r23487 r23688 102 102 const char *filename, const char *argname); 103 103 104 /// Check to see if the readout has a minimum fraction of "lit"pixels105 bool pswarpPixel Fraction(const pmReadout *readout, ///< Readout to inspect106 psMetadata *stats, ///< Statistics to update with the result107 const pmConfig *config ///< Configuration104 /// Get the range of lit pixels 105 bool pswarpPixelsLit(const pmReadout *readout, ///< Readout to inspect 106 psMetadata *stats, ///< Statistics to update with the result 107 const pmConfig *config ///< Configuration 108 108 ); 109 109 -
trunk/pswarp/src/pswarpArguments.c
r23314 r23688 163 163 } 164 164 165 float acceptFrac = psMetadataLookupF32(&status, recipe, "ACCEPT.FRAC"); ///< Min fraction of good pixels166 if (!status) {167 acceptFrac = 0.0;168 psWarning("ACCEPT.FRAC is not set in the %s recipe --- defaulting to %f.", PSWARP_RECIPE, poorFrac);169 }170 171 165 // Set recipe values in the recipe (since we've possibly altered some) 172 166 psMetadataAddS32(recipe, PS_LIST_TAIL, "GRID.NX", PS_META_REPLACE, … … 180 174 psMetadataAddF32(recipe, PS_LIST_TAIL, "POOR.FRAC", PS_META_REPLACE, 181 175 "Fraction of bad flux for a pixel to be marked as poor", poorFrac); 182 psMetadataAddF32(recipe, PS_LIST_TAIL, "ACCEPT.FRAC", PS_META_REPLACE,183 "Minimum fraction of good pixels for result to be accepted", acceptFrac);184 176 185 177 // Set recipe values in the arguments … … 194 186 psMetadataAddF32(config->arguments, PS_LIST_TAIL, "POOR.FRAC", 0, 195 187 "Fraction of bad flux for a pixel to be marked as poor", poorFrac); 196 psMetadataAddF32(config->arguments, PS_LIST_TAIL, "ACCEPT.FRAC", 0,197 "Minimum fraction of good pixels for result to be accepted", acceptFrac);198 188 199 189 psTrace("pswarp", 1, "Done with pswarpArguments...\n"); -
trunk/pswarp/src/pswarpErrorCodes.dat
r11268 r23688 9 9 IO Problem in FITS I/O 10 10 DATA Problem in data values 11 NO_OVERLAP No overlap between input and skycell -
trunk/pswarp/src/pswarpLoop.c
r23629 r23688 142 142 psFree(resolved); 143 143 stats = psMetadataAlloc(); 144 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", 0, "No problems", 0); 144 145 } 145 146 … … 273 274 } 274 275 276 if (!output->data_exists) { 277 psWarning("No overlap between input and skycell."); 278 if (stats) { 279 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, 280 "No overlap between input and skycell", PSWARP_ERR_NO_OVERLAP); 281 } 282 psphotFilesActivate(config, false); 283 psFree(cells); 284 psFree(view); 285 return true; 286 } 287 275 288 pmCell *outCell = output->parent; ///< Output cell 276 289 pmChip *outChip = outCell->parent; ///< Output chip 277 290 pmFPA *outFPA = outChip->parent; ///< Output FP 278 291 279 if (!pswarpPixelFraction(output, stats, config)) { 280 // Don't write output images, and don't bother about anything else 281 output->data_exists = outCell->data_exists = outChip->data_exists = false; 292 if (!pswarpPixelsLit(output, stats, config)) { 293 psError(PS_ERR_UNKNOWN, false, "Unable to calculate pixel regions."); 282 294 psFree(cells); 283 295 psFree(view); 284 goto COMPLETED;296 return false; 285 297 } 286 298 … … 363 375 fileActivation(config, independentFiles, false); 364 376 365 // We need a new PSF model for the warped frame. It would be good to generate this analytically, but that's going to be tricky.366 // We have a list of sources, so we use those to redetermine the PSF model.377 // We need a new PSF model for the warped frame. It would be good to generate this analytically, but 378 // that's going to be tricky. We have a list of sources, so we use those to redetermine the PSF model. 367 379 368 380 if (psMetadataLookupBool(&mdok, config->arguments, "PSF")) { … … 393 405 // measure the PSF using these sources 394 406 if (!psphotReadoutFindPSF(config, view, sources)) { 395 psError(PS_ERR_UNKNOWN, false, "Unable to determine PSF for warped image."); 396 return false; 407 // This is likely a data quality issue 408 // XXX Split into multiple cases using error codes? 409 psErrorStackPrint(stderr, "Unable to determine PSF"); 410 psWarning("Unable to determine PSF --- suspect bad data quality."); 411 if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) { 412 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, 413 "Unable to determine PSF", psErrorCodeLast()); 414 } 415 psErrorClear(); 416 psphotFilesActivate(config, false); 397 417 } 398 418 … … 447 467 // Now done with the skycell side of things 448 468 449 COMPLETED:450 469 // Write out summary statistics 451 470 if (stats) {
Note:
See TracChangeset
for help on using the changeset viewer.
