Changeset 30118 for branches/czw_branch/20101203/ppImage
- Timestamp:
- Dec 20, 2010, 2:30:45 PM (16 years ago)
- Location:
- branches/czw_branch/20101203
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
ppImage/src/ppImageDetrendReadout.c (modified) (2 diffs)
-
ppImage/src/ppImageOptions.c (modified) (2 diffs)
-
ppImage/src/ppImagePhotom.c (modified) (4 diffs)
-
ppImage/src/ppImageStatsOutput.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20101203
- Property svn:mergeinfo changed
-
branches/czw_branch/20101203/ppImage/src/ppImageDetrendReadout.c
r29833 r30118 62 62 // Non-linearity correction 63 63 if (options->doNonLin) { 64 // linearity = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.LINEARITY");65 64 if (!ppImageDetrendNonLinear(input,detview,config)) { 66 65 psError(PS_ERR_UNKNOWN, false, "Unable to correct NonLinearity"); … … 68 67 return(false); 69 68 } 70 /* ppImageDetrendNonLinear(detrend->input, input, options); */71 69 } 72 70 -
branches/czw_branch/20101203/ppImage/src/ppImageOptions.c
r29833 r30118 216 216 217 217 // for these images, even if not required otherwise 218 options->doMaskBuild = psMetadataLookupBool(NULL, recipe, "MASK.BUILD");219 options->doMaskSat = psMetadataLookupBool(NULL, recipe, "MASK.SATURATED");220 options->doMaskLow = psMetadataLookupBool(NULL, recipe, "MASK.LOW");221 options->doMaskBurntool = psMetadataLookupBool(NULL, recipe, "MASK.BURNTOOL");218 options->doMaskBuild = psMetadataLookupBool(NULL, recipe, "MASK.BUILD"); 219 options->doMaskSat = psMetadataLookupBool(NULL, recipe, "MASK.SATURATED"); 220 options->doMaskLow = psMetadataLookupBool(NULL, recipe, "MASK.LOW"); 221 options->doMaskBurntool = psMetadataLookupBool(NULL, recipe, "MASK.BURNTOOL"); 222 222 options->doVarianceBuild = psMetadataLookupBool(NULL, recipe, "VARIANCE.BUILD"); 223 223 … … 301 301 options->checkCTE = psMetadataLookupBool(NULL, recipe, "CHECK.CTE"); 302 302 303 // even if not requested explicitly, if any of these are set, build an internal mask and variance: 304 if (options->doNoiseMap || options->doBias || options->doOverscan || options->doDark || options->doShutter || options->doFlat || 305 options->doPhotom) { 303 /* doMaskBuild : there are some cases where we require a mask, so we force doMaskBuild to be set even if the user specified 'FALSE' 304 * 305 * doPhotom : a mask is required because it is used to mark the locations of stars 306 * 307 * doNoiseMap : no reason this needs to trigger a mask? 308 * doBias : no reason this needs to trigger a mask? 309 * doOverscan : no reason this needs to trigger a mask? 310 * doDark : no reason this needs to trigger a mask? 311 * doShutter : no reason this needs to trigger a mask? 312 * doFlat : no reason this needs to trigger a mask? 313 */ 314 315 // if the variance image is requested, build it (if not supplied) 316 if (options->BaseVarianceFITS || options->ChipVarianceFITS) { 317 options->doVarianceBuild = true; 318 } 319 // photometry and noisemap both require a variance image 320 if (options->doNoiseMap || options->doPhotom) { 321 options->doVarianceBuild = true; 322 } 323 324 // we need a mask if we are going to apply these things: 325 if (options->doMaskSat || options->doMaskLow || options->doMaskBurntool || options->doMaskStats) { 306 326 options->doMaskBuild = true; 307 options->doVarianceBuild = true; 308 } else if (options->doMask || options->doBG) { 327 } 328 // photometry, mask, and background all require a mask image 329 if (options->doMask || options->doBG || options->doPhotom) { 309 330 options->doMaskBuild = true; 310 331 } -
branches/czw_branch/20101203/ppImage/src/ppImagePhotom.c
r28375 r30118 11 11 pmCell *cell; 12 12 pmReadout *readout; 13 printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast())); 13 14 14 psphotInit(); 15 printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast())); 15 16 16 // find or define a pmFPAfile PSPHOT.INPUT 17 17 pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT"); … … 20 20 return false; 21 21 } 22 printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast())); 22 23 23 // we make a new copy of the output chip to keep psphot from modifying the output image 24 24 pmChip *oldChip = pmFPAviewThisChip (view, input->src); 25 25 pmChip *newChip = pmFPAviewThisChip (view, input->fpa); 26 26 pmChipCopy (newChip, oldChip); 27 printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast())); 27 28 28 // iterate over the cells and readout for this chip 29 29 while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) { … … 34 34 while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) { 35 35 if (! readout->data_exists) { continue; } 36 printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast())); 36 37 37 // run the actual photometry analysis 38 if (!psphotReadout (config, view )) {38 if (!psphotReadout (config, view, "PSPHOT.INPUT")) { 39 39 // This is likely a data quality issue 40 40 // XXX Split into multiple cases using error codes? … … 60 60 ppImageMemoryDump("photom"); 61 61 62 // the PSPHOT.INPUT file is a temporary file used to carry PPIMAGE.CHIP to psphotReadout63 // XXX not sure that this is needed...64 // pmFPAfileActivate (config->files, false, "PSPHOT.INPUT");65 66 62 return true; 67 63 } 68 69 // XXX do we need to deactivate all files and activate the psphot ones explicitly? -
branches/czw_branch/20101203/ppImage/src/ppImageStatsOutput.c
r27064 r30118 28 28 return false; 29 29 } 30 if (!psMetadataConfigWrite(stats, resolved)) { 30 31 // check for Metadata compression options: 32 char *compressMode = NULL; 33 bool status = false; 34 if (config->camera) { 35 // XXX use a different config variable for this output? 36 compressMode = psMetadataLookupStr(&status, config->camera, "METADATA.COMPRESSION"); 37 } 38 39 if (!psMetadataConfigWrite(stats, resolved, compressMode)) { 31 40 psError(psErrorCodeLast(), false, "Unable to serialize stats metadata.\n"); 32 41 psFree(resolved);
Note:
See TracChangeset
for help on using the changeset viewer.
