81 Eigen::VectorXf col_cals(this->
data->ncol);
82 Eigen::VectorXf row_cals(this->
data->nrow);
89 for (j = 0; j < this->
data->nrow; j++) {
90 name = this->
data->rowlist[j];
92 for (p = 0; p < nch; p++)
93 if (QString::compare(name, chs[p].ch_name) == 0) {
94 row_cals[j] = chs[p].range * chs[p].cal;
99 qCritical(
"Channel %s not found. Cannot calibrate the compensation matrix.", name.toUtf8().constData());
103 for (k = 0; k < this->
data->ncol; k++) {
104 name = this->
data->collist[k];
106 for (p = 0; p < nch; p++)
107 if (QString::compare(name, chs[p].ch_name) == 0) {
108 col_cals[k] = chs[p].range * chs[p].cal;
113 qCritical(
"Channel %s not found. Cannot calibrate the compensation matrix.", name.toUtf8().constData());
118 for (j = 0; j < this->
data->nrow; j++)
119 for (k = 0; k < this->
data->ncol; k++)
120 this->
data->data(j, k) = row_cals[j] * this->
data->data(j, k) / col_cals[k];
122 for (j = 0; j < this->
data->nrow; j++)
123 for (k = 0; k < this->
data->ncol; k++)
124 this->
data->data(j, k) = col_cals[k] * this->
data->data(j, k) / row_cals[j];