def test_spikecount_libv4peakindices(): """basic: Test Spikecount in combination with LibV4 peak_indices""" import efel efel.reset() stim_start = 500.0 stim_end = 900.0 time = efel.io.load_fragment('%s#col=1' % meanfrequency1_url) voltage = efel.io.load_fragment('%s#col=2' % meanfrequency1_url) trace = {} trace['T'] = time trace['V'] = voltage trace['stim_start'] = [stim_start] trace['stim_end'] = [stim_end] features = ['peak_indices', 'Spikecount'] test_peak = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'DependencyV5_LibV4peakindices.txt') efel.setDependencyFileLocation(test_peak) feature_values = \ efel.getFeatureValues( [trace], features) peak_indices = feature_values[0]['peak_indices'] spikecount = feature_values[0]['Spikecount'][0] nt.assert_equal(len(peak_indices), 5) nt.assert_equal(len(peak_indices), spikecount)
def test_spikecount_libv4peakindices(): """basic: Test Spikecount in combination with LibV4 peak_indices""" import efel efel.reset() import numpy stim_start = 500.0 stim_end = 900.0 data = numpy.loadtxt(joinp(testdata_dir, 'basic', 'mean_frequency_1.txt')) time = data[:, 0] voltage = data[:, 1] trace = {} trace['T'] = time trace['V'] = voltage trace['stim_start'] = [stim_start] trace['stim_end'] = [stim_end] features = ['peak_indices', 'Spikecount'] test_peak = joinp(os.path.dirname(os.path.abspath(__file__)), 'DependencyV5_LibV4peakindices.txt') efel.setDependencyFileLocation(test_peak) feature_values = \ efel.getFeatureValues( [trace], features) peak_indices = feature_values[0]['peak_indices'] spikecount = feature_values[0]['Spikecount'][0] nt.assert_equal(len(peak_indices), 5) nt.assert_equal(len(peak_indices), spikecount)