User Tools

Site Tools


acq.channeldata

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 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')')

 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

Usage

There are two main uses:

  • getting all the data in one channel:
    % whole channel
    ch1data = acq.ChannelData(1);
  • getting only part of the data (e.g. first 10,000 samples):
    % only part of the data
    ch1snip = acq.ChannelData(1, 1:10000);

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 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