Collection of CTF third-order gradient compensation operators. More...
#include <mne_ctf_comp_data_set.h>
Public Types | |
| typedef QSharedPointer< MNECTFCompDataSet > | SPtr |
| typedef QSharedPointer< const MNECTFCompDataSet > | ConstSPtr |
Public Member Functions | |
| MNECTFCompDataSet () | |
| MNECTFCompDataSet (const MNECTFCompDataSet &set) | |
| ~MNECTFCompDataSet () | |
| int | make_comp (const QList< FIFFLIB::FiffChInfo > &chs, int nch, QList< FIFFLIB::FiffChInfo > compchs, int ncomp) |
| int | apply (int do_it, Eigen::VectorXf &data, const Eigen::VectorXf &compdata) |
| int | apply (int do_it, Eigen::VectorXf &data) |
| int | apply_transpose (int do_it, Eigen::MatrixXf &data) |
| int | set_compensation (int compensate_to, QList< FIFFLIB::FiffChInfo > &chs, int nchan, QList< FIFFLIB::FiffChInfo > comp_chs, int ncomp_chan) |
Static Public Member Functions | |
| static std::unique_ptr< MNECTFCompDataSet > | read (const QString &name) |
| static int | set_comp (QList< FIFFLIB::FiffChInfo > &chs, int nch, int comp) |
| static int | get_comp (const QList< FIFFLIB::FiffChInfo > &chs, int nch) |
| static int | map_comp_kind (int grad) |
| static QString | explain_comp (int kind) |
Public Attributes | |
| QList< MNECTFCompData * > | comps |
| int | ncomp |
| QList< FIFFLIB::FiffChInfo > | chs |
| int | nch |
| std::unique_ptr< MNECTFCompData > | undo |
| std::unique_ptr< MNECTFCompData > | current |
Collection of CTF third-order gradient compensation operators.
Stores all available compensation data sets read from a FIFF file together with the compiled current/undo operator pair used to switch between compensation grades at runtime.
Definition at line 89 of file mne_ctf_comp_data_set.h.
| typedef QSharedPointer<const MNECTFCompDataSet> MNELIB::MNECTFCompDataSet::ConstSPtr |
Const shared pointer type for MNECTFCompDataSet.
Definition at line 93 of file mne_ctf_comp_data_set.h.
| typedef QSharedPointer<MNECTFCompDataSet> MNELIB::MNECTFCompDataSet::SPtr |
Shared pointer type for MNECTFCompDataSet.
Definition at line 92 of file mne_ctf_comp_data_set.h.
| MNECTFCompDataSet::MNECTFCompDataSet | ( | ) |
Construct an empty compensation data set.
Definition at line 426 of file mne_ctf_comp_data_set.cpp.
| MNECTFCompDataSet::MNECTFCompDataSet | ( | const MNECTFCompDataSet & | set | ) |
Copy constructor. Deep-copies all compensation data and the current operator.
| [in] | set | The compensation data set to copy. |
Definition at line 436 of file mne_ctf_comp_data_set.cpp.
| MNECTFCompDataSet::~MNECTFCompDataSet | ( | ) |
Destructor.
Definition at line 451 of file mne_ctf_comp_data_set.cpp.
| int MNECTFCompDataSet::apply | ( | int | do_it, |
| Eigen::VectorXf & | data ) |
Overload: apply compensation using the data vector itself as compensation input.
| [in] | do_it | If TRUE, subtract compensated component; if FALSE, add it back. |
| [in,out] | data | Data vector to process (also used as compensation input). |
Definition at line 745 of file mne_ctf_comp_data_set.cpp.
| int MNECTFCompDataSet::apply | ( | int | do_it, |
| Eigen::VectorXf & | data, | ||
| const Eigen::VectorXf & | compdata ) |
Apply or revert CTF compensation on a single-sample data vector using the current compensation operator.
| [in] | do_it | If TRUE, subtract compensated component; if FALSE, add it back. |
| [in,out] | data | Data vector to process. |
| [in] | compdata | Compensation channel data (may equal data when omitted). |
Definition at line 752 of file mne_ctf_comp_data_set.cpp.
| int MNECTFCompDataSet::apply_transpose | ( | int | do_it, |
| Eigen::MatrixXf & | data ) |
Apply or revert CTF compensation across multiple time samples (channels x samples matrix), the transposed equivalent of apply().
| [in] | do_it | If TRUE, apply compensation; if FALSE, revert. |
| [in,out] | data | Channel-by-sample data matrix (rows = channels, cols = samples). |
Definition at line 840 of file mne_ctf_comp_data_set.cpp.
|
static |
Return a human-readable description string for a compensation kind constant.
| [in] | kind | Compensation kind constant. |
Definition at line 993 of file mne_ctf_comp_data_set.cpp.
|
static |
Extract the compensation grade from MEG channel coil types.
Definition at line 954 of file mne_ctf_comp_data_set.cpp.
| int MNECTFCompDataSet::make_comp | ( | const QList< FIFFLIB::FiffChInfo > & | chs, |
| int | nch, | ||
| QList< FIFFLIB::FiffChInfo > | compchs, | ||
| int | ncomp ) |
Build the current compensation operator for the given channel set by locating the matching compensation matrix and constructing pre/post-selection sparse matrices.
| [in] | chs | Channels to compensate (may include non-MEG channels). |
| [in] | nch | Number of channels. |
| [in] | compchs | Compensation input channels (may include non-reference channels). |
| [in] | ncomp | Number of compensation input channels. |
Definition at line 579 of file mne_ctf_comp_data_set.cpp.
|
static |
Map a gradient compensation integer code to the corresponding CTF compensation constant.
| [in] | grad | Simple integer order (0, 1, 2, 3, ...). |
Definition at line 978 of file mne_ctf_comp_data_set.cpp.
|
static |
Read all CTF compensation data sets (matrices and channel info) from a FIFF file, calibrate them, and return a populated set.
| [in] | name | Path to the FIFF file. |
Definition at line 461 of file mne_ctf_comp_data_set.cpp.
|
static |
Write the compensation grade into the upper 16 bits of coil_type for all MEG channels in the list.
| [in,out] | chs | Channel information list. |
| [in] | nch | Number of channels. |
| [in] | comp | Compensation grade to set. |
Definition at line 723 of file mne_ctf_comp_data_set.cpp.
| int MNECTFCompDataSet::set_compensation | ( | int | compensate_to, |
| QList< FIFFLIB::FiffChInfo > & | chs, | ||
| int | nchan, | ||
| QList< FIFFLIB::FiffChInfo > | comp_chs, | ||
| int | ncomp_chan ) |
Configure the full compensation pipeline: determine current compensation, build undo and target operators, and update channel coil types accordingly.
| [in] | compensate_to | Desired compensation grade. |
| [in,out] | chs | Channels to compensate (coil_type is updated). |
| [in] | nchan | Number of channels. |
| [in] | comp_chs | Compensation input channels. |
| [in] | ncomp_chan | Number of compensation input channels. |
Definition at line 1014 of file mne_ctf_comp_data_set.cpp.
| QList<FIFFLIB::FiffChInfo> MNELIB::MNECTFCompDataSet::chs |
Channel information associated with compensation.
Definition at line 254 of file mne_ctf_comp_data_set.h.
| QList<MNECTFCompData*> MNELIB::MNECTFCompDataSet::comps |
All available compensation data sets.
Definition at line 252 of file mne_ctf_comp_data_set.h.
| std::unique_ptr<MNECTFCompData> MNELIB::MNECTFCompDataSet::current |
Compiled compensation operator for the current target grade.
Definition at line 257 of file mne_ctf_comp_data_set.h.
| int MNELIB::MNECTFCompDataSet::nch |
Number of channels.
Definition at line 255 of file mne_ctf_comp_data_set.h.
| int MNELIB::MNECTFCompDataSet::ncomp |
Number of compensation data sets.
Definition at line 253 of file mne_ctf_comp_data_set.h.
| std::unique_ptr<MNECTFCompData> MNELIB::MNECTFCompDataSet::undo |
Compensation data to undo the current state.
Definition at line 256 of file mne_ctf_comp_data_set.h.