Changeset 23688 for trunk/ppImage
- Timestamp:
- Apr 2, 2009, 2:51:37 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
. (modified) (1 prop)
-
ppImage (modified) (1 prop)
-
ppImage/src/ppImage.h (modified) (3 diffs)
-
ppImage/src/ppImageAstrom.c (modified) (2 diffs)
-
ppImage/src/ppImageLoop.c (modified) (3 diffs)
-
ppImage/src/ppImagePhotom.c (modified) (3 diffs)
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/ppImage
- Property svn:mergeinfo changed
/branches/pap/ppImage (added) merged: 23580,23597,23607,23647
- Property svn:mergeinfo changed
-
trunk/ppImage/src/ppImage.h
r23411 r23688 40 40 bool doAstromMosaic; // full-mosaic Astrometry 41 41 bool doStats; // call ppStats on the image 42 bool checkCTE; // measure pixel-based variance42 bool checkCTE; // measure pixel-based variance 43 43 44 44 // output files requested … … 88 88 float remnanceThresh; // Threshold for remnance detection 89 89 90 char *normClass; // class to use for per-class normalization90 char *normClass; // class to use for per-class normalization 91 91 } ppImageOptions; 92 92 … … 146 146 bool ppImageRebinChip (pmConfig *config, pmFPAview *view, ppImageOptions *options, char *outName); 147 147 148 bool ppImagePhotom (pmConfig *config, pmFPAview *view);149 bool ppImageAstrom (pmConfig *config);150 bool ppImageAddstar (pmConfig *config);148 bool ppImagePhotom(psMetadata *stats, pmConfig *config, pmFPAview *view); 149 bool ppImageAstrom(pmConfig *config, psMetadata *stats); 150 bool ppImageAddstar(pmConfig *config); 151 151 152 152 // Subtract background from the chip-mosaicked image -
trunk/ppImage/src/ppImageAstrom.c
r16084 r23688 7 7 // this function is mostly equivalent to the top-level of psastro, with some 8 8 // modifications since the data has already been loaded. 9 bool ppImageAstrom (pmConfig *config ) {9 bool ppImageAstrom (pmConfig *config, psMetadata *stats) { 10 10 11 11 bool status; … … 27 27 } 28 28 29 if (!psastroAnalysis (config)) {29 if (!psastroAnalysis(config, stats)) { 30 30 psError (PSASTRO_ERR_UNKNOWN, false, "failure in psastro analysis\n"); 31 31 return false; -
trunk/ppImage/src/ppImageLoop.c
r23411 r23688 13 13 bool ppImageLoop(pmConfig *config, ppImageOptions *options) 14 14 { 15 psMetadata *stats = options->doStats ? psMetadataAlloc() : NULL;// Statistics to output15 psMetadata *stats = NULL; // Statistics to output 16 16 float timeDetrend = 0; // Amount of time spent in detrend 17 17 float timePhot = 0; // Amount of time spent in photometry 18 19 if (options->doStats) { 20 stats = psMetadataAlloc(); 21 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", 0, "No problems", 0); 22 } 18 23 19 24 bool status; // Status of MD lookup … … 139 144 psTimerStart(TIMER_PHOT); 140 145 if (options->doPhotom) { 141 if (!ppImagePhotom( config, view)) {146 if (!ppImagePhotom(stats, config, view)) { 142 147 ESCAPE("error running photometry."); 143 148 } … … 200 205 // this also performs the psastro file IO 201 206 if (options->doAstromChip || options->doAstromMosaic) { 202 if (!ppImageAstrom(config )) {207 if (!ppImageAstrom(config, stats)) { 203 208 ESCAPE("error running astrometry."); 204 209 } -
trunk/ppImage/src/ppImagePhotom.c
r20410 r23688 6 6 7 7 // In this function, we perform the psphot analysis routine for the chip-mosaicked images 8 bool ppImagePhotom (pmConfig *config, pmFPAview *view) {8 bool ppImagePhotom(psMetadata *stats, pmConfig *config, pmFPAview *view) { 9 9 10 10 bool status; … … 12 12 pmReadout *readout; 13 13 14 psphotInit ();14 psphotInit(); 15 15 16 16 // find or define a pmFPAfile PSPHOT.INPUT … … 37 37 // run the actual photometry analysis 38 38 if (!psphotReadout (config, view)) { 39 psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout); 40 return false; 39 // This is likely a data quality issue 40 // XXX Split into multiple cases using error codes? 41 psErrorStackPrint(stderr, "Unable to perform photometry on image"); 42 psWarning("Unable to perform photometry on image --- suspect bad data quality."); 43 if (stats && psMetadataLookupS32(NULL, stats, "QUALITY") == 0) { 44 psMetadataAddS32(stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, 45 "Unable to perform photometry on image", psErrorCodeLast()); 46 } 47 psErrorClear(); 48 psphotFilesActivate(config, false); 41 49 } 42 50 43 // we want to save the MASK as modified by psphot, but not the data or weight44 // free the old mask and replace with a memory copy of the new mask45 pmReadout *oldReadout = pmFPAviewThisReadout(view, input->src);46 pmReadout *newReadout = pmFPAviewThisReadout(view, input->fpa);47 psFree (oldReadout->mask);48 oldReadout->mask = psMemIncrRefCounter(newReadout->mask);51 // we want to save the MASK as modified by psphot, but not the data or weight 52 // free the old mask and replace with a memory copy of the new mask 53 pmReadout *oldReadout = pmFPAviewThisReadout(view, input->src); 54 pmReadout *newReadout = pmFPAviewThisReadout(view, input->fpa); 55 psFree (oldReadout->mask); 56 oldReadout->mask = psMemIncrRefCounter(newReadout->mask); 49 57 } 50 58 }
Note:
See TracChangeset
for help on using the changeset viewer.
