Example #1
0
def beamformer_default(info):  # noqa
    beamformer_default = Beamformer()
    parent = FileSource()
    parent.mne_info = info
    parent.output = np.random.rand(info['nchan'], 1)
    beamformer_default.parent = parent
    return beamformer_default
Example #2
0
def mce_def(info):  # noqa
    mce_def = MCE()
    parent = FileSource()
    parent.mne_info = info
    parent.output = np.random.rand(info['nchan'], 1)
    mce_def.parent = parent
    return mce_def
Example #3
0
def inv_model_def(info):  # noqa
    inv_model_def = InverseModel()
    parent = FileSource()
    parent.mne_info = info
    parent.output = np.random.rand(info['nchan'], 1)
    inv_model_def.parent = parent
    return inv_model_def
Example #4
0
def env_extractor(info, data_path):  # noqa
    env_extractor = EnvelopeExtractor()
    env_extractor.mne_info = info
    N_SEN = len(info['ch_names'])
    env_extractor.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    env_extractor.parent = parent
    return env_extractor
def lin_filter(info, data_path):  # noqa
    lin_filter = LinearFilter()
    lin_filter.mne_info = info
    N_SEN = len(info['ch_names'])
    lin_filter.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    lin_filter.parent = parent
    return lin_filter
Example #6
0
def coh_computer(info, data_path):  # noqa
    coh_computer = Coherence()
    coh_computer.mne_info = info
    N_SEN = len(info['ch_names'])
    coh_computer.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    coh_computer.parent = parent
    return coh_computer
def ica_rejector(info, data_path):  # noqa
    ica_rejector = ICARejection()
    ica_rejector.mne_info = info
    N_SEN = len(info['ch_names'])
    ica_rejector.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    ica_rejector.parent = parent
    return ica_rejector
def lsl_streamer(info, data_path):  # noqa
    lsl_streamer = LSLStreamOutput()
    lsl_streamer.mne_info = info
    N_SEN = len(info['ch_names'])
    lsl_streamer.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    lsl_streamer.parent = parent
    return lsl_streamer
def signal_viewer(info, data_path):  # noqa
    signal_viewer = SignalViewer()
    signal_viewer.mne_info = info
    N_SEN = len(info['ch_names'])
    signal_viewer.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    signal_viewer.parent = parent
    return signal_viewer
Example #10
0
def beamformer(info, fwd_model_path, data_path):  # noqa
    is_adaptive = True
    beamformer = Beamformer(fwd_path=fwd_model_path, is_adaptive=is_adaptive)
    beamformer.mne_info = info
    N_SEN = len(info['ch_names'])
    beamformer.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    beamformer.parent = parent
    return beamformer
Example #11
0
def mne_gcs(info, fwd_model_path, data_path):  # noqa
    snr = 1
    mne_gcs = MneGcs(snr=snr, fwd_path=fwd_model_path, seed=0)
    mne_gcs.mne_info = info
    N_SEN = len(info['ch_names'])
    mne_gcs.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    mne_gcs.parent = parent
    return mne_gcs
Example #12
0
def file_outputter(info, data_path, tmp_path):  # noqa
    output_path = op.join(tmp_path, 'output.h5')
    file_outputter = FileOutput(output_path)
    file_outputter.mne_info = info
    N_SEN = len(info['ch_names'])
    file_outputter.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    file_outputter.parent = parent
    return file_outputter
Example #13
0
def mce(info, fwd_model_path):  # noqa
    n_comp = 10
    print(fwd_model_path)
    mce = MCE(fwd_model_path, n_comp)
    mce.mne_info = info
    N_SEN = len(info['ch_names'])
    mce.input = np.random.rand(N_SEN)
    parent = FileSource()
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    mce.parent = parent
    return mce
Example #14
0
def inv_model(info, fwd_model_path):  # noqa
    snr = 1
    method = 'MNE'
    inv_model = InverseModel(
        snr=snr, forward_model_path=fwd_model_path, method=method)
    inv_model.mne_info = info
    N_SEN = len(info['ch_names'])
    inv_model.input = np.random.rand(N_SEN)
    parent = FileSource()
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    inv_model.parent = parent
    return inv_model
def preprocessor(info, data_path):  # noqa
    preprocessor = Preprocessing()
    preprocessor.mne_info = info
    N_SEN = len(info['ch_names'])
    preprocessor.input = np.random.rand(N_SEN)
    parent = FileSource(data_path)
    parent.output = np.random.rand(info['nchan'], 1)
    parent.mne_info = info
    preprocessor.parent = parent

    app = QCoreApplication(sys.argv)
    parent.updater = AsyncUpdater(app, parent)
    return preprocessor