Changeset 24651
- Timestamp:
- Jul 2, 2009, 3:41:59 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroFindChip.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroFindChip.c
r24572 r24651 110 110 } 111 111 112 // identify chips which land on this column (FP coords) 113 bool psastroFindChipInXrange (pmFPA *fpa, int nChip, double xFPA, double yFPA) { 114 115 if (!chipXmin || !chipXmax) { 116 psAbort ("chip bounds not set"); 117 } 118 119 if (xFPA < chipXmin->data.F32[nChip]) return false; 120 if (xFPA >= chipXmax->data.F32[nChip]) return false; 121 return true; 122 } 123 124 // identify chips which land on this row (FP coords) 125 bool psastroFindChipInYrange (pmFPA *fpa, int nChip, double xFPA, double yFPA) { 126 127 if (!chipYmin || !chipYmax) { 128 psAbort ("chip bounds not set"); 129 } 130 131 if (yFPA < chipYmin->data.F32[nChip]) return false; 132 if (yFPA >= chipYmax->data.F32[nChip]) return false; 133 return true; 134 } 135 136 // return the FPA coordinates of the Y edges of the chip 137 bool psastroFindChipYedges (double *yFPAs, double *yFPAe, pmFPA *fpa, int nChip) { 138 139 *yFPAs = chipYmin->data.F32[nChip]; 140 *yFPAe = chipYmax->data.F32[nChip]; 141 return true; 142 } 143 144 // return the FPA coordinates of the X edges of the chip 145 bool psastroFindChipXedges (double *yFPAs, double *yFPAe, pmFPA *fpa, int nChip) { 146 147 *yFPAs = chipXmin->data.F32[nChip]; 148 *yFPAe = chipXmax->data.F32[nChip]; 149 return true; 150 } 151 152 // convert FPA to Chip coordinates 153 bool psastroFPAtoChip (double *xChip, double *yChip, pmFPA *fpa, int nChip, double xFPA, double yFPA) { 154 155 pmChip *chip = fpa->chips->data[nChip]; 156 157 psPlane ptCH, ptFP; 158 ptFP.x = xFPA; 159 ptFP.y = yFPA; 160 psPlaneTransformApply (&ptCH, chip->fromFPA, &ptFP); 161 162 *xChip = ptCH.x; 163 *yChip = ptCH.y; 164 return true; 165 } 166 112 167 bool psastroExtractFreeChipBounds () { 113 168
Note:
See TracChangeset
for help on using the changeset viewer.
