Changeset 13613
- Timestamp:
- Jun 4, 2007, 10:17:11 AM (19 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 2 edited
-
ppStackCamera.c (modified) (2 diffs)
-
ppStackReadout.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackCamera.c
r13528 r13613 35 35 36 36 psString mask = psMetadataLookupStr(NULL, input, "MASK"); // Name of mask 37 if (!mask || strlen(mask) == 0) {38 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks MASK of type STR", item->name);39 psFree(iter);40 return false;41 }42 37 43 38 float seeing = psMetadataLookupF32(NULL, input, "SEEING"); // Seeing FWHM … … 80 75 } 81 76 82 // Add the mask file 83 psArray *maskFiles = psArrayAlloc(1); // Array of filenames for this FPA 84 maskFiles->data[0] = psMemIncrRefCounter(mask); 85 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "MASK.FILENAMES", PS_META_REPLACE, 86 "Filenames of mask files", maskFiles); 87 psFree(maskFiles); 77 // Optionally add the mask file 78 if (mask && strlen(mask) > 0) { 79 psArray *maskFiles = psArrayAlloc(1); // Array of filenames for this FPA 80 maskFiles->data[0] = psMemIncrRefCounter(mask); 81 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "MASK.FILENAMES", PS_META_REPLACE, 82 "Filenames of mask files", maskFiles); 83 psFree(maskFiles); 88 84 89 bool status; 90 pmFPAfile *maskFile = pmFPAfileBindFromArgs(&status, imageFile, config, "PPSTACK.INPUT.MASK", "MASK.FILENAMES"); 91 if (!status) { 92 psError(PS_ERR_UNKNOWN, false, "Unable to define file from mask %d (%s)", i, mask); 93 return false; 94 } 95 if (maskFile->type != PM_FPA_FILE_MASK) { 96 psError(PS_ERR_IO, true, "PPSTACK.INPUT.MASK is not of type MASK"); 97 return false; 85 bool status; 86 pmFPAfile *maskFile = pmFPAfileBindFromArgs(&status, imageFile, config, "PPSTACK.INPUT.MASK", "MASK.FILENAMES"); 87 if (!status) { 88 psError(PS_ERR_UNKNOWN, false, "Unable to define file from mask %d (%s)", i, mask); 89 return false; 90 } 91 if (maskFile->type != PM_FPA_FILE_MASK) { 92 psError(PS_ERR_IO, true, "PPSTACK.INPUT.MASK is not of type MASK"); 93 return false; 94 } 98 95 } 99 96 -
trunk/ppStack/src/ppStackReadout.c
r13515 r13613 80 80 psArrayAdd(stack, ARRAY_BUFFER, data); 81 81 psFree(data); // Drop reference 82 83 // Ensure there is a mask, or pmStackCombine will complain 84 if (!ro->mask) { 85 ro->mask = psImageAlloc(ro->image->numCols, ro->image->numRows, PS_TYPE_MASK); 86 psImageInit(ro->mask, 0); 87 } 88 82 89 fileNum++; 83 90 }
Note:
See TracChangeset
for help on using the changeset viewer.
