示例#1
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import os, os.path, sys
from scipy import *
from scipy import signal
import unittest

from openbci.offline_analysis.obci_signal_processing import read_manager
from openbci.offline_analysis.obci_signal_processing.signal import read_info_source, read_data_source
from openbci.offline_analysis.obci_signal_processing.tags import read_tags_source
from openbci.offline_analysis import offline_analysis_logging as logger
LOGGER = logger.get_logger("test_chain_analysis_offline", "info")

 

import chain_analysis_offline as ch
import analysis_offline as an

def get_fake_manager(number_of_channels, channel_len):
    """
    Return read manager with samples:
    [
       [1 2 3 ... channel_len],
       [10 20 30 ... 10*channel_len]
       ...
       [10^number_of_channels ... ]
    ]
    """
    new_samples = zeros((number_of_channels, channel_len))
    start_i = 1
示例#2
0
#     Mateusz Kruszyński <*****@*****.**>

import sys, os
sys.path.insert(1, '../../../')
sys.path.insert(1, '../../../openbci/')

from offline_analysis import trigger_experiment
from openbci.tests import lost_samples_test
from offline_analysis.erp import erp_avg
from offline_analysis.erp import erp_plot
from openbci.offline_analysis.obci_signal_processing.tags import smart_tag_definition
from openbci.offline_analysis.obci_signal_processing import smart_tags_manager
from openbci.offline_analysis import offline_analysis_logging as logger
from openbci.offline_analysis.obci_signal_processing import read_manager
from openbci.offline_analysis.obci_signal_processing.signal import data_file_proxy
LOGGER = logger.get_logger("kamil_erp", "debug")


class KamilOddballExpTag(trigger_experiment.ExperimentTag):
    def get_name(self):
        #return self.group[:3]
        if self.word == 'drewno':
            return 'drewno'
        if self.group[:3] == 'Neu':
            return 'Neu'
        else:
            return self.group[0]

    def get_desc(self):
        return {
            'word': self.word,
示例#3
0
#     Mateusz Kruszyński <*****@*****.**>

import sys, os
sys.path.insert(1, '../../../')
sys.path.insert(1, '../../../openbci/')

from offline_analysis import trigger_experiment
from openbci.tests import lost_samples_test
from offline_analysis.erp import erp_avg
from offline_analysis.erp import erp_plot
from openbci.offline_analysis.obci_signal_processing.tags import smart_tag_definition
from openbci.offline_analysis.obci_signal_processing import smart_tags_manager
from openbci.offline_analysis import offline_analysis_logging as logger
from openbci.offline_analysis.obci_signal_processing import read_manager
from openbci.offline_analysis.obci_signal_processing.signal import data_file_proxy
LOGGER = logger.get_logger("kamil_erp", "debug")


class KamilOddballExpTag(trigger_experiment.ExperimentTag):
    def get_name(self):
        #return self.group[:3]
        if self.word == 'drewno':
            return 'drewno'
        if self.group[:3] == 'Neu':
            return 'Neu'
        else:
            return self.group[0]
    def get_desc(self):
        return {
            'word':self.word,
            'fix_time':self.fix_time,