119 Eigen::VectorXf col_cals(this->
data->ncol);
120 Eigen::VectorXf row_cals(this->
data->nrow);
127 for (j = 0; j < this->
data->nrow; j++) {
128 name = this->
data->rowlist[j];
130 for (p = 0; p < nch; p++)
131 if (QString::compare(name,chs[p].ch_name) == 0) {
132 row_cals[j] = chs[p].range*chs[p].cal;
137 printf(
"Channel %s not found. Cannot calibrate the compensation matrix.",name.toUtf8().constData());
141 for (k = 0; k < this->
data->ncol; k++) {
142 name = this->
data->collist[k];
144 for (p = 0; p < nch; p++)
145 if (QString::compare(name,chs[p].ch_name) == 0) {
146 col_cals[k] = chs[p].range*chs[p].cal;
151 printf(
"Channel %s not found. Cannot calibrate the compensation matrix.",name.toUtf8().constData());
156 for (j = 0; j < this->
data->nrow; j++)
157 for (k = 0; k < this->
data->ncol; k++)
158 this->
data->data(j, k) = row_cals[j]*this->
data->data(j, k)/col_cals[k];
161 for (j = 0; j < this->
data->nrow; j++)
162 for (k = 0; k < this->
data->ncol; k++)
163 this->
data->data(j, k) = col_cals[k]*this->
data->data(j, k)/row_cals[j];