From 8a20782bd8d7728e7179727cd3d1da83d8d422af Mon Sep 17 00:00:00 2001 From: "Adam R. Jensen" <39184289+AdamRJensen@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:39:16 +0100 Subject: [PATCH] Implement review feedback --- pvanalytics/quality/irradiance.py | 7 +++---- pvanalytics/tests/quality/test_irradiance.py | 14 ++++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pvanalytics/quality/irradiance.py b/pvanalytics/quality/irradiance.py index 3d796766..9f2a198b 100644 --- a/pvanalytics/quality/irradiance.py +++ b/pvanalytics/quality/irradiance.py @@ -230,7 +230,7 @@ def check_irradiance_limits_qcrad(solar_zenith, dni_extra, ghi=None, dhi=None, limits : {'physical', 'extreme'} or dict, default 'physical' If string, must be either 'physical' or 'extreme', corresponding to the QCRAD QC limits. If dict, must have keys: - + * 'ghi_ub', 'dhi_ub', 'dni_ub': dicts with keys {'mult', 'exp', 'min'} and float values. * 'ghi_lb', 'dhi_lb', 'dni_lb': float values. @@ -261,7 +261,7 @@ def check_irradiance_limits_qcrad(solar_zenith, dni_extra, ghi=None, dhi=None, .. [2] C. N. Long and E. G. Dutton, "BSRN Global Network recommended QC tests, V2.0," Baseline Surface Radiation Network (BSRN), Accessed: Oct. 24, 2024. [Online.] Available: - <https://bsrn.awi.de/fileadmin/user_upload/bsrn.awi.de/Publications/BSRN_recommended_QC_tests_V2.pdf>_ + `<https://bsrn.awi.de/fileadmin/user_upload/bsrn.awi.de/Publications/BSRN_recommended_QC_tests_V2.pdf>`_ """ # noqa: E501 if limits == 'physical': limits = QCRAD_LIMITS_PHYSICAL @@ -316,8 +316,7 @@ def check_irradiance_consistency_qcrad(solar_zenith, ghi, dhi, dni, param=None, outside_domain=False): r"""Check consistency of GHI, DHI and DNI using QCRad criteria. - Uses criteria given in [1]_, [2]_ to validate the ratio of irradiance - components. + Uses criteria given in [1]_ to validate the ratio of irradiance components. .. warning:: Not valid for night time or low irradiance. When the input data fall outside the test domain, the returned value is set by the diff --git a/pvanalytics/tests/quality/test_irradiance.py b/pvanalytics/tests/quality/test_irradiance.py index e6203d98..8d3ba212 100644 --- a/pvanalytics/tests/quality/test_irradiance.py +++ b/pvanalytics/tests/quality/test_irradiance.py @@ -51,17 +51,19 @@ def irradiance_qcrad(): data=np.array([[-100, 100, 100, 30, 1370, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1], # noqa: E501 [100, -100, 100, 30, 1370, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0], # noqa: E501 [100, 100, -100, 30, 1370, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1], # noqa: E501 - [1000, 100, 900, 0, 1370, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # noqa: E501 + [1000, 100, 900, 0, 1370, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1000, 200, 800, 15, 1370, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], # noqa: E501 [1000, 200, 800, 60, 1370, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1], # noqa: E501 [1000, 300, 850, 80, 1370, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1], # noqa: E501 [1000, 500, 800, 90, 1370, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1], # noqa: E501 - [500, 100, 1100, 0, 1370, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1], # noqa: E501 + [500, 100, 1100, 0, 1370, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1000, 300, 1200, 0, 1370, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1], # noqa: E501 - [500, 600, 100, 60, 1370, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0], # noqa: E501 - [500, 600, 400, 80, 1370, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0], # noqa: E501 - [500, 500, 300, 80, 1370, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1], # noqa: E501 - [0, 0, 0, 93, 1370, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1]])) # noqa: E501 + [500, 600, 100, 60, 1370, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0], + [500, 600, 400, 80, 1370, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0], + [500, 500, 300, 80, 1370, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1], + [0, 0, 0, 93, 1370, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1], + [100, 100, 0, 95, 1370, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1] + ])) dtypes = ['float64', 'float64', 'float64', 'float64', 'float64', 'bool', 'bool', 'bool', 'bool', 'bool', 'bool', 'bool', 'bool', 'bool', 'bool']