number_time_points
The total number of available time steps on the underlying reader, when it is time-aware (for example, PVDReader).
Proxies TimeReader.number_time_points. Returns None if the reader is not time-aware.
Type
int | None
Example
from pyemsi import Plotter, examples
file_path = examples.transient_path()
p = Plotter(file_path)
p.set_scalar("B-Mag (T)")
p.set_block_visibility("4", False)
print(p.number_time_points) # 10
# Iterate over all time steps
for i in range(p.number_time_points):
p.set_active_time_point(i)
p.export(f"frame_{i:02d}.png")
See also
time_values— list all available time valuesactive_time_value— read the currently active time valueset_active_time_point()— activate a time step by indexset_active_time_value()— activate a time step by valuetime_point_value()— convert a time step index to its time value