Changeset 41861 for branches/eam_branches/ipp-dev-20210817
- Timestamp:
- Oct 25, 2021, 5:04:15 PM (5 years ago)
- Location:
- branches/eam_branches/ipp-dev-20210817/psModules/src/detrend
- Files:
-
- 2 edited
-
pmPattern.c (modified) (5 diffs)
-
pmPatternIO.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-dev-20210817/psModules/src/detrend/pmPattern.c
r41859 r41861 418 418 for (int x = 0; x < numCols; x++) { 419 419 image->data.F32[y][x] += solution->data.F32[y]; 420 psTrace("pattern",5,"B: %d %d %g\n",x,y,solution->data.F32[ x]);420 psTrace("pattern",5,"B: %d %d %g\n",x,y,solution->data.F32[y]); 421 421 } 422 422 corr->data.F64[y][0] -= solution->data.F32[y]; … … 444 444 for (int x = 0; x < numCols; x++) { 445 445 image->data.F32[y][x] += solution->data.F32[y] * indices->data.F32[x]; 446 psTrace("pattern",5,"C: %d %d %g %g\n",x,y,solution->data.F32[x],indices->data.F32[x]); 446 // XXX EAM : this was [x] which is wrong 447 psTrace("pattern",5,"C: %d %d %g %g\n",x,y,solution->data.F32[y],indices->data.F32[x]); 447 448 } 448 449 corr->data.F64[y][1] -= solution->data.F32[y] ; … … 703 704 } 704 705 706 psAssert (solution->n == numCols, "oops"); 705 707 for (int x = 0; x < numCols; x++) { 706 708 image->data.F32[y][x] -= solution->data.F32[x]; … … 747 749 } 748 750 } else { 751 psAssert (solution->n == numRows, "oops"); 749 752 for (int y = 0; y < numRows; y++) { 750 753 for (int x = 0; x < numCols; x++) { 751 754 image->data.F32[y][x] += solution->data.F32[y]; 752 psTrace("pattern",5,"B: %d %d %g\n",x,y,solution->data.F32[x]); 755 // XXX EAM : this was [x], which is wrong 756 psTrace("pattern",5,"B: %d %d %g\n",x,y,solution->data.F32[y]); 753 757 } 754 758 corr->data.F64[y][0] -= solution->data.F32[y]; … … 771 775 psErrorClear(); 772 776 } else { 777 psAssert (solution->n == numRows, "oops"); 773 778 for (int y = 0; y < numRows; y++) { 774 779 for (int x = 0; x < numCols; x++) { 775 780 image->data.F32[y][x] += solution->data.F32[y] * indices->data.F32[x]; 776 psTrace("pattern",5,"C: %d %d %g %g\n",x,y,solution->data.F32[x],indices->data.F32[x]); 781 // XXX EAM : this was set to [x] which is wrong (numCols > numRows) 782 psTrace("pattern",5,"C: %d %d %g %g\n",x,y,solution->data.F32[y],indices->data.F32[x]); 777 783 } 778 784 corr->data.F64[y][1] -= solution->data.F32[y] ; -
branches/eam_branches/ipp-dev-20210817/psModules/src/detrend/pmPatternIO.c
r41856 r41861 531 531 for (int i = 0; i < model->n; i++) { 532 532 psMetadata *row = model->data[i]; 533 psAssert (row, "missing model row"); 533 534 534 535 char *cellName = psMetadataLookupStr(&status, row, "CELL_NAME"); … … 538 539 539 540 int cellNumber = pmChipFindCell (chip, cellName); 541 psAssert ((cellNumber >=0) && (cellNumber < chip->cells->n), "invalid cell number"); 542 540 543 pmCell *cell = chip->cells->data[cellNumber]; 541 544 if (!cell) continue; 545 546 psAssert (cell->analysis, "oops"); 542 547 543 548 psMetadataAddF32 (cell->analysis, PS_LIST_TAIL, "PTN.ROW.AMP", PS_META_REPLACE, "", amplitude);
Note:
See TracChangeset
for help on using the changeset viewer.
