217 if (rc.first.size()==0)
223 const vector<float> &avg = rc.first;
224 const vector<float> &rms = rc.second;
239 cal_data() { memset(
this, 0,
sizeof(cal_data)); }
285 prms[
i] = rms[
i]*1e6;
296 fCalibR8.resize(BIAS::kNumChannels);
311 const int len = end-beg+1;
313 for (
int j=beg; j<=
end; j++)
315 const double Idac = (256+512*j)*1e-3/4096;
323 const double m1 = xy - x*y / len;
324 const double m2 = xx - x*x / len;
326 const double m = m2==0 ? 0 : m1/m2;
328 const double t = (y - m*x) / len;
335 v.reserve(BIAS::kNumChannels*2);
344 Info(
"Calibration successfully done.");
DimDescribedState fDimBias
int GetCurrentState() const
return the current state of the machine
DimDescribedService fDimCalibration2
DimDescribedService fDimCalibration
const int32_t & state() const
vector< int64_t > fCurrentsAvg
vector< float > fCalibDeltaI
pair< vector< float >, vector< float > > AverageCurrents(const int16_t *ptr, int n)
uint16_t fNumCalibRequests
vector< uint16_t > fBiasDac
void setData(const void *ptr, size_t sz)
vector< int64_t > fCurrentsRms
void SendCommandNB(const std::string &command)
vector< float > fCalibration
vector< float > fCalibVoltage[6]
int Info(const std::string &str)
vector< float > fCalibCurrentMes[6]
vector< float > fBiasVolt
DimDescribedService fDimCalibrationR8
const T * Ptr(size_t offset=0) const