3 entities – Multichannel Systems MATLAB Manual User Manual

Page 12

Advertising
background image

Points to Discuss

13

2.3 Entities

2.3.1 Event

Entities

Each of the 16 bits of the digital data channel is represented as one event entity. Each change
on the individual digital line results in a new event in the entity with the next index. The event
information is in one 8 bit (byte) value. Its value is 1 for a change from 0 to 1 on the digital line
and μ1 (255) for a change from 1 to 0 on the digital line.

Triggers are mapped to one event entity for each trigger stream. The event is represented in
two 16 bit (word) values. The first one gives the slope of the Trigger, the second the Trigger value.
For manual triggers the second value gives the trigger number. If trial synchronization is used the
trigger event contains another two 16 bit values. The 3

rd

one is the trial number and the 4

th

one

is the stimulus number.

2.3.2 Analog

Entities

Raw electrode data, analog data and filtered data are mapped to analog entities. Each channel
gives one analog entity in Neuroshare. The different gain is considered. Data is given in Volt of
the original input.

The 16 bit of the digital data channel are represented in one analog entity as raw data with a
range from 0 to 65535, with minimum step size of one. Each sample value is included in the entity.

For continuous data the first index is starting at time 0. Then all data are following with the next
index for the next sample point. The time difference of each index is the reciprocal value of the
sample rate.

For triggered data the indices are not always continuous in time. If you are reading many indices
at one time, you get, according to the Neuroshare specifications, in pdwContCount the number
of samples that are continuous.

Although the samples in an analog entity are indexed, they are not guaranteed to be continuous
in time and may contain gaps between some of the indexes. When the requested data is returned,
pdwContCount

contains the number of Analog items, starting from dwStartIndex, which do not

contain a time gap [NeuroshareAPI-1-3.pdf].

For analog entities there is no timestamp directly included in the API for reading the data.
You get the timestamp with the function ns_GetTimeByIndex.

Advertising