pyart.filters.GateFilter#

class pyart.filters.GateFilter(radar, exclude_based=True)[source]#

A class for building a boolean arrays for filtering gates based on a set of condition typically based on the values in the radar fields. These filter can be used in various algorithms and calculations within Py-ART.

See pyart.correct.GateFilter.exclude_below() for method parameter details.

Parameters:
  • radar (Radar) – Radar object from which gate filter will be build.

  • exclude_based (bool, optional) – True, the default and suggested method, will begin with all gates included and then use the exclude methods to exclude gates based on conditions. False will begin with all gates excluded from which a set of gates to include should be set using the include methods.

Variables:
  • gate_excluded (array, dtype=bool) – Boolean array indicating if a gate should be excluded from a calculation. Elements marked True indicate the corresponding gate should be excluded. Those marked False should be included. This is read-only attribute, any changes to the array will NOT be reflected in gate_included and will be lost when the attribute is accessed again.

  • gate_included (array, dtype=bool) – Boolean array indicating if a gate should be included in a calculation. Elements marked True indicate the corresponding gate should be include. Those marked False should be excluded. This is read-only attribute, any changes to the array will NOT be reflected in gate_excluded and will be lost when the attribute is accessed again.

Examples

>>> import pyart
>>> radar = pyart.io.read('radar_file.nc')
>>> gatefilter = pyart.correct.GateFilter(radar)
>>> gatefilter.exclude_below('reflectivity', 10)
>>> gatefilter.exclude_below('normalized_coherent_power', 0.75)

initialize

copy()

Return a copy of the gatefilter.

exclude_above(field, value[, ...])

Exclude gates where a given field is above a given value.

exclude_all()

Exclude all gates.

exclude_below(field, value[, ...])

Exclude gates where a given field is below a given value.

exclude_equal(field, value[, exclude_masked, op])

Exclude gates where a given field is equal to a value.

exclude_gates(mask[, exclude_masked, op])

Exclude gates where a given mask is equal True.

exclude_inside(field, v1, v2[, ...])

Exclude gates where a given field is inside a given interval.

exclude_invalid(field[, exclude_masked, op])

Exclude gates where an invalid value occurs in a field (NaNs or infs).

exclude_masked(field[, exclude_masked, op])

Exclude gates where a given field is masked.

exclude_none()

Exclude no gates, include all gates.

exclude_not_equal(field, value[, ...])

Exclude gates where a given field is not equal to a value.

exclude_outside(field, v1, v2[, ...])

Exclude gates where a given field is outside a given interval.

exclude_transition([trans_value, ...])

Exclude all gates in rays marked as in transition between sweeps.

include_above(field, value[, ...])

Include gates where a given field is above a given value.

include_all()

Include all gates.

include_below(field, value[, ...])

Include gates where a given field is below a given value.

include_equal(field, value[, exclude_masked, op])

Include gates where a given field is equal to a value.

include_gates(mask[, exclude_masked, op])

Include gates where a given mask is equal True.

include_inside(field, v1, v2[, ...])

Include gates where a given field is inside a given interval.

include_none()

Include no gates, exclude all gates.

include_not_equal(field, value[, ...])

Include gates where a given field is not equal to a value.

include_not_masked(field[, exclude_masked, op])

Include gates where a given field in not masked.

include_not_transition([trans_value, ...])

Include all gates in rays not marked as in transition between sweeps.

include_outside(field, v1, v2[, ...])

Include gates where a given field is outside a given interval.

include_valid(field[, exclude_masked, op])

Include gates where a valid value occurs in a field (not NaN or inf).

gate_excluded

Return a copy of the excluded gates.

gate_included

Return a copy of the included gates.