Changeset 23580 for branches/pap/ppSub
- Timestamp:
- Mar 27, 2009, 4:46:10 PM (18 years ago)
- Location:
- branches/pap/ppSub/src
- Files:
-
- 2 edited
-
ppSubMakePSF.c (modified) (2 diffs)
-
ppSubReadoutPhotometry.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppSub/src/ppSubMakePSF.c
r23235 r23580 83 83 psArray *sources = psMetadataLookupPtr(&mdok, minuend->analysis, "PSPHOT.SOURCES"); 84 84 if (!psphotReadoutFindPSF(config, view, sources)) { 85 psError(PS_ERR_UNKNOWN, false, "Unable to perform photometry on subtracted image."); 86 return false; 85 // This is likely a data quality issue 86 // XXX Split into multiple cases using error codes? 87 psErrorStackPrint("Unable to determine PSF"); 88 psWarning("Unable to determine PSF --- suspect bad data quality."); 89 if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) { 90 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, 91 "Unable to determine PSF", psErrorCodeLast()); 92 } 93 psErrorClear(); 94 psphotFilesActivate(config, false); 87 95 } 88 96 … … 98 106 return true; 99 107 } 100 101 // XXX we used to need this, is it still needed?102 103 // pmCell *photCell = pmFPAfileThisCell(config->files, view, "PSPHOT.INPUT");104 // pmCellFreeReadouts(photCell);105 106 // if (!pmFPAfileDropInternal(config->files, "PSPHOT.BACKMDL") ||107 // !pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL.STDEV") ||108 // !pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND")) {109 // psError(PS_ERR_UNKNOWN, false, "Unable to drop PSPHOT internal files.");110 // return false;111 // }112 113 // Blow away the sources psphot found --- they're irrelevant for the subtraction114 // XXX is this still needed? These are now probably not being set115 // pmReadout *photRO = pmFPAviewThisReadout(view, photFile->fpa); // Readout with sources116 // psMetadataRemoveKey(photRO->analysis, "PSPHOT.SOURCES");117 // psMetadataRemoveKey(photRO->analysis, "PSPHOT.HEADER");118 -
branches/pap/ppSub/src/ppSubReadoutPhotometry.c
r21524 r23580 45 45 pmPSF *psf = psMetadataLookupPtr(NULL, psfInputChip->analysis, "PSPHOT.PSF"); // PSF for photometry 46 46 if (!psf) { 47 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find PSF from psphot"); 48 return false; 47 psWarning("No PSF available --- suspect bad data quality."); 48 if (stats && psMetadataLookupBool(NULL, stats, "QUALITY")) { 49 psError(PS_ERR_UNEXPECTED_NULL, false, "Bad or unset QUALITY flag"); 50 return false; 51 } 52 psErrorClear(); 53 psphotFilesActivate(config, false); 49 54 } 50 55 psMetadataAddPtr(psfLoadChip->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN | PS_META_REPLACE, … … 86 91 87 92 if (!psphotReadoutMinimal(config, view)) { 88 psWarning("Unable to perform photometry on subtracted image."); 89 psErrorStackPrint(stderr, "Error stack from photometry:"); 93 // This is likely a data quality issue 94 // XXX Split into multiple cases using error codes? 95 psErrorStackPrint("Unable to perform photometry on image"); 96 psWarning("Unable to perform photometry on image --- suspect bad data quality."); 97 if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) { 98 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, 99 "Unable to perform photometry on image", psErrorCodeLast()); 100 } 90 101 psErrorClear(); 102 psphotFilesActivate(config, false); 91 103 } 92 104 #if 1
Note:
See TracChangeset
for help on using the changeset viewer.
