Did I find the right examples for you? yes no

All Samples(22)  |  Call(20)  |  Derive(2)  |  Import(0)

src/n/i/nitime-0.4/doc/examples/grasshopper.py   nitime(Download)
spike_times = np.loadtxt(os.path.join(data_path, 'grasshopper_spike_times1.txt'))
 
spike_ev = ts.Events(spike_times, time_unit='us')
 
 
    stim_time_series.time_unit = 'ms'
 
    spike_ev = ts.Events(spike, time_unit='us')
    #Initialize the event-related analyzer
    event_related = tsa.EventRelatedAnalyzer(stim_time_series,

src/n/i/nitime-HEAD/doc/examples/grasshopper.py   nitime(Download)
spike_times = np.loadtxt(os.path.join(data_path, 'grasshopper_spike_times1.txt'))
 
spike_ev = ts.Events(spike_times, time_unit='us')
 
 
    stim_time_series.time_unit = 'ms'
 
    spike_ev = ts.Events(spike, time_unit='us')
    #Initialize the event-related analyzer
    event_related = tsa.EventRelatedAnalyzer(stim_time_series,

src/n/i/nitime-0.4/nitime/tests/test_timeseries.py   nitime(Download)
    for unit in [None, 's', 'ns', 'D']:
        # events with data
        ev1 = ts.Events(t, time_unit=unit, i=x, j=y, k=z)
 
        # events with indices
        ev2 = ts.Events(t, time_unit=unit, indices=[i0, i1])
 
        # events with indices and labels
        ev3 = ts.Events(t, time_unit=unit, labels=['trial', 'other'],
def test_Events_scalar():
    t = ts.TimeArray(1, time_unit='ms')
    i, j = 4, 5
    ev = ts.Events(t, i=i, j=j)
    # The semantics of scalar indexing into events are such that the returned
def test_masked_array_events():
    # make sure masked arrays passed in stay as masked arrays
    masked = np.ma.masked_invalid([0,np.nan,2])
    e = ts.Events([1,2,3], d=masked)
    npt.assert_equal(e.data['d'].mask, [False, True, False])

src/n/i/nitime-HEAD/nitime/tests/test_timeseries.py   nitime(Download)
    for unit in [None, 's', 'ns', 'D']:
        # events with data
        ev1 = ts.Events(t, time_unit=unit, i=x, j=y, k=z)
 
        # events with indices
        ev2 = ts.Events(t, time_unit=unit, indices=[i0, i1])
 
        # events with indices and labels
        ev3 = ts.Events(t, time_unit=unit, labels=['trial', 'other'],
def test_Events_scalar():
    t = ts.TimeArray(1, time_unit='ms')
    i, j = 4, 5
    ev = ts.Events(t, i=i, j=j)
    # The semantics of scalar indexing into events are such that the returned
def test_masked_array_events():
    # make sure masked arrays passed in stay as masked arrays
    masked = np.ma.masked_invalid([0,np.nan,2])
    e = ts.Events([1,2,3], d=masked)
    npt.assert_equal(e.data['d'].mask, [False, True, False])

src/n/i/nitime-0.4/nitime/tests/test_analysis.py   nitime(Download)
    # Input is an Events object, instead of a time-series:
    ts1 = ts.TimeSeries(np.arange(100), sampling_rate=1)
    ev = ts.Events([10, 20, 30])
    et = nta.EventRelatedAnalyzer(ts1, ev, 5)
 
    # The five points comprising the average of the three sequences:
    npt.assert_equal(et.eta.data, [20., 21., 22., 23., 24.])
 
    ts2 = ts.TimeSeries(np.arange(200).reshape(2, 100), sampling_rate=1)
    ev = ts.Events([10, 20, 30])

src/n/i/nitime-HEAD/nitime/tests/test_analysis.py   nitime(Download)
    # Input is an Events object, instead of a time-series:
    ts1 = ts.TimeSeries(np.arange(100), sampling_rate=1)
    ev = ts.Events([10, 20, 30])
    et = nta.EventRelatedAnalyzer(ts1, ev, 5)
 
    # The five points comprising the average of the three sequences:
    npt.assert_equal(et.eta.data, [20., 21., 22., 23., 24.])
 
    ts2 = ts.TimeSeries(np.arange(200).reshape(2, 100), sampling_rate=1)
    ev = ts.Events([10, 20, 30])