Skip to main content

time_point_value()

Returns the time value for a given time step index.

Delegates to TimeReader.time_point_value() on the underlying reader.

If the current reader is not time-aware, this returns None.

Parameters
  • time_point (int) — Zero-based time step index. Supports Python negative indexing: 0 is the first step, -1 is the last, -2 the second-to-last, and so on.
Returns
  • float | None — The corresponding time value, or None if the reader is not time-aware.

Example

from pyemsi import Plotter, examples

file_path = examples.transient_path()
p = Plotter(file_path)

print(p.time_point_value(0)) # 0.01 (first time step)
print(p.time_point_value(-1)) # 0.1 (last time step)
print(p.time_point_value(-2)) # 0.09 (second-to-last)

See also