Mr. Kick MatLab File Contents

Mr Kick Home

This document will present the most important parts of the MatLab files produced by Mr. Kick. The files contain a large number of matrices, which represent the settings used when data were acquired. Most of these have little or no relevance when viewed in MatLab. Such matrices will not be discussed in the following.

For further information as well as corrections and suggestions please send an e-mail to knl.

The main matrices

MrKick - File ID and version

The very first matrix in the file identifies the source, i.e. Mr. Kick, and its version:

MrKick(1) contains the version of Mr. Kick, that produced the file.

The following elements of the matrix, MrKick(2:6), encodes further identification, which has no relevance to the MatLab user.

Note: Mr. kick will only load files with the proper File ID as the first matrix in the file. Any other file will be regarded as an invalid data file and discarded. Also the version no. in the file must be equal to or lower than the version of Mr. Kick loading it. File contents are subject to change!

Changes to the file format

The version of Mr. Kick, that produced the file, is mainly of interest as the contents of the files changes when new features are added to the program or older features are updated. So far the file format has changed at the following version:

  • 0.75: Trigger settings moved from DaqSettings to TrigrMmmSss.
  • Above 0.78: Sweep header contains save time.
  • 1.10: Protocol matrix containing stimulus protocol data, Protocol, added.
  • 1.40: Channel Offset added to analog input channel settings, AiChans
  • 1.7001: Classification settings matrix, Classify, changed name to Classifd as "Classify" has become a reserved word in later versions of MatLab
  • 1.7002: Date'n Time, DatenTime, matrix added
  • 1.71: Subject information text-matrix, SubjectInfo, added

Date'n Time

The DatenTime matrix contains the date and time when the file was created:

  • DatenTime(1): Time in seconds after program startup, see swpnnn(8).
  • DatenTime(2:7): Year, Month, Day of Month, Hour, Minute, Second.

Analog input channels

AiChanLabel - Analog input channel labels

This matrix contains the labels of all acquired channels. The order is the same as that of the channels in the data matrices. Channels sampled at high sampling rate come first.

AiChanLabel(:,1)' reveals the label of the first acquired channel.

AiChans - Analog input channel settings

This matrix contains the settings of all acquired channels.

AiChans(:,1) contains settings of the first acquired channel.

c in the following represents the channel index, 1..Nchan: The order is the same as that of the channels in the data matrices. Channels sampled at high sampling rate come first.

AiChans(1,c) contains the A/D-board channel number, 0 is first the analog input on the A/D-board (hardware).
AiChans(2,c) reveals channel Group membership: 0=No Group, 1=EMG, 2=Kinematic.
AiChans(3,c) tells whether Low (0) or High (1) sample rate was used.
AiChans(4,c) contains the Sensitivity applied to the data in the file.
AiChans(5,c) contains the minimum High Limit for the A/D input.
AiChans(6,c) contains the maximum Low Limit for the A/D input.
AiChans(7,c)* reveals the filter type used for display: 0=Butterworth, 1=Bessel.
AiChans(8,c)* contains the HP filter Order used.
AiChans(9,c)* contains the HP filter cut-off frequency used; if 0 no filtering is applied.
AiChans(10,c)* reveals the type of pre-processing used for display: 0=Off (none), 1=Rectify, 2=Differentiate, 3=Integrate.
AiChans(11,c)* contains the LP filter Order used.
AiChans(12,c)* contains the LP filter cut-off frequency used; if 0 no filtering is applied.
AiChans(13,c) tells whether Sensitivity is displayed as sensitivity (0) or gain (1).
AiChans(14,c)* Offset correction in Volts (version 1.4 and above).

*Note: These settings are only used for averaging and display of pre-processed data - they have no effect on the data in the file!

Data Acquisition Settings

DaqSettings - Data sweep acquisition settings

Settings related to the acquisition (sampling) of sweeps are found here:

DaqSettings(1) contains the total length of  the sweep, unit is seconds
DaqSettings(2) reveals the pre-trig part of  the sweep, unit is seconds
DaqSettings(3) is the sample rate for channels sampled at high sample rate, unit is samples/sec (Hz)
DaqSettings(4) is the down-sampling factor for channels sampled at low sampling rate. The low sampling rate is found as DaqSettings(3)/DaqSettings(4).
DaqSettings(5 or 9) is the number of sweeps in a series, i.e. before auto-stop during acquisition. It has nothing to do with the number of sweeps found in the file! - DaqSettings(9) goes for files produced with Mr. Kick vs. 0.74 and earlier, while index 5 goes for vs. 0.75 and later.

