Changeset 13456
- Timestamp:
- 04/26/12 11:03:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/feedback.cc
r13454 r13456 237 237 238 238 // Average measured current 239 const double Im = double(fCurrentsAvg[i])/fCursorCur ; // [dac]239 const double Im = double(fCurrentsAvg[i])/fCursorCur * conv; // [A] 240 240 241 241 // Group index (0 or 1) of the of the pixel (4 or 5 pixel patch) … … 258 258 // Offset at the calibration point (make sure that the calibration is 259 259 // valid (Im[i]>Iavg[i]) and we operate above the calibration point) 260 const double I = Im>Iavg[i] ? (Im - Iavg[i])*conv: 0; // [A]260 const double I = Im>Iavg[i] ? Im - Iavg[i]*1e-6 : 0; // [A] 261 261 262 262 // Make sure that the averaged resistor is valid … … 373 373 float *res = fCalibration.data()+BIAS::kNumChannels*2; 374 374 375 const double conv = 5000./4096; 376 375 377 for (int i=0; i<BIAS::kNumChannels; i++) 376 378 { 377 379 const double I = double(fCurrentsAvg[i])/fCursorCur; 378 380 379 res[i] = fVoltGapd[i]/I * 4096/5000e-6;380 avg[i] = I;381 rms[i] = sqrt(double(fCurrentsRms[i])/fCursorCur-I*I);381 res[i] = fVoltGapd[i]/I / conv * 1e6; 382 avg[i] = conv * I; 383 rms[i] = conv * sqrt(double(fCurrentsRms[i])/fCursorCur-I*I); 382 384 } 383 385 … … 1218 1220 fDimCalibration("FEEDBACK/CALIBRATION", "F:416;F:416;F:416", 1219 1221 "Current offsets" 1220 "|Avg[ dac]:Average offset (5000uA/4096dac)"1221 "|Rms[ dac]:Rms of offset (5000uA/4096dac)"1222 "|Avg[uA]:Average offset" 1223 "|Rms[uA]:Rms of offset" 1222 1224 "|R[Ohm]:Measured calibration resistor"), 1223 1225 fSP(BIAS::kNumChannels),
Note:
See TracChangeset
for help on using the changeset viewer.