Changeset 33848 for trunk/ppImage/src/ppImageParseCamera.c
- Timestamp:
- May 3, 2012, 5:51:09 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageParseCamera.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageParseCamera.c
r29833 r33848 22 22 ppImageOptions *options = ppImageOptionsParse(config); 23 23 24 // parse the header to extract out whether this OTA has video cells. 25 // CZW: 2012-05-01 I'm somewhat ashamed of what needs to be done to get to the header. There has to be a simpler way, right? 26 /* pmFPAview *view = pmFPAviewAlloc(0);// View for level of interest */ 27 /* pmChip *chip; // Chip from FPA */ 28 /* while ((chip = pmFPAviewNextChip(view, input->fpa, 1)) != NULL) { */ 29 /* if (!chip->process || !chip->file_exists) { */ 30 /* continue; */ 31 /* } */ 32 /* /\* if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { *\/ */ 33 /* /\* continue; *\/ */ 34 /* /\* } *\/ */ 35 /* psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); */ 36 /* if (psMetadataLookupStr(NULL,chip->hdu->header,"CELLMODE")) { */ 37 /* psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); */ 38 /* char *Vptr = strchr(psMetadataLookupStr(NULL,chip->hdu->header,"CELLMODE"),'V'); */ 39 /* if (Vptr) { */ 40 /* options->hasVideo = true; */ 41 /* psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); */ 42 /* } */ 43 /* } */ 44 /* } */ 45 /* pmFPAviewReset(view); */ 46 /* psFree(view); */ 47 24 48 // the following are defined from the argument list, if given, 25 49 // otherwise they revert to the config information … … 42 66 } 43 67 if (options->doDark) { 44 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.DARK", "DARK", 45 PM_FPA_FILE_DARK, PM_DETREND_TYPE_DARK)) { 68 // Always load the regular Dark 69 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.DARK", "DARK", 70 PM_FPA_FILE_DARK, PM_DETREND_TYPE_DARK)) { 71 psError(PS_ERR_IO, false, "Can't find a dark image source"); 72 psFree(options); 73 return NULL; 74 } 75 // Sometimes load the video dark if we need it. 76 if (options->useVideoDark) { 77 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.VIDEODARK", "DARK", 78 PM_FPA_FILE_DARK, PM_DETREND_TYPE_VIDEODARK)) { 46 79 psError(PS_ERR_IO, false, "Can't find a dark image source"); 47 80 psFree(options); 48 81 return NULL; 49 82 } 83 } 50 84 } 51 85 if (options->doMask) { 52 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.MASK", "MASK", 53 PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) { 86 // Always load the regular mask 87 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.MASK", "MASK", 88 PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) { 89 psError(PS_ERR_IO, false, "Can't find a mask image source"); 90 psFree(options); 91 return NULL; 92 } 93 94 if (options->useVideoMask) { 95 if (!ppImageDefineFile(config, input->fpa, "PPIMAGE.VIDEOMASK", "MASK", 96 PM_FPA_FILE_MASK, PM_DETREND_TYPE_VIDEOMASK)) { 54 97 psError(PS_ERR_IO, false, "Can't find a mask image source"); 55 98 psFree(options); 56 99 return NULL; 57 100 } 101 } 58 102 } 59 103 if (options->doShutter) {
Note:
See TracChangeset
for help on using the changeset viewer.
