class Metric(Validatable):
Static Method | boost_colors |
"Boosts" an array of color values. |
Method | __init__ |
Initializes an empty metric. |
Method | recalculate |
Recalculates color and alpha values for field. |
Method | set |
Sets the parameters. |
Class Variable | LengthScale |
Undocumented |
Class Variable | LogNormMin |
Undocumented |
Instance Variable | alpha_preset |
Undocumented |
Instance Variable | color_preset |
Undocumented |
Property | colors |
Returns calculated colors. |
Property | limits |
Returns calculated limits. |
Static Method | _divergence_worker |
Calculates the divergence values of a list of vectors. |
Static Method | _norm_worker |
Calculates the norm values of a list of vectors. |
Static Method | _normalize_worker |
Normalizes color and alpha norm values, populates final color values. |
Instance Variable | _colors |
Undocumented |
Instance Variable | _limits |
Undocumented |
Inherited from Validatable
:
Method | valid.setter |
|
Property | valid |
True if valid, False if invalid |
Instance Variable | _valid |
Undocumented |
Parameters | |
boost:float | Boost value |
direction:float | Boost direction |
colors:np.ndarray | Colors (ordered list of 4-tuples) |
Returns | |
np.ndarray | Colors (ordered list of 4-tuples) |
Initializes an empty metric.
This class holds a pair of metric presets. Using these metric presets, colors (including alpha channel) and field limits are calculated.
Parameters | |
sampling_volume:SamplingVolume | SamplingVolume |
field:Field | Field |
progress_callback:Callable | Progress callback |
Returns | |
bool | True (currently non-interruptable) |
Parameters | |
color_preset:Dict | Color metric preset (dictionary) |
alpha_preset:Dict | Alpha metric preset (dictionary) |
Parameters | |
sampling_volume_neighborhood_indices:List[ | Ordered list of sampling volume neighborhood indices |
vectors:np.ndarray | Ordered list of 3D vectors |
dL:int | Length element |
polarity:int | Polarity filter (-1: Keep values <= 0; 0: Keep all values; +1: Keep values >= 0) |
Returns | |
np.ndarray | Norm values |
Parameters | |
norm_type:int | Norm type |
vectors:np.ndarray | Ordered list of 3D vectors |
Returns | |
np.ndarray | Norm values |
Parameters | |
color_map_id:str | Color map ID |
color_is_log:bool | Selects logarithmic normalizer for color |
color_norm_values | Color norm values |
color_norm_min:float | Minimum color norm value |
color_norm_max:float | Maximum color norm value |
alpha_is_log:bool | Selects logarithmic normalizer for alpha |
alpha_norm_values:np.ndarray | Alpha norm values |
alpha_norm_min:float | Minimum alpha norm value |
alpha_norm_max:float | Maximum alpha norm value |
colors:np.ndarray | Color value list to populate (list of 4D vectors) |
Returns | |
np.ndarray | Color values (list of 4D vectors) |