More settings are available in files produced with Mr. Kick vs. 0.74 and earlier:

DaqSettings(5) reveals the trigger source: Zero is internal trig, while 1 through 6 means external digital trig via PFI line #0 through #5.
DaqSettings(6) tells whether trig occur at rising, 1, or falling, 0, edge.
DaqSettings(7) is the minimum sweep interval during internal trig,
DaqSettings(8) is the maximum sweep interval during internal trig.

Classifd - Classification Settings

The Classifd matrix contain settings regarding classification of sweeps in main and sub dimension as well as the Y-analysis:

Classifd(:,1) and Classifd(:,2) corresponds to Main and Sub dimension respectively,
Classifd(:,3) contain Y-Analysis settings.

Rows, Classifd(n,:), should be interpretated as follows:

Row, n
Main/Sub
Yana
Interpretation
1
X
0
Classification Mode:
0: Off - one class only, other settings irrelevant.
1: Manual
2: Stimulus Type
3: Stimulus Protocol
4: Analysis of Sweep
2
X
0
Number of classes. If classification mode is zero (Off) the number of classes is one regardless of this number!
3
X
0
Stimulus Select:
0: Manual; 1: Consecutive; 2: Random
4
X
0
Act On - bitwise interpretation, 0=False, 1=True:
Bit 0 (LSB): Event Timing,
Bit 1: Analog Output,
Bit 2: Trigger,
Bit 3 and above: Reserved, all zero.
5
X
X
Analysis method:
0: Off - No analysis, result always zero,
1: Amplitude Start, etc.
- see Classification, Analysis of Sweep.
6
X
X
Hardware Channel, i.e. the analog input on the A/D-board that data are sampled from.
7
X
X
Channel Index - index into the channel list.
8
X
X
Start Time for analysis, sec
9
X
X
End Time for analysis, sec
10
X
X
Normalize: 0=False, 1=True.
11
X
X
Reference value for normalization
12
X
0
Minimum of the range of interest when analysis of sweep
13
X
0
Maximum of the range of interest when analysis of sweep

Note: Not all settings apply to all classification modes!

Protocol added as of vs. 1.10 - elaboration still pending...

EventClsMmmSss - Event Timer settings

Event Timer settings are subject to classification according to classification settings. Data filese contain one matrix for each class, where mm and ss represent main and sub class ID respectively. For event timer index i:

EventClsMmmSss(1,i) identifies the timer
EventClsMmmSss(2,i) Active state: 0=disabled, 1=enabled
EventClsMmmSss(3,i) Pulse polarity: 0=low, 1=high
EventClsMmmSss(4,i) Delay, s
EventClsMmmSss(5,i) Duration, s
EventClsMmmSss(6,i) Reserved, 0 (zero)
EventClsMmmSss(7,i) Digital Output pattern

Any event timers not addressed in the matrix are disabled (inactive).

TrigrMmmSss - Trigger settings

In version 0.75 of Mr. Kick and later trigger settings may be classified. Trigger settings has therefore been moved from DaqSettings to TrigrMmmSss - one matrix for each class, where mm and ss represent main and sub class ID respectively.

TrigrMmmSss(1) reveals the trigger source: Zero is internal trig, while 1 through 6 means external digital trig via PFI line #0 through #5 and 7 is external analog trig via PFI line #0.
TrigrMmmSss(2) is the trigger level in Volts at the PFI line #0 when external analog trig is in use.
TrigrMmmSss(3) tells whether trig was set to occur at rising, 1, or falling, 0, edge.
TrigrMmmSss(4) is the minimum sweep interval (refractory period) in seconds both during internal and external trig,
TrigrMmmSss(5) is the maximum sweep interval in seconds during internal trig.
TrigrMmmSss(7) is the level of hysteresis in Volts at the PFI line #0 during external analog trig.

TrigrMmmSss(6) and TrigrMmmSss(8:9) is not used (values are 0, 0 and 1 respectively).

Analog Output Settings

The analog output settings are divided in three groups:

  • Common parameters, 1 matrix: AoComChans.
  • Units and Paths, 1 matrix: AoUnitnPath.
  • Plug-In parameters, 2xMxS matrices: AoPiParCcMmmSss,
    M and S are number of main and sub classes.

AoComChans - Common parameters

