Edit me on Github

apex-documentation

Introduction

Basic concepts

Creating experiment files

Grouping experiment files

Schema documentation

Scripting

Examples

Example strategies

Result analysis

SPIN interface

L34 device

Matlab

Plugins

Customizing

Studies

Flowrunner

Bibliography

Development

View the Project on GitHub

Using cochlear implants from Cochlear

To directly stimulate subjects using cochlear implants from Cochlear, APEX 4 uses the NICv2 interface, provided by Cochlear. This interface is abstracted as the L34Device (to be used under ). It is always called L34, irrespective of the device that is used with NICv2 (which can be an L34 but also an SP12 or other devices).

L34 setup

To use APEX 4 with the L34 device, you need the L34 plugin, which is provided on request, provided you sign the Cochlear NIC agreement.

After obtaining the L34 plugin (in the form of the file ), copy it to the directory under the main APEX directory. You also need a properly setup Cochlear NICv2 environment. We refer to the NICv2 documentation on how to do this. For APEX 4 it boils down to having the right version of NICv2 (the same APEX 4 was compiled against) and having the Nucleus NIC binaries directory in your path. If this part is setup correctly, you should be able to use the L34 device with device number 0 (the simulated device).

Before starting an APEX 4 experiment that uses the L34device, make sure the appropriate devices are connected to the computer and the NIC environment is setup correctly.

Debugging

When using the L34 device, APEX 4 starts a helper program (nic3slave.py). APEX 4 communicates with the helper program (using domain sockets for linux and named pipes for windows), and sends commands to the helper program. In turn the helper program communicates with the L34 device and executes those commands. Because APEX 4 doesn’t communicate directly with the L34 device, the L34 debug output needs to be piped from the helper program to APEX 4. When you enable verbose in the device section of your experiment file, this debug output will be printed in the apex message window. You will need to use the long notation when defining your device with verbose, for example:

      <device>
          protoslave: slave=nic3slave,verbose;
          platform=L34,implant=CIC4,auto_pufs=off,go_live=on,
          min_pulse_width_us=25.0,flagged_electrodes=,
          latency_ms=1000,mode=MP1+2
      </device>

Electrical stimulation files

When using the L34 device, you need prefined stimulation patterns. Electrical stimulation patterns are not stored in the wave format, such as for the wavdevice, but as one of the following file types:

qic

In a qic file, 2 parameters are specified per stimulus: the channel to be used and the magnitude (in %). Before a qic file can be sent to the NICv2 interface, it thus first has to be mapped by apex.

qicext

electrode, magnitude (CU), period, phasewidth, phasegap

xml

defined by cochlear (ref?)

Either of these files can be generated using the Nucleus Matlab Toolbox, provided by Cochlear. The most important difference between xml stimulation files and other simulation files, is that for the latter APEX 4 will do channel mapping using a user map defined in the experiment file.

Generating .qic files

In .qic files, pulses are defined by a certain magnitude (between 0 and 1) and a channel. They can be generated by the Matlab function and written to disk using the function. A .qic file can be read back into matlab using the function.

As the period is constant for an entire qic file, powerup frames have to be inserted in the file if no stimulation is desired at a certain instant.

Parameters of the L34 device

To use the L34 device, define a under , use the attribute.

The L34 device has some main parameters:

device

Device identifier. For NIC 2, this identifier consists of three parts: the device type, the implant type and the device number. The device type should be L34. The implant can be either (Esprit3G or Sprint or Freedom with old internal part) or (Freedom with new internal part). The device number corresponds to the order of the COM ports as defined in the Windows device manager, e.g. the first L34 connected to the computer has id 1. There is a simulated device with id 0, which allows to debug experiments without having an L34 connected. Note that triggering does not work properly with the simulated device.

When using or files, APEX 4 calculates the number of current units on the basis of the defined map. The map can be either entered directly in the experiment file (inline) or derived from the Nucleus fitting software R126 (fromR126). The following map parameters should be defined: number of electrodes, mode, pulsewidth, pulsegap, period (1/total rate) and the C’s and T’s for the different channels.

Example:

    <devices>
     <device id="l34"  xsi:type="apex:CohDeviceType">
        <device>l34-cic3-1</device>

        <defaultmap>
        <inline>
        <number_electrodes>3</number_electrodes>
        <mode>MP1+2</mode>
        <pulsewidth>25</pulsewidth>
        <pulsegap>8</pulsegap>
        <period>138.9</period>
        <channel number="1" electrode="22" threshold="120" comfort="150"/>
        ...
        <channel number="22" electrode="1" threshold="130" comfort="152"/>
        </inline>
     </defaultmap>
    </device>
    <devices>

Note that Cochlear numbers the electrodes from 22 (apex) to 1 (base). You can use either convention in your file, as long as the above map is specified correctly.

Note also that when using stimulation files in the XML format, the map is not used.

Bilateral stimulation

For bilateral stimulation, two devices with each a map need to be defined. To control the order of starting both devices, you can specify a master device. If a master device is specified, this will be the last device started. If not specified, the devices are started in order of appearance in the experiment file. The device that sends a trigger signal will typically be the master device.

The trigger element can be used to specify trigger signals to be sent or received. The content ‘out’ specifies a trigger out signal to be sent. The content ‘in’ tells the device to wait for a trigger signal before starting stimulation.

Example:

    <master>l34-1</master>
    <device id="l34-1"  xsi:type="apex:CohDeviceType">
        <device>l34-cic3-1</device>
        <trigger>out</trigger>
        ...
    </device>
    <device id="l34-2"  xsi:type="apex:CohDeviceType">
        <device>l34-cic3-2</device>
        <trigger>in</trigger>
        ...
    </device>

Note that datablocks are attached to a device, and need to be defined twice if they are to be used with both devices.