User Tools

Site Tools


acq.channeldata
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


acq.channeldata [2010/06/21 05:40] (current) – created jochen
Line 1: Line 1:
 +====== ACQ::ChannelData - access channel data in raw sampling frequency ======
  
 +===== Motivation =====
 +Different object types have different field names/properties and/or store the underlying data differently (e.g. in a samples-by-channel table or in different fields). This method (which is available also for the [[xff - NTT format|NTT - numeric text table]] format/object) allows to correctly overload with different object types (useful for shared code across types).
 +
 +===== Method reference ('acq.Help('ChannelData')') =====
 +<file> ACQ::ChannelData  - get channel data from RawData/Channel(C).Data
 + 
 + FORMAT:       cdata = acq.ChannelData(channel [, idx])
 + 
 + Input fields:
 + 
 +       channel     channel number
 +       idx         indices (passed on!)
 + 
 + Output fields:
 + 
 +       cdata       channel data</file>
 +
 +===== Usage =====
 +There are two main uses:
 +  * getting all the data in one channel: <code matlab>% whole channel
 +ch1data = acq.ChannelData(1);</code>
 +  * getting only part of the data (e.g. first 10,000 samples): <code matlab>% only part of the data
 +ch1snip = acq.ChannelData(1, 1:10000);</code>
 +
 +===== Notes =====
 +Although the second syntax above might suggest otherwise, the returned argument is always a column vector (suitable for first-dimension transformations and statistics, e.g. mean, etc.).
 +
 +The [[xff - ACQ format|ACQ]] format/object stores the scaling information as part of the per-channel information. To obtain the correct values (scaled as input, e.g. in case the data on file is in 16-bit short integer precision), this function automatically multiplies the ''.RawData'' content (if necessary) with the scaling factor and adds the offset. The result of this operation is then also stored in ''.Channel(C).Data'', so that it only needs to be performed once.
acq.channeldata.txt · Last modified: 2010/06/21 05:40 by jochen