BrainBit foe developers Subscribe for updates Visit website
Home
SDK
Windows
iOS
Android
DotNet
Web
Device

SpectrumPowerDoubleChannel

 

#include “cspectrum_power_channel.h

 

Spectrum power data channel. Heir to the base class of DoubleChannel​ channels. Spectrum power is calculated based on the arrays of ​SpectrumChannel​ channels specified in the constructor.

Description

create_SpectrumPowerDoubleChannel

Function. Creating a signal spectrum data channel.

Creates a power spectrum data channel.

Options:

channels

Description: spectrum channel array

Data type: SpectrumDoubleChannel**

channels_count

Description: number of spectrum channels

Data type: size_t

low_freq

Description: lower limit of the frequency of spectrum power calculation in Hz

Data type: float

high_freq

Description: upper limit of the frequency of spectrum power calculation in Hz

Data type: float

name

Description: arbitrary text channel identifier

Data type: const char*

window_duration

Description: spectrum calculation window size in seconds.

Data type: double

overlapping_coeff

Description: overlapping factor of the calculation window. Values range from 0 to 1, where 0 is no overlap and 1 is maximum overlap

Data type: double

Return value:

Description: Spectrum Power Data Channel

Data type: SpectrumPowerDoubleChannel*.

SpectrumPowerDoubleChannel_set_window_duration

Function. Setting the window size.

Method for setting the size of the spectrum calculation window in seconds.

Options:

channel

Description: spectrum power channel

Data type: SpectrumPowerDoubleChannel*

duration

Description: spectrum calculation window in seconds

Data type: double

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.

SpectrumPowerDoubleChannel_set_frequency_band

Function. Setting the frequency limits for calculating the spectrum power.

Method of setting the upper and lower limits of the frequency for calculating the spectrum power in Hz.

Options:

channel

Description: spectrum power channel

Data type: SpectrumPowerDoubleChannel*

low_freq

Description: lower limit of the frequency of spectrum power calculation in Hz

Data type: float

high_freq

Description: upper limit of the frequency of spectrum power calculation in Hz

Data type: float

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.

SpectrumPowerDoubleChannel_set_overlapping_coefficient

Function. Setting the window overlap ratio.

Method of setting the coefficient of the calculation window overlap Values range from 0 to 1, where 0 is no overlap and 1 is maximum overlap

Options:

channel

Description: spectrum power channel

Data type: SpectrumPowerDoubleChannel*

overlap

Description: overlap ratio

Data type: double

Return value:

Description: An indication of an error. More details sdk_error

Data type: int.

spectrum_power_normalized

Function. Spectrum power calculation.

Static method for calculating spectrum power based on spectrum array.

Options:

low_freq

Description: lower limit of the frequency of spectrum power calculation in Hz.

Data type:float

high_freq

Description: upper limit of the frequency of spectrum power calculation in Hz.

Data type: float

spectrum

Description: spectrum dataset

Data type: double*

spectrum_length

Description: spectrum data array length

Data type: size_t

frequency_step

Description: spectrum calculation step in Hz

Data type: float

Return value:

Description: spectrum power

Data type: double.