scalar_range_filter
ScalarRangeFilter
Bases: DataFilter
A data filter to constrain the data to a range. Values outside the range are
marking_val = marking_val
instance-attribute
max_threshold = max_threshold
instance-attribute
min_threshold = min_threshold
instance-attribute
__init__(min_threshold=None, max_threshold=None, marking_val=None)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
min_threshold |
float
|
The lower bound of the selected range (inclusive). |
None
|
max_threshold |
float
|
The upper bound of the selected range (inclusive). |
None
|
marking_val |
float
|
If a marking value is passed, all values outside the selected range are marked with said value (e.g. NaN, -1, etc.). |
None
|
apply(scalars)
Apply the filter to remove or mark any values outside the selected range.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scalars |
ndarray
|
array of scalars |
required |
Returns:
| Name | Type | Description |
|---|---|---|
scalars |
ndarray
|
updated array of scalars |