StreamTracer#
- class streamtracer.StreamTracer(max_steps, step_size)#
Bases:
objectA streamline tracing class.
- Parameters:
max_steps (
int) – Number of steps available for each line. The maximum number of points on a single stream line ismax_steps.step_size (
float) – Step size as a the fraction of cell size.
Attributes Summary
Reason(s) of termination.
Number of steps available for each line.
List of the coordinates along each streamline.
Methods Summary
trace(seeds, grid[, direction])Trace streamlines.
Attributes Documentation
- ROT#
Reason(s) of termination.
Integer array with shape
len(xs)if traced in one direction, or(len(xs), 2)if traced in both directions. Can take the following values:-1: Encountered a NaN
1: Reached maximum available steps
2: Out of bounds
- max_steps#
Number of steps available for each line.
The maximum number of points on a single stream line is
max_steps.
- xs#
List of the coordinates along each streamline.
List of three-dimensional coordinates for each streamline. Each strealine coordinate has a shape
(n,3), wherencan, in principle, vary from one streamline to the next.
Methods Documentation
- trace(seeds, grid, direction=0)#
Trace streamlines.
This traces streamlines from a series of seeds, through a vector field.
- Parameters:
seeds (array-like with shape
(n, 3)) – Seed points.grid (
VectorGrid) – Grid of field vectors.direction (
int, optional) – Integration direction.0for both directions,1for forward, or-1for backwards.