Changeset 33848
- Timestamp:
- May 3, 2012, 5:51:09 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
-
ippconfig/gpc1/ppImage.config (modified) (1 diff)
-
ippconfig/recipes/filerules-mef.mdc (modified) (1 diff)
-
ippconfig/recipes/filerules-simple.mdc (modified) (1 diff)
-
ippconfig/recipes/filerules-split.mdc (modified) (2 diffs)
-
ippconfig/recipes/ppImage.config (modified) (1 diff)
-
ppImage/src/ppImage.h (modified) (1 diff)
-
ppImage/src/ppImageDetrendReadout.c (modified) (3 diffs)
-
ppImage/src/ppImageOptions.c (modified) (3 diffs)
-
ppImage/src/ppImageParseCamera.c (modified) (2 diffs)
-
psModules/src/detrend/pmDetrendDB.c (modified) (1 diff)
-
psModules/src/detrend/pmDetrendDB.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/gpc1/ppImage.config
r33642 r33848 25 25 NOISEMAP BOOL FALSE # Apply read noise map 26 26 27 27 # Final detrending options 28 HAS.VIDEO BOOL FALSE # Treat this OTA as if it has video data 29 USE.VIDEO.DARK BOOL FALSE # Use a video dark if we have video data? 30 USE.VIDEO.MASK BOOL TRUE # Use a video mask if we have video data? 28 31 29 32 -
trunk/ippconfig/recipes/filerules-mef.mdc
r33636 r33848 59 59 PPIMAGE.INPUT.SRC INPUT @FILES CHIP CMF 60 60 PPIMAGE.MASK INPUT @DETDB CHIP MASK 61 PPIMAGE.VIDEOMASK INPUT @DETDB CHIP MASK 61 62 PPIMAGE.BIAS INPUT @DETDB CHIP IMAGE 62 63 PPIMAGE.DARK INPUT @DETDB CHIP DARK 64 PPIMAGE.VIDEODARK INPUT @DETDB CHIP DARK 63 65 PPIMAGE.FLAT INPUT @DETDB CHIP IMAGE 64 66 PPIMAGE.FRINGE INPUT @DETDB CHIP FRINGE -
trunk/ippconfig/recipes/filerules-simple.mdc
r33636 r33848 23 23 PPIMAGE.INPUT.SRC INPUT @FILES READOUT CMF 24 24 PPIMAGE.MASK INPUT @DETDB CHIP MASK 25 PPIMAGE.VIDEOMASK INPUT @DETDB CHIP MASK 25 26 PPIMAGE.BIAS INPUT @DETDB CHIP IMAGE 26 27 PPIMAGE.DARK INPUT @DETDB CHIP DARK 28 PPIMAGE.VIDEODARK INPUT @DETDB CHIP DARK 27 29 PPIMAGE.FLAT INPUT @DETDB CHIP IMAGE 28 30 PPIMAGE.FRINGE INPUT @DETDB CHIP FRINGE -
trunk/ippconfig/recipes/filerules-split.mdc
r33690 r33848 36 36 PPIMAGE.INPUT INPUT @FILES CHIP IMAGE 37 37 PPIMAGE.INPUT.MASK INPUT @FILES CHIP MASK 38 PPIMAGE.VIDEOMASK INPUT @DETDB CHIP MASK 38 39 PPIMAGE.INPUT.VARIANCE INPUT @FILES CHIP VARIANCE 39 40 PPIMAGE.INPUT.PSF INPUT @FILES CHIP PSF … … 43 44 PPIMAGE.NOISEMAP INPUT @DETDB CHIP IMAGE 44 45 PPIMAGE.DARK INPUT @DETDB CHIP DARK 46 PPIMAGE.VIDEODARK INPUT @DETDB CHIP DARK 45 47 PPIMAGE.FLAT INPUT @DETDB CHIP IMAGE 46 48 PPIMAGE.FRINGE INPUT @DETDB CHIP FRINGE -
trunk/ippconfig/recipes/ppImage.config
r33642 r33848 153 153 154 154 GAIN.OVERRIDE BOOL FALSE # Override a non-finite gain? 155 156 # Final detrending options 157 HAS.VIDEO BOOL FALSE # Treat this OTA as if it has video data 158 USE.VIDEO.DARK BOOL FALSE # Use a video dark if we have video data? 159 USE.VIDEO.MASK BOOL FALSE # Use a video mask if we have video data? 155 160 156 161 DETREND.CONSTRAINTS METADATA -
trunk/ppImage/src/ppImage.h
r33590 r33848 57 57 bool addNoise; // Add noise to degrade MD image to 3pi 58 58 59 bool hasVideo; // Determine if this OTA has a video cell 60 bool useVideoDark; // Should we use a video dark if we can? 61 bool useVideoMask; // Should we use a video mask if we can? 62 59 63 // output files requested 60 64 bool BaseFITS; -
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 -
trunk/ppImage/src/ppImageOptions.c
r33590 r33848 45 45 options->doMaskStats = false; // Calculate mask fractions 46 46 options->addNoise = false; //Degrade an MD image to a 3pi image 47 47 options->hasVideo = false; // Determine if this OTA has a video cell 48 options->useVideoDark = false; // Use video dark if we can? 49 options->useVideoMask = false; // Use video mask if we can? 48 50 // output files requested 49 51 options->BaseFITS = false; // create output image … … 362 364 options->fringeKeep = psMetadataLookupF32(NULL, recipe, "FRINGE.KEEP"); 363 365 366 // Video cell options 367 if (psMetadataLookup(recipe, "USE.VIDEO.DARK")) { 368 options->useVideoDark = psMetadataLookupBool(NULL,recipe,"USE.VIDEO.DARK"); 369 } 370 if (psMetadataLookup(recipe, "USE.VIDEO.MASK")) { 371 options->useVideoMask = psMetadataLookupBool(NULL,recipe,"USE.VIDEO.MASK"); 372 } 373 364 374 // Pattern correction 365 375 if (psMetadataLookup(format, "PATTERN.ROW.ORDER")) { … … 418 428 options->patternContinuityEdgeWidth = psMetadataLookupS32(NULL, recipe, "PATTERN.CONTINUITY.WIDTH"); 419 429 } 420 430 421 431 422 432 // Remnance options -
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) { -
trunk/psModules/src/detrend/pmDetrendDB.c
r31067 r33848 107 107 DETREND_STRING_CASE(ASTROM); 108 108 DETREND_STRING_CASE(NOISEMAP); 109 DETREND_STRING_CASE(VIDEOMASK); 110 DETREND_STRING_CASE(VIDEODARK); 109 111 DETREND_STRING_CASE(LINEARITY); 110 112 default: -
trunk/psModules/src/detrend/pmDetrendDB.h
r29833 r33848 36 36 PM_DETREND_TYPE_ASTROM, 37 37 PM_DETREND_TYPE_NOISEMAP, 38 PM_DETREND_TYPE_VIDEOMASK, 39 PM_DETREND_TYPE_VIDEODARK, 38 40 PM_DETREND_TYPE_LINEARITY, 39 41 } pmDetrendType;
Note:
See TracChangeset
for help on using the changeset viewer.
