53 #include <QSharedDataPointer>
54 #include <QSharedPointer>
56 #include <QStringList>
80 typedef QSharedPointer<FiffCov>
SPtr;
82 typedef QSharedDataPointer<FiffCov>
SDPtr;
124 inline bool isEmpty()
const;
137 FiffCov pick_channels(
const QStringList &p_include = defaultQStringList,
const QStringList &p_exclude = defaultQStringList);
148 FiffCov prepare_noise_cov(
const FiffInfo& p_info,
const QStringList& p_chNames)
const;
166 FiffCov regularize(
const FiffInfo& p_info,
double p_fMag = 0.1,
double p_fGrad = 0.1,
double p_fEeg = 0.1,
bool p_bProj =
true, QStringList p_exclude = defaultQStringList)
const;
191 Eigen::VectorXi chClass;
232 return this->
dim <= -1;
239 bool t_bIsShort =
true;
240 out <<
"#### Fiff Covariance ####\n";
241 out <<
"\tKind: " << p_FiffCov.
kind << std::endl;
242 out <<
"\tdiag: " << p_FiffCov.
diag << std::endl;
243 out <<
"\tdim: " << p_FiffCov.
dim << std::endl;
244 out <<
"\tnames " << p_FiffCov.
names.size() <<
":\n\t";
248 qint32 nchan = p_FiffCov.
names.size() > 6 ? 6 : p_FiffCov.
names.size();
249 for(qint32 i = 0; i < nchan/2; ++i)
250 out << p_FiffCov.
names[i].toUtf8().constData() <<
" ";
252 for(qint32 i = p_FiffCov.
names.size() - nchan/2; i < p_FiffCov.
names.size(); ++i)
253 out << p_FiffCov.
names[i].toUtf8().constData() <<
" ";
257 out <<
"\tdata " << p_FiffCov.
data.rows() <<
" x " << p_FiffCov.
data.cols() <<
":\n\t";
260 qint32 nrows = p_FiffCov.
data.rows() > 6 ? 6 : p_FiffCov.
data.rows();
261 qint32 ncols = p_FiffCov.
data.cols() > 6 ? 6 : p_FiffCov.
data.cols();
262 for(qint32 i = 0; i < nrows/2; ++i)
264 for(qint32 j = 0; j < ncols/2; ++j)
265 out << p_FiffCov.
data(i,j) <<
" ";
267 for(qint32 j = p_FiffCov.
data.cols() - ncols/2; j < p_FiffCov.
data.cols(); ++j)
268 out << p_FiffCov.
data(i,j) <<
" ";
272 for(qint32 i = p_FiffCov.
data.rows()-nrows/2; i < p_FiffCov.
data.rows(); ++i)
274 for(qint32 j = 0; j < ncols/2; ++j)
275 out << p_FiffCov.
data(i,j) <<
" ";
277 for(qint32 j = p_FiffCov.
data.cols() - ncols/2; j < p_FiffCov.
data.cols(); ++j)
278 out << p_FiffCov.
data(i,j) <<
" ";
284 out <<
"\tprojectors " << p_FiffCov.
projs.size() <<
":\n";
285 for(qint32 i = 0; i < p_FiffCov.
projs.size(); ++i)
286 out <<
"\t" << p_FiffCov.
projs[i];
289 out <<
"\tbads " << p_FiffCov.
bads.size() <<
":\n\t";
290 for(qint32 i = 0; i < p_FiffCov.
bads.size(); ++i)
291 out << p_FiffCov.
bads[i].toUtf8().constData() <<
" ";
293 out <<
"\n\tfree: " << p_FiffCov.
nfree << std::endl;
295 out <<
"\teig " << p_FiffCov.
eig.size() <<
":\n\t";
298 qint32 nrows = p_FiffCov.
eig.size() > 6 ? 6 : p_FiffCov.
eig.size();
299 for(qint32 i = 0; i < nrows/2; ++i)
300 out << p_FiffCov.
eig[i] <<
" ";
302 for(qint32 i = p_FiffCov.
eig.size() - nrows/2; i < p_FiffCov.
eig.size(); ++i)
303 out << p_FiffCov.
eig[i] <<
" ";
307 out <<
"\n\teigvec " << p_FiffCov.
eigvec.rows() <<
" x " << p_FiffCov.
eigvec.cols() <<
":\n\t";
310 qint32 nrows = p_FiffCov.
eigvec.rows() > 6 ? 6 : p_FiffCov.
eigvec.rows();
311 qint32 ncols = p_FiffCov.
eigvec.cols() > 6 ? 6 : p_FiffCov.
eigvec.cols();
312 for(qint32 i = 0; i < nrows/2; ++i)
314 for(qint32 j = 0; j < ncols/2; ++j)
315 out << p_FiffCov.
eigvec(i,j) <<
" ";
317 for(qint32 j = p_FiffCov.
eigvec.cols() - ncols/2; j < p_FiffCov.
eigvec.cols(); ++j)
318 out << p_FiffCov.
eigvec(i,j) <<
" ";
322 for(qint32 i = p_FiffCov.
eigvec.rows() - nrows/2; i < p_FiffCov.
eigvec.rows(); ++i)
324 for(qint32 j = 0; j < ncols/2; ++j)
325 out << p_FiffCov.
eigvec(i,j) <<
" ";
327 for(qint32 j = p_FiffCov.
eigvec.cols() - ncols/2; j < p_FiffCov.
eigvec.cols(); ++j)
328 out << p_FiffCov.
eigvec(i,j) <<
" ";
337 #ifndef metatype_fiffcovsptr
338 #define metatype_fiffcovsptr
342 #ifndef metatype_fiffcov
343 #define metatype_fiffcov