Scripting API

btkGetAnalog

Module BTKAcquisitionAccessor

Description#

Extracts one analog channel from the given acquisition based on an index or a string.

Parameters#

hHandle pointing to a C++ btk::Acquisition object.
idxInteger containing the index of the analog channel to extract.
labelString containing the label of the analog channel to extract.

Returned Values#

valuesNumpy matrix of reals (n,1) containing the analog data.
infoDictionnary with the informations related to the analog channels.
  • Info["label"]: True label of the extracted channel
  • Info["description"]: Description of the extracted channel
  • Info["gain"]: Gain (integer) for the extracted channel
  • Info["offset"]: Numerical offset (integer) for the extracted channel
  • Info["scale"]: Scaling factor (float) for the extracted channel
  • Info["frequency"]: Analog's frequency
  • Info["units"]: Unit (string) for the extracted channel.

Detailed Description#

Notes#

See also#

btkSetAnalogDescription, btkSetAnalogLabel, btkSetAnalogOffset, btkSetAnalogScale, btkSetAnalogValues

Syntax#

(values, info) = btkGetAnalog(h, idx)
(values, info) = btkGetAnalog(h, label)

Examples#

h = btkNewAcquisition(10,100,2,10);  
btkSetAnalogDescription(h, 1, 'forceplate2.force.x');
[values, info] = btkGetAnalog(h, 1);             %equivalent
[values, info] = btkGetAnalog(h, 'new_analog');  %equivalent