Skip to content

Commit

Permalink
Implement review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamRJensen committed Oct 28, 2024
1 parent 5b8391b commit 8a20782
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
7 changes: 3 additions & 4 deletions pvanalytics/quality/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
14 changes: 8 additions & 6 deletions pvanalytics/tests/quality/test_irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 8a20782

Please sign in to comment.