arim.core.Time#

class arim.core.Time(start, step, num, dtype=None)[source]#

Bases: object

Linearly spaced time vector.

Parameters:
  • samples (ndarray)

  • start (float) – Start time (second)

  • step (float) – Time step (second)

  • num (int) – Number of samples

  • dtype (numpy.dtype)

samples#

Time vector

Type:

ndarray

start#
Type:

float

end#
Type:

float

step#
Type:

float

Notes

Use len() to get the number of samples.

closest_index(time)[source]#
classmethod from_vect(timevect, rtol=0.01)[source]#

Construct a time object from a linearly spaced time vector. Check that the vector is linearly spaced (tolerance: all steps must be within ± 1e-3 times the average step).

Parameters:
  • timevect (array-like) – Linearly spaced array

  • rtol (float) – Relative tolerance for the steps. Cf numpy.allclose

Raises:

ValueError

window(tmin=None, tmax=None, endpoint_left=True, endpoint_right=True)[source]#

Return a slice which selects the points [tmin, tmax].

property end#
property samples#
property start#
property step#