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

Method get_emg_channels

python_package/brainflow/board_shim.py:940–959  ·  view source on GitHub ↗

get list of emg 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

938
939 @classmethod
940 def get_emg_channels(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> List[int]:
941 """get list of emg channels in resulting data table for a board
942
943 :param board_id: Board Id
944 :type board_id: int
945 :param preset: preset
946 :type preset: int
947 :return: list of eeg channels in returned numpy array
948 :rtype: List[int]
949 :raises BrainFlowError: If this board has no such data exit code is UNSUPPORTED_BOARD_ERROR
950 """
951
952 num_channels = numpy.zeros(1).astype(numpy.int32)
953 emg_channels = numpy.zeros(512).astype(numpy.int32)
954
955 res = BoardControllerDLL.get_instance().get_emg_channels(board_id, preset, emg_channels, num_channels)
956 if res != BrainFlowExitCodes.STATUS_OK.value:
957 raise BrainFlowError('unable to request info about this board', res)
958 result = emg_channels.tolist()[0:num_channels[0]]
959 return result
960
961 @classmethod
962 def get_ecg_channels(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> List[int]:

Callers

nothing calls this directly

Calls 3

BrainFlowErrorClass · 0.90
get_emg_channelsMethod · 0.65
get_instanceMethod · 0.45

Tested by

no test coverage detected