Changeset 42225 for branches/eam_branches/ipp-20220316
- Timestamp:
- May 24, 2022, 4:27:00 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20220316/fpcamera/src/fpcameraAnalysis.c
r42186 r42225 41 41 if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE(FPCAMERA_ERR_DATA, "failed to load images at FPA level"); 42 42 43 // count the number of sucesses and raise bad quality if none succeed 44 int nChipGood = 0; 45 int nChipTotal = 0; 46 43 47 // load images at chip level (if appropriate) 44 48 while ((chip = pmFPAviewNextChip (view, input->fpa, 1)) != NULL) { 49 nChipTotal ++; 45 50 psTrace ("fpcamera", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process); 46 51 if (!chip->process || !chip->file_exists) { continue; } … … 68 73 psFree (psf); 69 74 70 if (!psphotForcedReadout (config, view, "FPCAMERA.INPUT")) ESCAPE(FPCAMERA_ERR_DATA, "failure in psphotForcedReadout"); 75 if (!psphotForcedReadout (config, view, "FPCAMERA.INPUT")) { 76 // This is likely a data quality issue, e.g. no stars on a chip 77 // Do not raise an error, but do not add to count of good chips 78 psErrorStackPrint(stderr, "Unable to perform photometry on image"); 79 psWarning("Unable to perform photometry on image --- suspect bad data quality."); 80 psErrorClear(); 81 continue; 82 } 83 nChipGood ++; 71 84 } 72 85 // drop all versions of the internal files … … 80 93 } 81 94 if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE(FPCAMERA_ERR_IO, "failure in IOChecks(AFTER) at FPA"); 95 96 if (!nChipGood) { 97 if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) { 98 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, "Unable to perform photometry on image", FPCAMERA_ERR_DATA); 99 } 100 } 101 psLogMsg("fpcamera", 3, "fpcameraAnalysis: %d of %d chips are good\n", nChipGood, nChipTotal); 82 102 83 103 psFree (view);
Note:
See TracChangeset
for help on using the changeset viewer.
