Tutorial on MAGIC Toolbox

MAGIC [1] is an open-source toolbox, based in Matlab, for external control of transcranial magnetic stimulation (TMS) devices. The source code of the toolbox is available for download from GitHub [2]. Thanks to MAGIC providers, this tutorial shows how Magventure MagPro TMS device is set up for the single-pulse and repetitive TMS (rTMS). 

Procedure:

Step 1: The Magventure MagPro G3 is used with the software version:  GUI SW Version: 7.0.0 June 19 2013. A USB-to-DB9(female) is required, which connects the PC to the TMS device as shown in figures.

Step 2: Turn on the TMS device. On the “Service Mode” page, set the COM2 control to ON, as shown in the figure. 

Step 3: Download MAGIC, and save its path in Matlab. 

Step 3: For a single-pulse case, run this sample code in Matlab, which applies 20 successive incremental pulses, with 1 second pause between them, in a loop. The initial pulse is 5%, and 5% is added to the previous pulse, until the pulse intensity reaches 100%. 

For rTMS, run this sample code in Matlab, which applies rTMS pulses with the frequency 1Hz, 4 pulses in each train, 3 trains, and 2 seconds pause between trains. 

External Control of TMS Device: Single-Pulse Case

External Control of TMS Device: rTMS Case

References

[1] F.H. Saatlou, N.C. Rogasch, M. Biabani, N.A. McNair, S.D. Pillen, T.R. Marshall, and T. O. Bergmann, “MAGIC: An open-source MATLAB toolbox for external control of transcranial magnetic stimulation devices,” Brain Stimulation, Vol. 11, pp. 1189 – 1191, 2018.
[2] Source code available at: https://github.com/nigelrogasch/MAGIC/wiki

Warranty

The information at this page is provided “as is”, without warranty of any kind.