Changeset 33848 for trunk/ppImage/src/ppImageDetrendReadout.c
- Timestamp:
- May 3, 2012, 5:51:09 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageDetrendReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageDetrendReadout.c
r33590 r33848 35 35 } 36 36 } 37 37 // Check to see if we're in a chip that contains video 38 bool hasVideo = false; 39 { 40 if (psMetadataLookupStr(NULL,input->parent->parent->hdu->header,"CELLMODE")) { 41 psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); 42 char *Vptr = strchr(psMetadataLookupStr(NULL,input->parent->parent->hdu->header,"CELLMODE"),'V'); 43 if (Vptr) { 44 hasVideo = true; 45 psWarning("VIDEO: %d %d %d\n",(int) options->hasVideo,(int) options->useVideoDark, (int) options->useVideoMask); 46 } 47 } 48 } 49 50 38 51 // Masking on the basis of pixel value needs to be done before anything else, so the values are pristine. 39 52 if (options->doMaskBuild) { … … 44 57 // apply the externally supplied mask to the input->mask pixels 45 58 if (options->doMask) { 46 pmReadout *mask = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.MASK"); 47 pmMaskBadPixels(input, mask, options->maskValue); 59 pmReadout *mask; 60 if ((options->useVideoMask)&&(hasVideo)) { 61 mask = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.VIDEOMASK"); 62 } 63 else { 64 mask = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.MASK"); 65 } 66 pmMaskBadPixels(input, mask, options->maskValue); 48 67 } 49 68 if (options->doMaskBurntool) { … … 80 99 psMetadata *recipe = psMetadataLookupPtr (&mdok, config->recipes, RECIPE_NAME); 81 100 assert(mdok && recipe); 82 if (psMetadataLookupBool(&mdok, recipe, "OLDDARK")) { 101 102 if ((options->useVideoDark)&&(hasVideo)) { 103 if (psMetadataLookupBool(&mdok, recipe, "OLDDARK")) { 104 oldDark = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.VIDEODARK"); 105 } else { 106 dark = pmFPAfileThisCell(config->files, detview, "PPIMAGE.VIDEODARK"); 107 } 108 } 109 else { 110 if (psMetadataLookupBool(&mdok, recipe, "OLDDARK")) { 83 111 oldDark = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.DARK"); 84 } else {112 } else { 85 113 dark = pmFPAfileThisCell(config->files, detview, "PPIMAGE.DARK"); 86 } 114 } 115 } 87 116 } 88 117
Note:
See TracChangeset
for help on using the changeset viewer.
