Spike Toolbox |
![]() ![]() |
Managing spike toolbox options
This topic explains how options for the Spike Toolbox are stored, how to retrieve and modify them and how to make them persistent.
Accessing the toolbox options
The toolbox options are manipulated through the STOptions function. This function retrieves and sets the toolbox options structure.
[stOptions] = STOptions
STOptions(stOptions)
[stOptionsOld] = STOptions(stOptionsNew)
Toolbox options are always stored and manipulated as a MATLAB structure. You should always use STOptions to obtain a valid options structure, rather than creating one from scratch. This way is faster, anyway.
stO = STOptions
stO =
Signature: [1x11 char]
ToolboxVersion: [1x1 double]
bDisplayProgress: [1x1 logical]
InstanceTemporalResolution: [1x1 double]
MappingTemporalResolution: [1x1 double]
RandomGenerator: [1x1 function_handle]
SpikeChunkLength: [1x1 double]
DefaultSynchWindowSize: [1x1 double]
DefaultCorrWindow: [1x1 double]
DefaultCorrSmoothingKernel: [1x8 char]
DefaultCorrSmoothingWindowFactor: [1x1 double]
stasDefaultOutputSpecification: [1x2 struct]
MonitorChannelsAddressing: {[1x2 struct] [1x1 struct] [] []}
stasMonitorChannelID: [1x2 struct]
The options structure field names are relatively self-descriptive, but...
Signature
- This field is used by the toolbox to test for a valid options structure. If you change this field, the toolbox will reject the options structure.ToolboxVersion
- This field contains the toolbox version used to create the options structure. If the version numbers do not match, the toolbox will reject the structure.bDisplayProgress
- Many toolbox functions display the progress of potentially long operations. This flag can be used to disable or enable this progress display.InstanceTemporalResolution
- This sets the temporal resolution for creating spike train instances. All spike train instances have are quantised in time by this amount.MappingTemporalResolution
- This sets the temporal resolution for creating spike train mappings.RandomGenerator
- This function handle specifies a random number generator to use. See Random number generators for detailed information.SpikeChunkLength
- This number specifies the maximum number of quantal time bins in a spike train chunk. A spike train can contain more than one chunk, so this does not impose a limit on the length of a spike train.DefaultSynchWindowSize
- This duration specifies a default time window for finding synchronous spikes, used by STFindSynchronousPairs.DefaultCorrWindow
- This duration specifies a default window over which to perform a cross correlation. This option is used by STCrossCorrelation.DefaultCorrSmoothingKernel
- This string specifies which smoothing kernel that STCrossCorrelation should use by default. See the STCrossCorrelation documentation for possible alternatives for this option.DefaultCorrSmoothingWindowFactor
- This option specifies what proportion of the correlation window the default smoothing window will be, when performing a cross correlation using STCrossCorrelation.stasDefaultOutputSpecification
- This addressing specification will be used by default when mapping a spike train. See Understanding toolbox addressing for more information on addressing specifications.MonitorChannelsAddressing
- This cell array of addressing specifications determines which AER bus monitor channels will be imported when using STStimulate, as well as the addressing schemes used on each channel. See Setting default addressing schemes for more information on monitor channel addressing.stasMonitorChannelID
- This addressing specification determines how to extract the monitor channel ID from a binary hardware address. See Channel address specifications for more information on channel addressing specifications.STOptionsDescribe gives a nicer display of the current toolbox options, or of a toolbox options structure.
STOptionsDescribe(stOptions)
STOptionsDescribe
STOptionsDescribe;
--- Spike toolbox options:
Toolbox version [0.03]
Operation progress display is [on]
Default temporal resolution for spike trains:
Instances [0.99] usec
Mappings [1.00] usec
Toolbox random number generator [rand]
Maximum spike chunk length [2097152] spikes
Default spike synchrony matching window [1.00] msec
Default window size for cross-correlation analysis [1.00] msec
Default smoothing kernel for cross-correlation analysis [gaussian]
Default factor for determining smoothing window for cross-correlation [10]
Default output addressing specification
|(12) Synapse address (8)|(7) Neuron address (0)|
Monitor channel ID addressing specification
|(15) Channel ID (14)|(13) (Ignored) (0)|
Monitor channel address mappings:
[0]: |(12) Synapse address (8)|(7) Neuron address (0)|
[1]: |(7) Neuron address (0)|
After modifying some aspect of the toolbox options (by obtaining a structure then assigning a new value to a field), use STOptions again to set the new options.
stO.RandomGenerator = @twister;
STOptions(stO);
STOptions will tell you if you've broken the options structure with your meddling.
Setting persistant toolbox options
Although you could re-set your favourite options every time you start MATLAB, it's much less frustrating to save a set of options. STOptionsSave and STOptionsLoad are used to manipulate persistant toolbox options.
STOptionsSave
STOptionsSave(stOptions)
STOptionsSave(stOptions, filename)
STOptionsLoad
[stOptions] = STOptionsLoad
STOptionsLoad(filename)
The basic calling syntaxes store and retrieve the current toolbox options from a file stored on a per-user basis, in your .matlab
directory (or its equivalent on Windows).
If your options become hopelessly messed up, use STToolboxDefaults to retrieve the factory defaults in handy-dandy options structure format. Then use STOptionsSave to write them to the persistant database.
[stOptions] = STToolboxDefaults
![]() |
Understanding addressing
![]() |