Changeset 16605 for trunk/ppStack/src/ppStackCamera.c
- Timestamp:
- Feb 22, 2008, 9:28:00 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackCamera.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackCamera.c
r15844 r16605 10 10 11 11 #include "ppStack.h" 12 13 14 #if 0 15 // Define an output convolved image file 16 static pmFPAfile *defineOutputConvolved(const char *name, // FPA file name 17 pmFPA *fpa, // FPA to bind 18 const pmConfig *config, // Configuration 19 pmFPAfileType type // Expected type 20 ) 21 { 22 pmFPAfile *file = pmFPAfileDefineOutput(config, fpa, name); 23 if (!file) { 24 psError(PS_ERR_UNKNOWN, false, "Unable to define output convolved file %s", name); 25 return NULL; 26 } 27 if (file->type != PM_FPA_FILE_IMAGE) { 28 psError(PS_ERR_IO, true, "PPSTACK.OUTCONV is not of type %s", pmFPAfileStringFromType(type)); 29 return NULL; 30 } 31 32 return file; 33 } 34 35 // Define an input convolved image file, using the output as a basis 36 static pmFPAfile *defineInputConvolved(const char *inputName, // Input FPA file name 37 pmFPAfile *outFile, // Corresponding output FPA file 38 pmConfig *config, // Configuration 39 pmFPAfileType type // Expected type 40 ) 41 { 42 pmFPAview *view = pmFPAviewAlloc(0); // View into sky cells 43 view->chip = view->cell = view->readout = 0; 44 45 psString imageName = pmFPANameFromRule(outFile->filerule, outFile->fpa, view); 46 psArray *imageNames = psArrayAlloc(1); 47 imageNames->data[0] = imageName; 48 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "INCONV.FILENAMES", PS_META_REPLACE, 49 "Filenames of input convolved image files", imageNames); 50 psFree(imageNames); 51 bool found = false; // Found the file? 52 pmFPAfile *imageFile = pmFPAfileDefineFromArgs(&found, config, "PPSTACK.INCONV", 53 "INCONV.FILENAMES"); 54 psMetadataRemoveKey(config->arguments, "INCONV.FILENAMES"); 55 if (!imageFile || !found) { 56 psError(PS_ERR_UNKNOWN, false, "Unable to define %s file", inputName); 57 return NULL; 58 } 59 if (imageFile->type != type) { 60 psError(PS_ERR_IO, true, "PPSTACK.INCONV is not of type %s", 61 pmFPAfileStringFromType(type)); 62 return NULL; 63 } 64 65 return imageFile; 66 } 67 #endif 68 69 12 70 13 71 bool ppStackCamera(pmConfig *config) … … 138 196 } 139 197 } 198 199 #if 0 200 // Output convolved files 201 pmFPAfile *outconvImage = defineOutputConvolved("PPSTACK.OUTCONV", imageFile->fpa, config, 202 PM_FPA_FILE_IMAGE); 203 pmFPAfile *outconvMask = defineOutputConvolved("PPSTACK.OUTCONV.MASK", imageFile->fpa, config, 204 PM_FPA_FILE_MASK); 205 pmFPAfile *outconvWeight = defineOutputConvolved("PPSTACK.OUTCONV.WEIGHT", imageFile->fpa, config, 206 PM_FPA_FILE_WEIGHT); 207 if (!outconvImage || !outconvMask || !outconvWeight) { 208 return false; 209 } 210 211 // Input convolved files 212 pmFPAfile *inconvImage = defineInputConvolved("PPSTACK.INCONV", outconvImage, config, 213 PM_FPA_FILE_IMAGE); 214 pmFPAfile *inconvMask = defineInputConvolved("PPSTACK.INCONV.MASK", outconvMask, config, 215 PM_FPA_FILE_MASK); 216 pmFPAfile *inconvWeight = defineInputConvolved("PPSTACK.INCONV.WEIGHT", outconvWeight, config, 217 PM_FPA_FILE_WEIGHT); 218 if (!inconvImage || !inconvMask || !inconvWeight) { 219 return false; 220 } 221 #endif 140 222 141 223 psMetadataAddF32(imageFile->fpa->analysis, PS_LIST_TAIL, "PPSTACK.WEIGHTING", 0, … … 241 323 } 242 324 325 243 326 // Output PSF 244 327 if (havePSFs) {
Note:
See TracChangeset
for help on using the changeset viewer.
