44 #include "../network/networknode.h"
45 #include "../network/networkedge.h"
46 #include "../network/network.h"
47 #include "../connectivitysettings.h"
54 #include <QtConcurrent>
60 #include <unsupported/Eigen/FFT>
66 using namespace CONNECTIVITYLIB;
67 using namespace Eigen;
87 if(connectivitySettings.isEmpty()) {
88 qDebug() <<
"Coherence::calculate - Input data is empty";
92 if(AbstractMetric::m_bStorageModeIsActive ==
false) {
93 connectivitySettings.clearIntermediateData();
99 int iNfft = connectivitySettings.getFFTSize();
100 int iNFreqs = int(floor(iNfft / 2.0)) + 1;
102 if(m_iNumberBinStart == -1 ||
103 m_iNumberBinAmount == -1 ||
104 m_iNumberBinStart > iNFreqs ||
105 m_iNumberBinAmount > iNFreqs ||
106 m_iNumberBinAmount + m_iNumberBinStart > iNFreqs) {
107 qDebug() <<
"Coherence::calculate - Resetting to full spectrum";
108 AbstractMetric::m_iNumberBinStart = 0;
109 AbstractMetric::m_iNumberBinAmount = iNFreqs;
117 int rows = connectivitySettings.at(0).matData.rows();
118 RowVectorXf rowVert = RowVectorXf::Zero(3);
120 for(
int i = 0; i < rows; ++i) {
121 rowVert = RowVectorXf::Zero(3);
123 if(connectivitySettings.getNodePositions().rows() != 0 && i < connectivitySettings.getNodePositions().rows()) {
124 rowVert(0) = connectivitySettings.getNodePositions().row(i)(0);
125 rowVert(1) = connectivitySettings.getNodePositions().row(i)(1);
126 rowVert(2) = connectivitySettings.getNodePositions().row(i)(2);
134 connectivitySettings);;