-
Notifications
You must be signed in to change notification settings - Fork 27
KIT to FIFF Conversion
The kit2fiff
conversion utility is part of MNE-Python. It can be started from a bash terminal (Linux) with:
$ mne kit2fiff
Or from a Python session (Windows and Linux):
>>> import mne
>>> mne.gui.kit2fiff()
Select the file containing the pre-marker. Once selected, the markers should appear in the middle view (you might have to click-drag the mouse on the view). At first, only the blue (final) markers are visible because only one set is selected.
Select the second set of markers. Now, the pre (red), post(green) and combined (blue) markers should be visible.
Change the way the markers are combined. The default (Transform
) is to use the pre-markers and move them half-way to the post-marker position. Alternatively, they can be averaged.
-
Data
: The MEG data -
Digitizer Head Shape
: *.hsp file from the head shape digitizer -
Digitizer Fiducials
: *.elp file from the head shape digitizer
If a marker is bad even after combining pre- and post-markers, it can be turned off here.
While KIT files represent events as binary impulses on multiple channels, FIFF files represent events in a single channel which has an integer value at each time point (0 if there is no event). Conversion to the FIFF format thus entails merging events from multiple channels into a single time series:
-
Event onset
: Whether events in the KIT channels are represented as signal drop (Trough
) or as signal increase (Peak
). -
Value Coding
: How to convert*.sqd
channel indexes to*.fif
event values.Little-endian
andBig-endian
treat successive channels as bits of a binary number.Channel#
uses the KIT channel index as event value; if multiple channels are on at the same time, their values are summed. -
Channels
: specify the channels that contain events in the KIT file. -
Threshold
: Threshold for detecting events in the analog trigger channel (KIT channels are recorded as continuous value, and theThreshold
is used to turn this into a binary state).
Use the Find Events
button to test the settings.
Once all settings are correct, use the Save FIFF…
button to save. Once saving is in progress, you can move on:
-
If the same subject has multiple raw files, just switch the
Data
in panel 4 and save again. -
To move to the next subject, use the
Clear All
button to reset the data files (event settings will stay).
Note
|
FIFF files have a 2 Gb size limit. If that limit is exceeded, additional files with number tags (-1 etc.) in their filenames are produced. The first file contains a reference to the filenames of the additional files, so that when reading the first file, the additional files are automatically read too. As a consequence of this, however, the additional files cannot be renamed without breaking this linkage.
|
Sometimes individual markers are defective, as in the example below:
It looks like the red central forehead marker is off. To find out what its index is, check the Label
checkbox in section 1 (it is marker 2). Uncheck the 2
box in section 2 to not use the defective marker for fitting.
When a recording was split into multiple *.sqd
files these can be combined into a single *.fif
file with the following steps:
-
Convert the
*.sqd
files to*.fif
as if they were separate recordings (they can share the digitizer info, so after saving the first one just switch theData
in panel 4 and save again). -
Combine the
*.fif
files as described in Concatenating-*-raw.fif-files