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

Method Main

csharp_package/brainflow/examples/ica/ica.cs:12–32  ·  view source on GitHub ↗
(string[] args)

Source from the content-addressed store, hash-verified

10 class ICA
11 {
12 static void Main (string[] args)
13 {
14 BoardShim.enable_dev_board_logger ();
15
16 int board_id = (int)BoardIds.SYNTHETIC_BOARD;
17 BoardDescr board_descr = BoardShim.get_board_descr<BoardDescr> (board_id);
18 int[] eeg_channels = board_descr.eeg_channels;
19 int channel = eeg_channels[1];
20
21 BrainFlowInputParams input_params = new BrainFlowInputParams ();
22 BoardShim board_shim = new BoardShim (board_id, input_params);
23 board_shim.prepare_session ();
24 board_shim.start_stream (3600);
25 System.Threading.Thread.Sleep (10000);
26 board_shim.stop_stream ();
27 double[,] data = board_shim.get_board_data (500);
28 board_shim.release_session ();
29
30 double[,] ica_data = data.GetRow (channel).Reshape(5, 100);
31 Tuple<double[,], double[,], double[,], double[,]> ica = DataFilter.perform_ica (ica_data, 2);
32 }
33 }
34}

Callers

nothing calls this directly

Calls 9

ReshapeMethod · 0.80
GetRowMethod · 0.80
prepare_sessionMethod · 0.65
start_streamMethod · 0.65
stop_streamMethod · 0.65
get_board_dataMethod · 0.65
release_sessionMethod · 0.65
perform_icaMethod · 0.65

Tested by

no test coverage detected