Changeset 26682
- Timestamp:
- Jan 25, 2010, 9:09:13 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
ippconfig/gpc1/ppImage.config (modified) (1 diff)
-
ippconfig/recipes/ppImage.config (modified) (1 diff)
-
ppImage/src/ppImageDetrendPattern.c (modified) (1 diff)
-
ppImage/src/ppImageLoop.c (modified) (4 diffs)
-
psModules/src/config/Makefile.am (modified) (2 diffs)
-
psModules/src/config/pmConfigRecipeValue.c (added)
-
psModules/src/config/pmConfigRecipeValue.h (added)
-
psModules/src/psmodules.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/gpc1/ppImage.config
r26629 r26682 23 23 TILTYSTREAK.APPLY BOOL FALSE # apply the 'tiltystreak' tool 24 24 NOISEMAP BOOL FALSE # Apply read noise map 25 26 PATTERN BOOL FALSE # Do any pattern subtraction at all? 27 PATTERN.SUBSET METADATA # List of chips and whether to do pattern subtraction 28 XY01 BOOL FALSE 29 XY02 BOOL FALSE 30 XY03 BOOL FALSE 31 XY04 BOOL FALSE 32 XY05 BOOL FALSE 33 XY06 BOOL FALSE 34 XY10 BOOL FALSE 35 XY11 BOOL FALSE 36 XY12 BOOL FALSE 37 XY13 BOOL FALSE 38 XY14 BOOL FALSE 39 XY15 BOOL FALSE 40 XY16 BOOL FALSE 41 XY17 BOOL FALSE 42 XY20 BOOL FALSE 43 XY21 BOOL FALSE 44 XY22 BOOL FALSE 45 XY23 BOOL FALSE 46 XY24 BOOL FALSE 47 XY25 BOOL FALSE 48 XY26 BOOL FALSE 49 XY27 BOOL FALSE 50 XY30 BOOL FALSE 51 XY31 BOOL FALSE 52 XY32 BOOL FALSE 53 XY33 BOOL FALSE 54 XY34 BOOL FALSE 55 XY35 BOOL FALSE 56 XY36 BOOL FALSE 57 XY37 BOOL FALSE 58 XY40 BOOL FALSE 59 XY41 BOOL FALSE 60 XY42 BOOL FALSE 61 XY43 BOOL FALSE 62 XY44 BOOL FALSE 63 XY45 BOOL FALSE 64 XY46 BOOL FALSE 65 XY47 BOOL FALSE 66 XY50 BOOL FALSE 67 XY51 BOOL FALSE 68 XY52 BOOL FALSE 69 XY53 BOOL FALSE 70 XY54 BOOL FALSE 71 XY55 BOOL FALSE 72 XY56 BOOL FALSE 73 XY57 BOOL FALSE 74 XY60 BOOL FALSE 75 XY61 BOOL FALSE 76 XY62 BOOL FALSE 77 XY63 BOOL FALSE 78 XY64 BOOL FALSE 79 XY65 BOOL FALSE 80 XY66 BOOL FALSE 81 XY67 BOOL FALSE 82 XY71 BOOL FALSE 83 XY72 BOOL FALSE 84 XY73 BOOL FALSE 85 XY74 BOOL FALSE 86 XY75 BOOL FALSE 87 XY76 BOOL FALSE 88 END 89 25 90 26 91 TILTYSTREAK.BY.CLASS METADATA # apply the 'tiltystreak' tool -
trunk/ippconfig/recipes/ppImage.config
r26629 r26682 19 19 VARIANCE.BUILD BOOL FALSE # Build internal variance image 20 20 PATTERN BOOL FALSE # Fit and remove pattern noise? 21 PATTERN.SUBSET METADATA 22 END 21 23 FRINGE BOOL FALSE # Fringe subtraction 22 24 PHOTOM BOOL FALSE # Source identification and photometry -
trunk/ppImage/src/ppImageDetrendPattern.c
r25930 r26682 5 5 #include "ppImage.h" 6 6 7 #define ESCAPE(MESSAGE) { \ 8 psError(PS_ERR_UNKNOWN, false, MESSAGE); \ 9 psFree(view); \ 10 return false; \ 7 #define ESCAPE(MESSAGE) { \ 8 psError(PS_ERR_UNKNOWN, false, MESSAGE); \ 9 psFree(view); \ 10 return false; \ 11 } 12 13 bool ppImageDetrendPatternApply(pmConfig *config, pmChip *chip, const pmFPAview *inputView, 14 const ppImageOptions *options) 15 { 16 pmCell *cell = NULL; 17 18 assert (options->doPattern); // do not call if not needed 19 assert (inputView->chip != -1); 20 assert (inputView->cell == -1); 21 assert (inputView->readout == -1); 22 bool status; 23 pmFPAfile *input = psMetadataLookupPtr(&status, config->files, "PPIMAGE.INPUT"); 24 25 pmFPAview *view = pmFPAviewAlloc(0); // View for local processing 26 *view = *inputView; 27 28 while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) { 29 if (!cell->process || !cell->file_exists) { 30 continue; 31 } 32 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 33 ESCAPE("load failure for Cell"); 34 } 35 36 if (!cell->data_exists) { 37 continue; 38 } 39 40 if (cell->readouts->n > 1) { 41 psWarning ("Skipping Video Cell for ppImageDetrendPatternApply"); 42 continue; 43 } 44 45 psMetadataItem *doPattern = pmConfigRecipeValueByView(config, RECIPE_NAME, "PATTERN.SUBSET", 46 chip->parent, view); // Do we do pattern sub? 47 if (!doPattern || doPattern->type != PS_DATA_BOOL) { 48 ESCAPE("Unable to determine whether pattern matching should be applied."); 49 } 50 if (!doPattern->data.B) { 51 fprintf(stderr, "*NOT* DOING PATTERN SUBTRACTION FOR %d,%d\n", view->chip, view->cell); 52 continue; 53 } 54 55 fprintf(stderr, "DOING PATTERN SUBTRACTION FOR %d,%d\n", view->chip, view->cell); 56 continue; 57 58 // process each of the readouts 59 pmReadout *readout; // Readout from cell 60 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 61 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 62 ESCAPE("load failure for Readout"); 63 } 64 if (!readout->data_exists) { 65 continue; 66 } 67 68 // perfore pattern correction 69 if (!pmPatternRow(readout, options->patternOrder, options->patternIter, options->patternRej, 70 options->patternThresh, options->patternMean, options->patternStdev, 71 options->maskValue, options->darkMask)) { 72 psFree(view); 73 return(false); 74 } 75 } 76 } 77 78 psFree(view); 79 return(true); 11 80 } 12 81 13 bool ppImageDetrendPatternApply(pmConfig *config, pmChip *chip, const pmFPAview *inputView, const ppImageOptions *options) {14 82 15 16 pmCell *cell = NULL;17 18 assert (options->doPattern); // do not call if not needed19 assert (inputView->chip != -1);20 assert (inputView->cell == -1);21 assert (inputView->readout == -1);22 bool status;23 pmFPAfile *input = psMetadataLookupPtr(&status, config->files, "PPIMAGE.INPUT");24 25 pmFPAview *view = pmFPAviewAlloc(0); // View for local processing26 *view = *inputView;27 28 while ((cell = pmFPAviewNextCell(view, input->fpa, 1)) != NULL) {29 if (!cell->process || !cell->file_exists) {30 continue;31 }32 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {33 ESCAPE("load failure for Cell");34 }35 36 if (!cell->data_exists) {37 continue;38 }39 40 if (cell->readouts->n > 1) {41 psWarning ("Skipping Video Cell for ppImageDetrendPatternApply");42 continue;43 }44 45 // process each of the readouts46 pmReadout *readout; // Readout from cell47 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {48 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) {49 ESCAPE("load failure for Readout");50 }51 if (!readout->data_exists) {52 continue;53 }54 55 // perfore pattern correction56 if (!pmPatternRow(readout, options->patternOrder, options->patternIter, options->patternRej,57 options->patternThresh, options->patternMean, options->patternStdev,58 options->maskValue, options->darkMask)) {59 psFree(view);60 return(false);61 }62 }63 }64 65 psFree(view);66 return(true);67 }68 69 -
trunk/ppImage/src/ppImageLoop.c
r25930 r26682 100 100 101 101 // flip the image to match the native detector orientation (to match bias, flat, etc) 102 if (!ppImageParityFlip(config, options, view, true)) {102 if (!ppImageParityFlip(config, options, view, true)) { 103 103 ESCAPE("Unable to detrend readout"); 104 104 } … … 131 131 132 132 // process each of the readouts 133 // XXX reset the view to the first readout?133 // XXX reset the view to the first readout? 134 134 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 135 135 if (!readout->data_exists) { … … 140 140 ESCAPE("Unable to detrend readout"); 141 141 } 142 }142 } 143 143 144 144 // free detrend images potentially in use: MASK, BIAS, DARK, SHUTTER, FLAT … … 163 163 } 164 164 165 // Apply the pattern noise correction166 if (options->doPattern) {167 if (!ppImageDetrendPatternApply(config,chip,view,options)) {168 ESCAPE("Unable to apply pattern corrections");169 }170 }171 165 // Apply the pattern noise correction 166 if (options->doPattern) { 167 if (!ppImageDetrendPatternApply(config,chip,view,options)) { 168 ESCAPE("Unable to apply pattern corrections"); 169 } 170 } 171 172 172 // measure various pixel-based statistics for this image 173 173 if (!ppImagePixelStats(config, stats, options, view)) { -
trunk/psModules/src/config/Makefile.am
r23794 r26682 32 32 pmConfigDump.c \ 33 33 pmConfigRun.c \ 34 pmConfigRecipeValue.c \ 34 35 pmVersion.c \ 35 36 pmErrorCodes.c … … 43 44 pmConfigDump.h \ 44 45 pmConfigRun.h \ 46 pmConfigRecipeValue.h \ 45 47 pmVersion.h \ 46 48 pmErrorCodes.h -
trunk/psModules/src/psmodules.h
r25383 r26682 29 29 #include <pmConfigDump.h> 30 30 #include <pmConfigRun.h> 31 #include <pmConfigRecipeValue.h> 31 32 #include <pmVersion.h> 32 33
Note:
See TracChangeset
for help on using the changeset viewer.
