Changeset 25027 for branches/pap/psModules/src/objects/pmSourceUtils.c
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/psModules
- Property svn:mergeinfo deleted
-
branches/pap/psModules/src/objects/pmSourceUtils.c
r23187 r25027 94 94 source->peak = pmPeakAlloc (xChip, yChip, Io, PM_PEAK_LONE); 95 95 96 int x0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0"); 97 int y0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0"); 98 int xParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY"); 99 int yParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY"); 96 float xReadout, yReadout; 100 97 101 // XXX fix the binning : currently not selected from concepts 102 // int xBin = psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN"); // Binning in x and y 103 // int yBin = psMetadataLookupS32(NULL, cell->concepts, "CELL.YBIN"); // Binning in x and y 104 int xBin = 1; 105 int yBin = 1; 98 // if we have information about the chip & cell, adjust the coordinates chip->cell->readout 99 // otherwise, assume 0,0 offset and 1,1 parity 100 if (cell) { 101 int x0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0"); 102 int y0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0"); 103 int xParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY"); 104 int yParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY"); 106 105 107 // Position on the cell 108 float xCell = PM_CHIP_TO_CELL(xChip, x0Cell, xParityCell, xBin); 109 float yCell = PM_CHIP_TO_CELL(yChip, y0Cell, yParityCell, yBin); 106 // XXX fix the binning : currently not selected from concepts 107 // int xBin = psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN"); // Binning in x and y 108 // int yBin = psMetadataLookupS32(NULL, cell->concepts, "CELL.YBIN"); // Binning in x and y 109 int xBin = 1; 110 int yBin = 1; 110 111 111 // Position on the readout 112 // float xReadout = CELL_TO_READOUT(xCell, x0Readout); 113 // float yReadout = CELL_TO_READOUT(yCell, y0Readout); 112 // Position on the cell 113 float xCell = PM_CHIP_TO_CELL(xChip, x0Cell, xParityCell, xBin); 114 float yCell = PM_CHIP_TO_CELL(yChip, y0Cell, yParityCell, yBin); 115 116 // Position on the readout 117 // float xReadout = CELL_TO_READOUT(xCell, x0Readout); 118 // float yReadout = CELL_TO_READOUT(yCell, y0Readout); 119 xReadout = xCell; 120 yReadout = yCell; 121 } else { 122 xReadout = xChip; 123 yReadout = yChip; 124 } 114 125 115 pmSourceDefinePixels (source, readout, x Cell, yCell, radius);126 pmSourceDefinePixels (source, readout, xReadout, yReadout, radius); 116 127 117 128 return (source);
Note:
See TracChangeset
for help on using the changeset viewer.
