コード例 #1
0
def test_get_spikes(load_data):
    gen_current = load_data['group_gen_current']
    spike_time = load_data['spike_time']
    py_spike_time = np.array(lif_model.get_spikes(gen_current))
    cy_spike_time = np.array(cy_lif_model.get_spikes(gen_current))
    assert np.allclose(py_spike_time, cy_spike_time)
    assert np.allclose(spike_time, py_spike_time)
    assert np.allclose(spike_time, cy_spike_time)
コード例 #2
0
ファイル: stress_to_spike.py プロジェクト: yw5aj/PlosCompBiol
def stress_to_fr_inst(fine_time, fine_stress, groups, **params):
    group_gen_current = stress_to_group_current(fine_time, fine_stress,
                                                groups, **params)
    spike_time = get_spikes(group_gen_current)
    return np.array(spike_time), spike_time_to_fr_inst(spike_time)
コード例 #3
0
ファイル: setup_test_data.py プロジェクト: yw5aj/PlosCompBiol
def setup_lif_model(data):
    data['group_gen_current'] = stress_to_group_current(
        data['fine_time'], data['fine_stress'], MC_GROUPS, **params)
    data['spike_time'] = lif_model.get_spikes(data['group_gen_current'])
コード例 #4
0
def setup_lif_model(data):
    data['group_gen_current'] = stress_to_group_current(
        data['fine_time'], data['fine_stress'], MC_GROUPS, **params)
    data['spike_time'] = lif_model.get_spikes(data['group_gen_current'])
コード例 #5
0
def stress_to_fr_inst(fine_time, fine_stress, groups, **params):
    group_gen_current = stress_to_group_current(fine_time, fine_stress, groups,
                                                **params)
    spike_time = get_spikes(group_gen_current)
    return np.array(spike_time), spike_time_to_fr_inst(spike_time)