Class | Metric |
Provides different metrics, used for mapping some field vector properties to some color and alpha range. |
Function | color_map_cyclic |
Maps normalized value to color, cyclic. |
Function | color_map_divergent |
Maps normalized value to color, divergent. |
Function | metric_divergence |
Calculates the divergence of a sampling volume neighborhood. |
Function | metric_norm |
Calculates the selected norm of some vector. |
Maps normalized value to color, cyclic.
Note: For JIT to work, this must be declared at the top level.
Parameters | |
color_normalized:float | Normalized color value |
Returns | |
np.ndarray | R, G, B |
Maps normalized value to color, divergent.
Note: For JIT to work, this must be declared at the top level.
Parameters | |
color_normalized:float | Normalized color value |
Returns | |
np.ndarray | R, G, B |
Calculates the divergence of a sampling volume neighborhood.
Note: For JIT to work, this must be declared at the top level.
Parameters | |
neighborhood_vectors:np.ndarray | Sampling volume neighborhood vectors (six 3D vectors) |
dL:float | Length element |
polarity:int | Polarity filter (-1: Keep values <= 0; 0: Keep all values; +1: Keep values >= 0) |
Returns | |
float | Undocumented |
Calculates the selected norm of some vector.
Note: For JIT to work, this must be declared at the top level.
Parameters | |
norm_type:int | Norm type |
vector:np.ndarray | 3D vector |
Returns | |
float | Scalar if successful, np.inf on error |