- Timestamp:
- Aug 19, 2007, 3:58:16 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20070817/psModules/src/objects/pmSourceUtils.c
r14544 r14546 6 6 * @author EAM, IfA: significant modifications. 7 7 * 8 * @version $Revision: 1.1.2. 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-08- 17 21:01:59$8 * @version $Revision: 1.1.2.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-08-20 01:58:16 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 76 76 } 77 77 78 // XXX I don't yet know how this function should be defined 79 # if (0) 80 source->peak = pmPeakAlloc (); 78 pmCell *cell = readout->parent; 81 79 82 float x = model->params->data.F32[PM_PAR_XPOS]; 83 float y = model->params->data.F32[PM_PAR_YPOS]; 80 float Io = model->params->data.F32[PM_PAR_I0]; 81 float xChip = model->params->data.F32[PM_PAR_XPOS]; 82 float yChip = model->params->data.F32[PM_PAR_YPOS]; 84 83 85 // XXX need to define the radius in some rational way 86 // XXX x,y are defined wrt readout->image parent, but the model 87 // parameters are defined wrt chip coordinates 88 pmSourceDefinePixels (source, readout, x, y, radius); 89 # endif 84 source->peak = pmPeakAlloc (xChip, yChip, Io, PM_PEAK_LONE); 85 86 int x0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.X0"); 87 int y0Cell = psMetadataLookupS32(NULL, cell->concepts, "CELL.Y0"); 88 int xParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.XPARITY"); 89 int yParityCell = psMetadataLookupS32(NULL, cell->concepts, "CELL.YPARITY"); 90 91 // XXX whose binning? 92 int xBin = psMetadataLookupS32(NULL, cell->concepts, "CELL.XBIN"); // Binning in x and y 93 int yBin = psMetadataLookupS32(NULL, cell->concepts, "CELL.YBIN"); // Binning in x and y 94 95 // Position on the cell 96 float xCell = PM_CHIP_TO_CELL(xChip, x0Cell, xParityCell, xBin); 97 float yCell = PM_CHIP_TO_CELL(yChip, y0Cell, yParityCell, yBin); 98 99 // Position on the readout 100 // float xReadout = CELL_TO_READOUT(xCell, x0Readout); 101 // float yReadout = CELL_TO_READOUT(yCell, y0Readout); 102 103 float radius = 5.0; // XXX need to define the radius in some rational way 104 105 pmSourceDefinePixels (source, readout, xCell, yCell, radius); 90 106 91 107 return (source);
Note:
See TracChangeset
for help on using the changeset viewer.
