====== 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')') ===== 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 [[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.