Skip to main content

InvSensorSetCreator

Namespace: INVLIB  ·  Library: Inverse Library

#include <inv/inv_sensor_set.h>

class INVLIB::InvSensorSetCreator

Create a InvSensorSet struct from a channel list with specified accuracy.

Builds InvSensorSet objects from FiffInfo channel definitions, applying SSP projections and compensation

src/examples/ex_inv_hpi/main.cpp
InvSensorSetCreator creator; // reads resources/general/coilDefinitions/coil_def.dat
QList<FiffChInfo> megChannels;
for (const FiffChInfo& ch : info->chs) {
if (ch.kind == FIFFV_MEG_CH)
megChannels << ch;
}
const InvSensorSet sensors = creator.updateSensorSet(megChannels, Accuracy::high); // integration points per coil

Public Methods​

InvSensorSetCreator()​

Constructs a MEG InvSensorSet object.


updateSensorSet(channelList, accuracy)​

Update InvSensorSet from new channel list with new accuracy.

Parameters:

  • channelList : const QList< FiffChInfo > & The channel list to create the MEG sensor set from.

  • accuracy : const Accuracy & The accuracy level to use for the sensor set.

Returns:

  • InvSensorSet — Sensor set built from the MEG coil definitions, or an empty set if channelList is empty or holds a channel without a MEG coil.

Example​

Used in examples​

ex_inv_hpi​

Inverse library: continuous head position (HPI) fitting.

src/examples/ex_inv_hpi/main.cpp, line 95
InvSensorSetCreator creator; // reads resources/general/coilDefinitions/coil_def.dat
QList<FiffChInfo> megChannels;
for (const FiffChInfo& ch : info->chs) {
if (ch.kind == FIFFV_MEG_CH)
megChannels << ch;
}
const InvSensorSet sensors = creator.updateSensorSet(megChannels, Accuracy::high); // integration points per coil
ok &= expect(sensors.ncoils() == 306 && sensors.np() == 8 && sensors.rmag().rows() == 306 * 8, "InvSensorSetCreator/InvSensorSet: 306 MEG sensors with 8 integration points each");

Authors of this file​