Changeset 6804 for branches/rel10_ifa/psModules/src/astrom/pmFPACopy.c
- Timestamp:
- Apr 5, 2006, 2:28:28 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmFPACopy.c
r6745 r6804 470 470 bool yFlip = (psMetadataLookupS32(NULL, target->concepts, "CELL.YPARITY") != 471 471 psMetadataLookupS32(NULL, source->concepts, "CELL.YPARITY")); // Switch parity in y? 472 psTrace(__func__, 3, "xFlip: %d; yFlip: %d\n", xFlip, yFlip); 472 473 473 474 bool mdok = true; // Status of MD lookup … … 535 536 psString name = conceptItem->name; // Name of concept 536 537 if (strcmp(name, "CELL.TRIMSEC") != 0 && strcmp(name, "CELL.BIASSEC") != 0 && 537 strcmp(name, "CELL.XPARITY") != 0 && strcmp(name, "CELL.YPARITY") != 0) { 538 strcmp(name, "CELL.XPARITY") != 0 && strcmp(name, "CELL.YPARITY") != 0 && 539 strcmp(name, "CELL.X0") != 0 && strcmp(name, "CELL.Y0") != 0) { 538 540 psMetadataAddItem(target->concepts, conceptItem, PS_LIST_TAIL, PS_META_REPLACE); 539 541 } … … 543 545 // Need to update CELL.X0 and CELL.Y0 if we flipped 544 546 if (xFlip) { 545 psMetadataItem *xZero = psMetadataLookup(target->concepts, "CELL.X0"); // CELL.X0 547 int xZero = psMetadataLookupS32(NULL, source->concepts, "CELL.X0"); // CELL.X0 from source 548 int xParity = psMetadataLookupS32(NULL, target->concepts, "CELL.XPARITY"); // Parity in x 546 549 pmReadout *readout = target->readouts->data[0]; // A representative readout 547 xZero->data.S32 -= readout->image->numCols - 1; 550 psTrace(__func__, 3, "CELL.X0: Before: %d After: %d\n", xZero, 551 xZero - (readout->image->numCols - 1) * xParity); 552 xZero -= (readout->image->numCols - 1) * xParity; // Change the parity on the X0 position 553 psMetadataItem *newItem = psMetadataLookup(target->concepts, "CELL.X0"); // CELL.X0 from target 554 newItem->data.S32 = xZero; 548 555 } 549 556 if (yFlip) { 550 psMetadataItem *yZero = psMetadataLookup(target->concepts, "CELL.Y0"); // CELL.Y0 557 int yZero = psMetadataLookupS32(NULL, source->concepts, "CELL.Y0"); // CELL.Y0 from source 558 int yParity = psMetadataLookupS32(NULL, target->concepts, "CELL.YPARITY"); // Parity in y 551 559 pmReadout *readout = target->readouts->data[0]; // A representative readout 552 yZero->data.S32 -= readout->image->numRows - 1; 560 psTrace(__func__, 3, "CELL.Y0: Before: %d After: %d\n", yZero, 561 yZero - (readout->image->numCols - 1) * yParity); 562 yZero -= (readout->image->numCols - 1) * yParity; // Change the parity on the Y0 position 563 psMetadataItem *newItem = psMetadataLookup(target->concepts, "CELL.Y0"); // CELL.Y0 from target 564 newItem->data.S32 = yZero; 553 565 } 554 566
Note:
See TracChangeset
for help on using the changeset viewer.
