- Timestamp:
- Jul 30, 2008, 6:05:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080719/ppMerge/src/ppMergeLoop_Threaded.c
r18759 r18815 36 36 37 37 // General combination parameters 38 int rows = psMetadataLookupS32(NULL, arguments, "ROWS"); // Number of rows to read per chunk39 38 int iter = psMetadataLookupS32(NULL, arguments, "ITER"); // Number of rejection iterations 40 39 float rej = psMetadataLookupF32(NULL, arguments, "REJ"); // Rejection level … … 175 174 fileGroup->read = false; 176 175 fileGroup->busy = false; 176 fileGroup->lastScan = 0; 177 fileGroup->firstScan = 0; 177 178 fileGroups->data[i] = fileGroup; 178 179 } 179 180 181 // call the init functions 182 switch (type) { 183 case PPMERGE_TYPE_BIAS: 184 case PPMERGE_TYPE_FLAT: 185 case PPMERGE_TYPE_FRINGE: 186 psAssert (fileGroups->n > 0, "no valid file groups defined"); 187 ppMergeFileGroup *fileGroup = fileGroups->data[0]; 188 if (!pmReadoutCombinePrepare(outRO, fileGroup->readouts, combination)) { 189 goto ERROR; 190 } 191 break; 192 193 default: 194 fprintf (stderr, "not yet ready"); 195 goto ERROR; 196 } 197 180 198 // Read input data by chunks 199 psTimerStart ("ppMergeLoop"); 181 200 for (int numChunk = 0; true; numChunk++) { 182 201 202 bool status = false; 183 203 ppMergeFileGroup *fileGroup = ppMergeReadChunk (&status, fileGroups, config, numChunk); 184 204 if (!status) goto ERROR; … … 194 214 psArrayAdd (job->args, 1, outRO); 195 215 psArrayAdd (job->args, 1, fileGroup); 196 psArrayAdd (job->args, 1, psScalarAlloc(shutterRef, PS_TYPE_F32)) 216 psArrayAdd (job->args, 1, psScalarAlloc(shutterRef, PS_TYPE_F32)); 197 217 psArrayAdd (job->args, 1, shutters->data[cellNum]); 198 218 psArrayAdd (job->args, 1, psScalarAlloc(iter, PS_TYPE_S32)); … … 272 292 } 273 293 } 294 psFree(fileGroups); 274 295 275 296 // Get list of cells for concepts averaging 276 297 psList *inCells = psListAlloc(NULL); // List of cells 277 298 for (int i = 0; i < numFiles; i++) { 278 pmReadout *readout = readouts->data[i]; // Readout of interest 279 psListAdd(inCells, PS_LIST_TAIL, readout->parent); 299 pmFPAfile *input = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT", i); 300 pmCell *inCell = pmFPAviewThisCell(view, input->fpa); // Input cell 301 psListAdd(inCells, PS_LIST_TAIL, inCell); 280 302 } 281 303 if (!pmConceptsAverageCells(outCell, inCells, NULL, NULL, true)) { … … 286 308 } 287 309 psFree(inCells); 288 289 psFree(fileGroups); 310 fprintf (stdout, "done ppMergeLoop for cell : %f\n", psTimerMark ("ppMergeLoop")); 290 311 291 312 // Plug supplementary images into their own FPAs
Note:
See TracChangeset
for help on using the changeset viewer.
