81 printf(
"Calculate evoked... ");
85 matAverage = MatrixXd::Zero(this->at(0)->epoch.rows(), this->at(0)->epoch.cols());
94 p_evoked.
nave = sel.size();
96 for(qint32 i = 0; i < sel.size(); ++i)
97 matAverage.array() += this->at(sel(i))->epoch.array();
101 p_evoked.
nave = this->size();
103 for(qint32 i = 0; i < this->size(); ++i)
104 matAverage.array() += this->at(i)->epoch.array();
106 matAverage.array() /= p_evoked.
nave;
108 printf(
"%d averages used [done]\n ", p_evoked.
nave);
114 p_evoked.
first = first;
115 p_evoked.
last = last;
117 RowVectorXf times = RowVectorXf(last-first+1);
118 for (qint32 k = 0; k < times.size(); ++k)
119 times[k] = ((
float)(first+k)) / info.
sfreq;
120 p_evoked.
times = times;
122 p_evoked.
comment = QString::number(this->at(0)->event);
124 p_evoked.
data = matAverage;
FIFF measurement file information.
MNEEpochDataList class declaration.
FiffEvoked average(FiffInfo &p_info, fiff_int_t first, fiff_int_t last, VectorXi sel=defaultVectorXi, bool proj=false)
#define FIFFV_ASPECT_STD_ERR
void setInfo(FiffInfo &p_info, bool proj=true)