foehnix.
foehnix_filter
(x, filter_method=None, cols=None)[source]¶Evaluates Data Filter Rules for foehnix Mixture Model Calls
foehnix.Foehnix
models allow to specify an optional
foehnix.foehnix_filter()
. If a filter is given only a subset of
the data set provided to foehnix.Foehnix
is used for the foehn
classification.
A typical example is a wind direction filter such that only observations (times) are used where the observed wind direction was within a user defined wind sector corresponding to the wind direction during foehn events for a specific location.
However, the filter option allows to even implement complex filter rules if required. The ‘Details’ section contains further information and examples how this filter rules can be used.
The most common filter rule: The filter is a dict where the dict-keys are column-names of the DataFrame x. The dict-values are lists of length 2 and define the range which should be used to filter the data. Example:
filter_method = {‘dd’: [43, 223]}
This will keep all wind directions dd between 43 and 223 degrees
The dict can contain several items to filter, e.g. to also limit the wind direction range at a crest station. Example:
filter_method = {‘dd’: [43, 223], ‘dd_crest’: [90, 270]}
Parameters: |
|
---|---|
Returns: |
|