Programming Reference:Implementing Stimulator in SCIT
To implement a new stimulator in SCIT, follow the steps below. To first learn what SCIT is, and how it is used, see the SCIT User Reference page.

Design
SCIT has adopted an object-oriented implementation, where each stimulator is its own class. These classes all inherit from the AbstractStimulator, which defines all the components needed to implement a new stimulator. To create a new stimulator, you will need to create your own file. Template.m provides the boilerplate code needed for a new stimulator, with comments defining what each function and property does.
Implementation
Below are the steps to create a new stimulator in SCIT. Each step must be followed for it to work.
- Create a new file, named for the stimulator. The easiest is to copy and paste the
Template.mfile and rename it (e.g. new name as MyRipple.m). - Implement all the required functions and properties. Comments are provided as a starting point, and the other stimulators are great references as examples.
- Add the file in the
SCIT_app.mlappin the required spots. This is a bit more tedious, but there are only 4 spots that need to be changed.- In the Design View, select the Neurostimulator Drop Down, go to Items in the Component Browser, and add a new option (the name of your stimulator, e.g. Ripple). Everything else will be in the Code View.
- In the properties section (line 106), define a variable as the name you just added (e.g., ripple = "Ripple")
- In the
initializeStimulatorfunction (line 434), add a new option in the if/else options to define app.Stim. (e.g.elseif strcmp(value, app.ripple) app.Stim = MyRipple;). - In the
LoadParameterFileMenuSelectedfunction (line 1111), add a new option which defines how we know if the loaded parameter file is this stimulator. (e.g.elseif contains(lineArr(1), "Ripple") app.NeurostimulatorDropDown.Value = app.ripple; app.Stim = MyRipple;)
And just like that, the new stimulator is implemented!
Custom Functionality
Some stimulators require custom functions. For example, the NeuroOmega device has different groups of channels, each with their own numbering and number of channels. This requires a custom function to be used, called setNeuroOmegaChannels(app). This is kind of a hack, but AbstractStimulator uses this function, then defines it as empty. This function is then re-defined in the NeuroOmega class. This can simply enable custom functionality for each stimulator.
The property that is harnessed here is Inheritance. This makes the function handle abstracted from the actual implementation. Make sure you are familiar with this concept when implementing a new stimulator, as it can help you overcome any barriers.