Changeset 21219
- Timestamp:
- Jan 28, 2009, 5:24:09 PM (17 years ago)
- Location:
- branches/pap_branch_20090128/ppMerge/src
- Files:
-
- 7 edited
-
ppMergeArguments.c (modified) (3 diffs)
-
ppMergeCamera.c (modified) (5 diffs)
-
ppMergeFiles.c (modified) (7 diffs)
-
ppMergeLoop_Threaded.c (modified) (6 diffs)
-
ppMergeMask.c (modified) (13 diffs)
-
ppMergeReadChunk.c (modified) (3 diffs)
-
ppMergeScaleZero.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_20090128/ppMerge/src/ppMergeArguments.c
r19360 r21219 11 11 "\tIMAGE(STR): Image filename\n" 12 12 "\tMASK(STR): Mask filename\n" 13 "\t WEIGHT(STR) Weightmap filename\n"14 "where MASK and WEIGHTare optional.",13 "\tVARIANCE(STR) Variance map filename\n" 14 "where MASK and VARIANCE are optional.", 15 15 program); 16 16 fprintf(stderr, "\n"); … … 127 127 psMetadataAddF32(arguments, PS_LIST_TAIL, "-frachigh", 0, "Fraction of low pixels to discard", NAN); 128 128 psMetadataAddS32(arguments, PS_LIST_TAIL, "-nkeep", 0, "Minimum number of pixels in stack to keep", 0); 129 psMetadataAddBool(arguments, PS_LIST_TAIL, "- weights", 0, "Use image weights in combination?", false);129 psMetadataAddBool(arguments, PS_LIST_TAIL, "-variances", 0, "Use image variances in combination?", false); 130 130 131 131 // XXX EAM : not clear this should be allowed on the command line. … … 272 272 VALUE_ARG_RECIPE_FLOAT("-frachigh", "FRACHIGH", F32); 273 273 VALUE_ARG_RECIPE_INT("-nkeep", "NKEEP", S32, 0); 274 VALUE_ARG_RECIPE_BOOL("- weights", "WEIGHTS");274 VALUE_ARG_RECIPE_BOOL("-variances", "VARIANCES"); 275 275 276 276 // XXX we do not supply this on the command line -
branches/pap_branch_20090128/ppMerge/src/ppMergeCamera.c
r18967 r21219 82 82 { 83 83 bool haveMasks = false; // Do we have masks? 84 bool have Weights = false; // Do we have weightmaps?84 bool haveVariances = false; // Do we have variance maps? 85 85 86 86 ppMergeType type = psMetadataLookupS32(NULL, config->arguments, "TYPE"); // Type of frame … … 108 108 bool mdok; 109 109 psString mask = psMetadataLookupStr(&mdok, input, "MASK"); // Name of mask 110 psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); // Name of weightmap110 psString variance = psMetadataLookupStr(&mdok, input, "VARIANCE"); // Name of variance map 111 111 112 112 // Add the image file … … 150 150 } 151 151 152 // Optionally add the weightfile153 if ( weight && strlen(weight) > 0) {154 have Weights = true;155 psArray * weightFiles = psArrayAlloc(1); // Array of filenames for this FPA156 weightFiles->data[0] = psMemIncrRefCounter(weight);157 psMetadataAddArray(config->arguments, PS_LIST_TAIL, " WEIGHT.FILENAMES", PS_META_REPLACE,158 "Filenames of weight files", weightFiles);159 psFree( weightFiles);152 // Optionally add the variance file 153 if (variance && strlen(variance) > 0) { 154 haveVariances = true; 155 psArray *varianceFiles = psArrayAlloc(1); // Array of filenames for this FPA 156 varianceFiles->data[0] = psMemIncrRefCounter(variance); 157 psMetadataAddArray(config->arguments, PS_LIST_TAIL, "VARIANCE.FILENAMES", PS_META_REPLACE, 158 "Filenames of variance files", varianceFiles); 159 psFree(varianceFiles); 160 160 161 161 bool status; 162 pmFPAfile * weightFile = pmFPAfileBindFromArgs(&status, imageFile, config, "PPMERGE.INPUT.WEIGHT",163 "WEIGHT.FILENAMES");162 pmFPAfile *varianceFile = pmFPAfileBindFromArgs(&status, imageFile, config, 163 "PPMERGE.INPUT.VARIANCE", "VARIANCE.FILENAMES"); 164 164 if (!status) { 165 psError(PS_ERR_UNKNOWN, false, "Unable to define file from weight %d (%s)", numFiles, weight); 166 return false; 167 } 168 if (weightFile->type != PM_FPA_FILE_WEIGHT) { 169 psError(PS_ERR_IO, true, "PPMERGE.INPUT.WEIGHT is not of type WEIGHT"); 170 return false; 171 } 172 haveWeights = true; 165 psError(PS_ERR_UNKNOWN, false, "Unable to define file from variance %d (%s)", 166 numFiles, variance); 167 return false; 168 } 169 if (varianceFile->type != PM_FPA_FILE_VARIANCE) { 170 psError(PS_ERR_IO, true, "PPMERGE.INPUT.VARIANCE is not of type VARIANCE"); 171 return false; 172 } 173 haveVariances = true; 173 174 } 174 175 … … 180 181 psMetadataRemoveKey(config->arguments, "MASK.FILENAMES"); 181 182 } 182 if (psMetadataLookup(config->arguments, " WEIGHT.FILENAMES")) {183 psMetadataRemoveKey(config->arguments, " WEIGHT.FILENAMES");183 if (psMetadataLookup(config->arguments, "VARIANCE.FILENAMES")) { 184 psMetadataRemoveKey(config->arguments, "VARIANCE.FILENAMES"); 184 185 } 185 186 if (psMetadataLookup(config->arguments, "PSF.FILENAMES")) { … … 189 190 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "INPUTS.NUM", 0, "Number of input files", numFiles); 190 191 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "INPUTS.MASKS", 0, "Got input masks?", haveMasks); 191 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "INPUTS. WEIGHTS", 0,192 "Got input weights?", haveWeights);192 psMetadataAddBool(config->arguments, PS_LIST_TAIL, "INPUTS.VARIANCES", 0, 193 "Got input variances?", haveVariances); 193 194 194 195 -
branches/pap_branch_20090128/ppMerge/src/ppMergeFiles.c
r20887 r21219 1 1 #include "ppMerge.h" 2 2 3 const char *allFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT. WEIGHT",3 const char *allFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.VARIANCE", 4 4 "PPMERGE.OUTPUT", "PPMERGE.OUTPUT.COUNT", "PPMERGE.OUTPUT.SIGMA", 5 5 NULL }; // All files 6 const char *inputFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT. WEIGHT",6 const char *inputFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.VARIANCE", 7 7 NULL }; // Input files 8 8 const char *outputFiles[] = { "PPMERGE.OUTPUT", "PPMERGE.OUTPUT.COUNT", "PPMERGE.OUTPUT.SIGMA", … … 37 37 } 38 38 } 39 if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS. WEIGHTS")) {40 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT. WEIGHT", num);41 if (!pmReadoutReadChunk Weight(readout, file->fits, 0, rows, 0, config)) {42 psError(PS_ERR_UNKNOWN, false, "Unable to read readout weight.");39 if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES")) { 40 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.VARIANCE", num); 41 if (!pmReadoutReadChunkVariance(readout, file->fits, 0, rows, 0, config)) { 42 psError(PS_ERR_UNKNOWN, false, "Unable to read readout variance."); 43 43 return false; 44 44 } … … 77 77 psFree(fileView); 78 78 } 79 if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS")) { 80 pmFPAfile *weight = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.WEIGHT", num); // Weight file 81 pmFPAview *fileView = pmFPAviewForLevel(weight->fileLevel, view); 82 if (!pmFPAfileOpen(weight, fileView, config)) { 83 psError(PS_ERR_UNKNOWN, false, "Unable to open weight file %d", num); 79 if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES")) { 80 pmFPAfile *variance = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.VARIANCE", 81 num); // Variance file 82 pmFPAview *fileView = pmFPAviewForLevel(variance->fileLevel, view); 83 if (!pmFPAfileOpen(variance, fileView, config)) { 84 psError(PS_ERR_UNKNOWN, false, "Unable to open variance file %d", num); 84 85 psFree(fileView); 85 86 return false; … … 113 114 bool mdok; // Status of MD lookup 114 115 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks? 115 bool have Weights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS"); // Got weights?116 bool haveVariances = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES"); // Got variances? 116 117 117 118 const char **fileList = selectFiles(files); // Files to activate … … 120 121 continue; 121 122 } 122 if (!have Weights && strcmp(fileList[i], "PPMERGE.INPUT.WEIGHT") == 0) {123 if (!haveVariances && strcmp(fileList[i], "PPMERGE.INPUT.VARIANCE") == 0) { 123 124 continue; 124 125 } … … 149 150 bool mdok; // Status of MD lookup 150 151 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks? 151 bool have Weights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS"); // Got weights?152 bool haveVariances = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES"); // Got variances? 152 153 153 154 psList *list = psListAlloc(NULL); // List of files … … 157 158 continue; 158 159 } 159 if (!have Weights && strcmp(fileList[i], "PPMERGE.INPUT.WEIGHT") == 0) {160 if (!haveVariances && strcmp(fileList[i], "PPMERGE.INPUT.VARIANCE") == 0) { 160 161 continue; 161 162 } -
branches/pap_branch_20090128/ppMerge/src/ppMergeLoop_Threaded.c
r19081 r21219 24 24 bool mdok; // Status of MD lookup 25 25 bool haveMasks = psMetadataLookupBool(&mdok, arguments, "INPUTS.MASKS"); // Do we have masks? 26 bool have Weights = psMetadataLookupBool(&mdok, arguments, "INPUTS.WEIGHTS"); // Do we have weights?26 bool haveVariances = psMetadataLookupBool(&mdok, arguments, "INPUTS.VARIANCES"); // Do we have variances? 27 27 28 28 psArray *inputs = ppMergeFileDataLevel(config, "PPMERGE.INPUT", PM_FPA_LEVEL_READOUT); // Input images 29 psArray *masks = NULL, * weights = NULL; // Input masks and weights29 psArray *masks = NULL, *variances = NULL; // Input masks and variances 30 30 if (haveMasks) { 31 31 masks = ppMergeFileDataLevel(config, "PPMERGE.INPUT.MASK", PM_FPA_LEVEL_READOUT); 32 32 } 33 if (have Weights) {34 weights = ppMergeFileDataLevel(config, "PPMERGE.INPUT.WEIGHT", PM_FPA_LEVEL_READOUT);33 if (haveVariances) { 34 variances = ppMergeFileDataLevel(config, "PPMERGE.INPUT.VARIANCE", PM_FPA_LEVEL_READOUT); 35 35 } 36 36 … … 45 45 int nKeep = psMetadataLookupS32(NULL, arguments, "NKEEP"); // Minimum number of values to keep 46 46 psStatsOptions combineStat = psMetadataLookupS32(NULL, arguments, "COMBINE"); // Combination statistic 47 bool use Weights = psMetadataLookupBool(NULL, arguments, "WEIGHTS"); // Use weights?47 bool useVariances = psMetadataLookupBool(NULL, arguments, "VARIANCES"); // Use variances? 48 48 49 49 // Fringe parameters … … 54 54 55 55 // set the mask and mark bit values based on the named masks 56 psMaskType maskVal; 57 psMaskType markVal; 56 psImageMaskType maskVal, markVal; 58 57 if (!pmConfigMaskSetBits (&maskVal, &markVal, config)) { 59 58 psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values"); … … 69 68 combination->iter = iter; 70 69 combination->rej = rej; 71 combination-> weights = useWeights;70 combination->variances = useVariances; 72 71 73 72 psMetadata *stats = NULL; // Statistics for output … … 421 420 psFree(inputs); 422 421 psFree(masks); 423 psFree( weights);422 psFree(variances); 424 423 psFree(stats); 425 424 return true; … … 430 429 psFree(inputs); 431 430 psFree(masks); 432 psFree( weights);431 psFree(variances); 433 432 psFree(stats); 434 433 return false; -
branches/pap_branch_20090128/ppMerge/src/ppMergeMask.c
r18756 r21219 26 26 float smoothScale = psMetadataLookupF32(&mdok, config->arguments, "MASK.SMOOTH.SCALE"); // Radius to grow mask 27 27 28 psMaskType markVal; 29 psMaskType maskValRaw; 30 if (!pmConfigMaskSetBits (&maskValRaw, &markVal, config)) { 31 psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values"); 32 return false; 28 psImageMaskType markVal, maskValRaw; 29 if (!pmConfigMaskSetBits(&maskValRaw, &markVal, config)) { 30 psError (PS_ERR_UNKNOWN, true, "Unable to define the mask bit values"); 31 return false; 33 32 } 34 33 … … 36 35 psMaskType maskValOut = pmConfigMaskGet (maskOutName, config); 37 36 if (!maskValOut) { 38 psError (PS_ERR_UNKNOWN, true, "Undefined output mask bit value");39 return false;40 } 41 37 psError (PS_ERR_UNKNOWN, true, "Undefined output mask bit value"); 38 return false; 39 } 40 42 41 psStats *statistics = psStatsAlloc(meanStat | stdevStat); // Statistics for background 43 42 … … 45 44 pmChip *outChip = pmFPAfileThisChip(config->files, view, outName); // Output chip 46 45 psFree(outName); 47 46 48 47 int numCells = 1; 49 48 if (chipStats) { 50 // count the number of active cells for this chip:51 numCells = 0;52 for (int i = 0; i < outChip->cells->n; i++) {53 pmCell *cell = outChip->cells->data[i];54 if (!cell->process) continue;55 numCells ++;56 }49 // count the number of active cells for this chip: 50 numCells = 0; 51 for (int i = 0; i < outChip->cells->n; i++) { 52 pmCell *cell = outChip->cells->data[i]; 53 if (!cell->process) continue; 54 numCells ++; 55 } 57 56 } 58 57 … … 73 72 while ((inCell = pmFPAviewNextCell(inView, inFPA, 1))) { 74 73 75 // the output FPA structure carries the information about which cells to process74 // the output FPA structure carries the information about which cells to process 76 75 pmCell *outCell = pmFPAfileThisCell(config->files, inView, "PPMERGE.OUTPUT.MASK"); // Output cell 77 if (!outCell->process) continue;76 if (!outCell->process) continue; 78 77 79 78 pmHDU *hdu = pmHDUFromCell(inCell); // HDU for cell … … 138 137 int y = pixel / numCols; 139 138 if (mask && (mask->data.PS_TYPE_MASK_DATA[y][x] & maskValRaw)) continue; 140 if (outMask && (outMask->data.PS_TYPE_MASK_DATA[y][x] & maskValOut)) continue;141 if (!isfinite(image->data.F32[y][x])) continue;139 if (outMask && (outMask->data.PS_TYPE_MASK_DATA[y][x] & maskValOut)) continue; 140 if (!isfinite(image->data.F32[y][x])) continue; 142 141 143 142 values->data.F32[valueIndex++] = image->data.F32[y][x]; … … 153 152 } 154 153 155 float mean = psStatsGetValue(statistics, meanStat);156 float stdev = psStatsGetValue(statistics, stdevStat);157 158 // this function increments the count for each suspect pixel in each input plane159 // maskValRaw is used to test for valid input pixels154 float mean = psStatsGetValue(statistics, meanStat); 155 float stdev = psStatsGetValue(statistics, stdevStat); 156 157 // this function increments the count for each suspect pixel in each input plane 158 // maskValRaw is used to test for valid input pixels 160 159 if (!pmMaskFlagSuspectPixels(outRO, readout, mean, stdev, maskSuspect, maskValRaw)) { 161 160 psError(PS_ERR_UNKNOWN, false, "Unable to find suspect values in file %d", i); … … 186 185 while ((inCell = pmFPAviewNextCell(inView, inFPA, 1))) { 187 186 188 // the output FPA structure carries the information about which cells to process189 pmCell *outCell = pmFPAfileThisCell(config->files, inView, "PPMERGE.OUTPUT.MASK"); // Output cell190 if (!outCell->process) continue;187 // the output FPA structure carries the information about which cells to process 188 pmCell *outCell = pmFPAfileThisCell(config->files, inView, "PPMERGE.OUTPUT.MASK"); // Output cell 189 if (!outCell->process) continue; 191 190 192 191 pmHDU *hdu = pmHDUFromCell(inCell); // HDU for cell … … 198 197 pmReadout *outRO = pmFPAfileThisReadout(config->files, inView, "PPMERGE.OUTPUT.MASK"); 199 198 200 float mean = psStatsGetValue(statistics, meanStat);201 float stdev = psStatsGetValue(statistics, stdevStat);202 203 if (!pmMaskFlagSuspectPixels(outRO, readout, mean, stdev, maskSuspect, maskValRaw)) {199 float mean = psStatsGetValue(statistics, meanStat); 200 float stdev = psStatsGetValue(statistics, stdevStat); 201 202 if (!pmMaskFlagSuspectPixels(outRO, readout, mean, stdev, maskSuspect, maskValRaw)) { 204 203 psError(PS_ERR_UNKNOWN, false, "Unable to find suspect values in file %d", i); 205 204 goto MERGE_MASK_ERROR; … … 231 230 while ((outCell = pmFPAviewNextCell(outView, outFPA, 1))) { 232 231 233 // skip inactive cells234 if (!outCell->process) continue;232 // skip inactive cells 233 if (!outCell->process) continue; 235 234 236 235 pmHDU *hdu = pmHDUFromCell(outCell); // HDU for cell … … 242 241 pmReadout *outRO = outCell->readouts->data[0]; // Output readout 243 242 244 if (smoothSuspect) {245 // XXX test output of suspect pixel image246 psImage *suspects = psMetadataLookupPtr(NULL, outRO->analysis, PM_MASK_ANALYSIS_SUSPECT); // Suspect img247 assert (suspects);248 psImageSmooth (suspects, smoothScale, 3); // extend smoothing region to 3-sigma249 }250 251 // set the bad pixels to the value 'maskVal'243 if (smoothSuspect) { 244 // XXX test output of suspect pixel image 245 psImage *suspects = psMetadataLookupPtr(NULL, outRO->analysis, PM_MASK_ANALYSIS_SUSPECT); // Suspect img 246 assert (suspects); 247 psImageSmooth (suspects, smoothScale, 3); // extend smoothing region to 3-sigma 248 } 249 250 // set the bad pixels to the value 'maskVal' 252 251 if (!pmMaskIdentifyBadPixels(outRO, maskValOut, maskBad, maskMode)) { 253 252 psError(PS_ERR_UNKNOWN, false, "Unable to mask bad pixels"); … … 343 342 int numFiles = psMetadataLookupS32(NULL, config->arguments, "INPUTS.NUM"); // Number of inputs 344 343 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks? 345 bool have Weights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS"); // Do we have weights?344 bool haveVariances = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES"); // Got variances? 346 345 int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); // Number of rejection iterations 347 346 … … 363 362 psFree(masks); 364 363 } 365 if (have Weights) {366 psArray * weights = ppMergeFileDataLevel(config, "PPMERGE.INPUT.WEIGHT", PM_FPA_LEVEL_READOUT);367 psFree( weights);364 if (haveVariances) { 365 psArray *variances = ppMergeFileDataLevel(config, "PPMERGE.INPUT.VARIANCE", PM_FPA_LEVEL_READOUT); 366 psFree(variances); 368 367 } 369 368 … … 405 404 } 406 405 407 if (outChip->data_exists) {408 psList *inChips = psListAlloc(NULL);409 for (int i=0; i < numFiles; i++) {410 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // Input file411 pmChip *chip = pmFPAviewThisChip(view, file->fpa);412 psListAdd(inChips, PS_LIST_TAIL, chip);413 }414 415 // XXX I need to call pmConfigMaskWriteHeader for the PHU somewhere, after it is created!416 417 if (!pmConceptsAverageChips(outChip, inChips, true)) {418 psError(PS_ERR_UNKNOWN, false, "Unable to average Chip concepts.");419 psFree(inChips);420 goto PPMERGE_MASK_ERROR;421 }422 psFree(inChips);423 }406 if (outChip->data_exists) { 407 psList *inChips = psListAlloc(NULL); 408 for (int i=0; i < numFiles; i++) { 409 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); // Input file 410 pmChip *chip = pmFPAviewThisChip(view, file->fpa); 411 psListAdd(inChips, PS_LIST_TAIL, chip); 412 } 413 414 // XXX I need to call pmConfigMaskWriteHeader for the PHU somewhere, after it is created! 415 416 if (!pmConceptsAverageChips(outChip, inChips, true)) { 417 psError(PS_ERR_UNKNOWN, false, "Unable to average Chip concepts."); 418 psFree(inChips); 419 goto PPMERGE_MASK_ERROR; 420 } 421 psFree(inChips); 422 } 424 423 if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) { 425 424 goto PPMERGE_MASK_ERROR; -
branches/pap_branch_20090128/ppMerge/src/ppMergeReadChunk.c
r19014 r21219 9 9 bool mdok; 10 10 bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks? 11 bool haveWeights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS");// Do we have weights? 11 bool haveVariances = psMetadataLookupBool(&mdok, config->arguments, 12 "INPUTS.VARIANCES");// Do we have variances? 12 13 int rows = psMetadataLookupS32(NULL, config->arguments, "ROWS"); // Number of rows to read per chunk 13 14 … … 40 41 // override the recorded last scan 41 42 inRO->thisImageScan = fileGroup->firstScan; 42 inRO->this WeightScan = fileGroup->firstScan;43 inRO->thisVarianceScan = fileGroup->firstScan; 43 44 inRO->thisMaskScan = fileGroup->firstScan; 44 45 inRO->forceScan = true; … … 69 70 } 70 71 71 if (have Weights && pmReadoutMoreWeight(inRO, file->fits, 0, rows, config)) {72 if (haveVariances && pmReadoutMoreVariance(inRO, file->fits, 0, rows, config)) { 72 73 keepReading = true; 73 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.WEIGHT", i); 74 if (!pmReadoutReadChunkWeight(inRO, file->fits, 0, rows, 0, config)) { 75 psError(PS_ERR_IO, false, "Unable to read chunk %d for file PPMERGE.INPUT.WEIGHT %d", 74 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.VARIANCE", i); 75 if (!pmReadoutReadChunkVariance(inRO, file->fits, 0, rows, 0, config)) { 76 psError(PS_ERR_IO, false, 77 "Unable to read chunk %d for file PPMERGE.INPUT.VARIANCE %d", 76 78 numChunk, i); 77 79 *status = false; -
branches/pap_branch_20090128/ppMerge/src/ppMergeScaleZero.c
r18930 r21219 43 43 pmFPAfileActivate(config->files, false, NULL); 44 44 psArray *files = ppMergeFileActivateSingle(config, PPMERGE_FILES_INPUT, true, i); // Activated files 45 pmFPAfile *input = files->data[0]; // Representative file; should be the image (not mask or weight)45 pmFPAfile *input = files->data[0]; // Representative file; should be the image (not mask or variance) 46 46 pmFPA *fpa = input->fpa; // FPA of interest 47 47 view = pmFPAviewAlloc(0); // View to component of interest
Note:
See TracChangeset
for help on using the changeset viewer.
