v2.0.0
Loading...
Searching...
No Matches
inv_ecd.cpp
Go to the documentation of this file.
1//=============================================================================================================
16
17//=============================================================================================================
18// INCLUDES
19//=============================================================================================================
20
21#include "inv_ecd.h"
22
23//=============================================================================================================
24// USED NAMESPACES
25//=============================================================================================================
26
27using namespace Eigen;
28using namespace INVLIB;
29
30//=============================================================================================================
31// DEFINE MEMBER METHODS
32//=============================================================================================================
33
35: valid(false)
36, time(-1)
37, rd(Vector3f::Zero(3))
38, Q(Vector3f::Zero(3))
39, good(0)
40, khi2(0)
41, nfree(0)
42, neval(-1)
43{
44}
45
46//=============================================================================================================
47
49: valid(p_ECD.valid)
50, time(p_ECD.time)
51, rd(p_ECD.rd)
52, Q(p_ECD.Q)
53, good(p_ECD.good)
54, khi2(p_ECD.khi2)
55, nfree(p_ECD.nfree)
56, neval(p_ECD.neval)
57{
58}
59
60//=============================================================================================================
61
65
66//=============================================================================================================
67
68void InvEcd::print() const
69{
70 if (!this->valid)
71 return;
72
73 qInfo("%6.1f %7.2f %7.2f %7.2f %6.2f %6.2f %6.2f %6.2f %6.2f %6.2f %d",
74 1000*this->time, /* Time */
75 1000*this->rd[0], /* Dipole location */
76 1000*this->rd[1],
77 1000*this->rd[2],
78 1e9*this->Q.norm(), /* Dipole moment */
79 1e9*this->Q[0],1e9*this->Q[1],1e9*this->Q[2],
80 this->khi2/this->nfree, /* This is the reduced khi^2 value */
81 100*this->good, /* Goodness of fit */
82 this->neval); /* Number of function evaluations required */
83}
Single equivalent current dipole (ECD) with position, moment and per-fit goodness/χ² metrics.
Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).
Eigen::Vector3f Q
Definition inv_ecd.h:91
Eigen::Vector3f rd
Definition inv_ecd.h:90
void print() const
Definition inv_ecd.cpp:68