pvanalytics.quality.util.check_limits#
- pvanalytics.quality.util.check_limits(val, lower_bound=None, upper_bound=None, inclusive_lower=False, inclusive_upper=False)#
Check whether a value falls withing the given limits.
At least one of lower_bound or upper_bound must be provided.
- Parameters
val (array_like) – Values to test.
lower_bound (float, default None) – Lower limit.
upper_bound (float, default None) – Upper limit.
inclusive_lower (bool, default False) – Whether the lower bound is inclusive (val >= lower_bound).
inclusive_upper (bool, default False) – Whether the upper bound is inclusive (val <= upper_bound).
- Returns
True for every value in val that is between lower_bound and upper_bound.
- Return type
array_like
- Raises
ValueError – if lower_bound nor upper_bound is provided.
Notes
Copyright (c) 2019 SolarArbiter. See the file LICENSES/SOLARFORECASTARBITER_LICENSE at the top level directory of this distribution and at https://github.com/pvlib/pvanalytics/blob/master/LICENSES/SOLARFORECASTARBITER_LICENSE for more information.