AoComChans(1,1)- AO trig source, 0=EventTimer 0, 1=Timer 0/WfTrig.
AoComChans(2,1)- Update Rate, updates per second.
AoComChans(3,1)- Not used, always zero.

For each of the two supported output channels, c (1..N):

AoComChans(1,c+1) - Active state: Number of active plug-ins (0=off, 1=primary, 2=superimpose)
AoComChans(2,c+1) - Sensitivity
AoComChans(3,c+1) - Offset

AoUnitnPath - Units and Paths

AoUnitnPath(:,1)- Unit, 1st channel.
AoUnitnPath(:,2)- Primary plug-in path, 1st channel.
AoUnitnPath(:,3)- Secondary plug-in path, 1st channel.
AoUnitnPath(:,4)- Unit, 2nd channel.
AoUnitnPath(:,5)- Primary plug-in path, 2nd channel.
AoUnitnPath(:,6)- Secondary plug-in path, 2nd channel.

AoPiParCcMmmSss - Plug-In parameters

Indexing used:

  • c: Channel, 0..N-1
  • mm: Main class, 0..M-1
  • ss: Sub class, 0..S-1
  • p: Plug-in, 1=primary 2=secondary

AoPiParCcMmmSss(1,p) - Active state: 0=disabled, 1=enabled
AoPiParCcMmmSss(2,p) - Amplitude
AoPiParCcMmmSss(3,p) - Delay
AoPiParCcMmmSss(4,p) - Repetitions
AoPiParCcMmmSss(5,p) - Parameter length, f
AoPiParCcMmmSss(6,p) - Data length, g
AoPiParCcMmmSss(7,p) - String length, number of charachters in text
AoPiParCcMmmSss(8,p) - String length when represented as single precision floating point, h (number of elements),
AoPiParCcMmmSss(9:9+f-1,p) - Parameters array
AoPiParCcMmmSss(9+f:9+f+g-1,p) - Data array
AoPiParCcMmmSss(9+f+g:9+f+g+h-1,p) - String represented as single precision floating point (4 charachters per element).

To retrieve the parameter array of the primary plug-in at the 2nd channel, 3rd main-class, 4th sub-class:

AoPiParC1M02S03(9:(9+AoPiParC1M04S05(5,1)-1), 1);

External Devices

Files may contain information regarding the following external devices:

  1. Platform (PFC-II)
  2. PFC-III
  3. ActiveII
  4. MagStimR2

Further information is available here.

Data Sweeps

The number of sweeps contained in the file is available in Nsweep.

For each sweep saved to the file, there will be three matrices:

The nnn is the sweep number, starting from 1. Usualy the sweep number is represented by three characters with leading zeros. If the number of sweeps in the file exceeds 999 the number of characters will increase, i.e. the header of sweep no. 1151 will be swp1151 and datamatrices will be dath1151 and datl1151.

swpnnn - Sweep headers

The sweep header contains the following information:

swpnnn(1) is the sweep number, 1..oo,
swpnnn(2) tells wether the sweep is included (yes=1) or excluded (0, zero),
swpnnn(3) is the main class, 0..Nmain-1,
swpnnn(4) is the sub class, 0..Nsub-1,
swpnnn(5) is the result of the X-analysis defined under main classification,
swpnnn(6) is the result of the X-analysis defined under sub classification,
swpnnn(7) is the result of the Y-analysis defined under classification,
swpnnn(8) is save time, i.e. the time when that sweep was saved to file. Measured in seconds after program startup. Trig time will be a little more than the post trig period earlier - precision is not that high. In file version 0.78 and earlier it is always zero!
Note: Using Open & Change will overwrite original save time!

dathnnn - Data from channels sampled at high rate

These are the data matrices containing data from channels sampled at high sampling rate. The dimensions of the matrix is (Number of Samples X Number of HR-Channels).

dathnnn(:,1) results in all samples from the first channel,
dathnnn(5,2) reveals the value of the 5th sample from the 2nd channel.

If no channels are sampled at high sampling rate, these matrices will be empty (dimension=0X0), but still included in the file.

datlnnn - Data from channels sampled at low rate

These are the data matrices containing data from channels sampled at low sampling rate. The dimensions of the matrix is (Number of Samples X Number of LR-Channels).

datlnnn(:,1) results in all samples from the first low rate channel,
datlnnn(8,5) reveals the value of the 8th sample from the 5th low rate channel.

If no channels are sampled at low sampling rate, these matrices will be empty (dimension=0X0), but still included in the file.

Top - Menu