Changeset 41498 for trunk/psastro/src/psastroMosaicChipAstrom.c
- Timestamp:
- Feb 18, 2021, 11:10:42 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroMosaicChipAstrom.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroMosaicChipAstrom.c
r21409 r41498 21 21 pmReadout *readout = NULL; 22 22 pmFPAview *view = pmFPAviewAlloc (0); 23 24 float minGoodChipFraction = psMetadataLookupF32 (&status, recipe, "PSASTRO.MOSAIC.MIN.GOOD.CHIP.FRACTION"); 25 if (!status) { 26 minGoodChipFraction = 0.1; 27 psWarning ("failed to find PSASTRO.MOSAIC.MIN.GOOD.CHIP.FRACTION in recipe, assuming default of %f", minGoodChipFraction); 28 } 29 30 int nChipGood = 0; 31 int nChipFail = 0; 23 32 24 33 // this loop selects the matched stars for all chips … … 51 60 psErrorStackPrint(stderr, "failure for one chip\n"); 52 61 psErrorClear(); 62 nChipFail ++; 53 63 continue; 54 64 } … … 60 70 psErrorStackPrint(stderr, "failure for one chip\n"); 61 71 psErrorClear(); 72 nChipFail ++; 62 73 continue; 63 74 } 75 nChipGood ++; 64 76 } 65 77 } 66 78 } 67 79 psFree (view); 80 81 // if basically the entire exposure is bad, return false (calling function sets bad quality) 82 float fGood = nChipGood / ((float) (nChipGood + nChipFail)); 83 if (fGood < minGoodChipFraction) { 84 psWarning ("Too few good chips (%d of %d = %.2f), setting bad quality for this exposure\n", nChipGood, (nChipGood + nChipFail), fGood); 85 // return false; 86 } 87 68 88 return true; 69 89 } 90 91 // XXX count success and failures 92 // XXX set bad quality if fraction of successes < threshold 93 // XXX e.g., 5% success would mean 3 of 60 GPC1 chips are goo. 94 // XXX or, 10% would be 6 of 60. 95 // XXX seems like a good indicator of failure. 96 // XXX also, test CERROR against a minimum value?
Note:
See TracChangeset
for help on using the changeset viewer.
