MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / get_eeg_channels

Method get_eeg_channels

python_package/brainflow/board_shim.py:896–915  ·  view source on GitHub ↗

get list of eeg channels in resulting data table for a board :param board_id: Board Id :type board_id: int :param preset: preset :type preset: int :return: list of eeg channels in returned numpy array :rtype: List[int] :raises BrainFlowError:

(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET)

Source from the content-addressed store, hash-verified

894
895 @classmethod
896 def get_eeg_channels(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> List[int]:
897 """get list of eeg channels in resulting data table for a board
898
899 :param board_id: Board Id
900 :type board_id: int
901 :param preset: preset
902 :type preset: int
903 :return: list of eeg channels in returned numpy array
904 :rtype: List[int]
905 :raises BrainFlowError: If this board has no such data exit code is UNSUPPORTED_BOARD_ERROR
906 """
907
908 num_channels = numpy.zeros(1).astype(numpy.int32)
909 eeg_channels = numpy.zeros(512).astype(numpy.int32)
910
911 res = BoardControllerDLL.get_instance().get_eeg_channels(board_id, preset, eeg_channels, num_channels)
912 if res != BrainFlowExitCodes.STATUS_OK.value:
913 raise BrainFlowError('unable to request info about this board', res)
914 result = eeg_channels.tolist()[0:num_channels[0]]
915 return result
916
917 @classmethod
918 def get_exg_channels(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> List[int]:

Callers

nothing calls this directly

Calls 3

BrainFlowErrorClass · 0.90
get_eeg_channelsMethod · 0.65
get_instanceMethod · 0.45

Tested by

no test coverage detected