Smartmove robotic

These recordings come from the smartmove robotic TMS. This input format uses three files:

  • .cnt for EEG

  • .cnt for EMG

  • .txt for Coordinates

Note

Load the TraceData with load_ephys_file() and the Coords with load_documentation_txt()

Data

EEG and EMG data is stored in the native file-format of the eego recording software. It can be loaded with libeep. During robotic TMS, the 64 EEG channels and the 8 EMG channels are stored in separate .cnt files.

Coordinates

During the mapping procedure, the coordinates of the target positions, i.e. where the robot will be moved to, are saved in a documentation.txt-file. Please note that these are the targets for the robotic movement, recorded, not the actual coordinates of stimulation. The actual coordinates at the time of stimulation do not appear to have been stored at all.

Documentation.txt

The file documentation.txt stores the coordinates of each target the robot arm moved to. It does not contain information regarding manual adjustments (i.e. adjusting distance of coil to the head) or the actual coil position at the time of stimulation. Target coordinates are given in medical image coordinates (CT / 3D image).

  • Target counter: Counts the number of successfully reached targets, including this one.

  • Target number: Point number in the total list of all targets.

  • Target label: The ‘name’ of the target point. Usually the same as the target number.

  • X-vector [<m11> <m21> <m31>]

  • Y-vector [<m12> <m22> <m32>]

  • Z-vector [<m13> <m23> <m33>]

  • Position [<x> <y> <z>]

  • Date & time point [dd.mm.yy hh:mm:ss]

  • Experiment name [always ‘TMS exp’]

  • Subject ID [NnVv]

The coordinates of the targets are stored in one or multiple targets_*.sav-files in xml format. The filename of this save file encodes experiment, subject pseudonym, date and hour, e.g.: targets_<experiment>_<VvNn>_20190603_1624.sav. These coordinates are the e.g. the grid of targets predefined before starting the mapping.

The file success.txt stores the coordinates of only the last target the robot arm moved to. The first line reads ‘success’ (move ended at desired position), ‘start’ (move started but not ended) or ‘fail’ (move ended before reaching the target due to error). The second line contains the timestamp of when the status was updated. For line 4 to 10, same notation as in documentation.txt.

The file target_TMS_exp_[NnVv]_[yyyymmdd_hhmm] stores the coordinates of all created targets. It contains the position (<x>, <y> and <z>), matrix operations (<m11>, <m12>… until <m33>) and target label (<label>), each labeled as such.

Module Content

cut_traces(cntfile, annotation)[source]

cut the tracedate from a matfile given Annotations :type cntfile: Union[str, Path] :param cntfile: the cntfile for cutting the data. must correspond in name to the one specified in the annotation :type cntfile: FileName :type annotation: Dict[str, Any] :param annotation: the annotations specifying e.g. onsets as well as pre and post durations :type annotation: Annotations

Returns

traces (List[TraceData])

prepare_annotations(docfile, cntfiles, channel, pre_in_ms, post_in_ms, select_events=['0001'])[source]

load a documentation.txt and cnt-files and distill annotations from them

Parameters
  • docfile (FileName) – the documentation.txt with the target coordintes

  • cntfiles (List[FileName]) – a list of the .cnt-file with the EEG data and triggers and the the .cnt-file with the EMG data

  • channel (str) – which channel to pick

  • pre_in_ms (float) – how many ms to cut before the tms

  • post_in_ms (float) – how many ms to cut after the tms

Returns

annotation (Annotations) – the annotations for this origin files