We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eef1992 commit 8d2650aCopy full SHA for 8d2650a
docs/sphinx/source/whatsnew/v0.4.6.rst
@@ -24,6 +24,12 @@ Documentation
24
~~~~~~~~~~~~~
25
26
27
+Testing
28
+~~~~~~~
29
+
30
+* Added explicit tests for aoi and aoi_projection functions.
31
32
33
Contributors
34
~~~~~~~~~~~~
35
pvlib/test/test_irradiance.py
@@ -422,3 +422,22 @@ def test_dni():
422
assert_series_equal(dni,
423
pd.Series([float('nan'), float('nan'), 573.685662283,
424
146.190220008, 573.685662283]))
425
426
427
+@pytest.mark.parametrize(
428
+ 'surface_tilt,surface_azimuth,solar_zenith,solar_azimuth,aoi_expected,aoi_proj_expected', [
429
+ (0, 0, 0, 0, 0, 1),
430
+ (30, 180, 30, 180, 0, 1),
431
+ (30, 180, 150, 0, 180, -1),
432
+ (90, 0, 30, 60, 75.5224878, 0.25),
433
+ (90, 0, 30, 170, 119.4987042, -0.4924038)])
434
+def test_aoi_and_aoi_projection(surface_tilt, surface_azimuth, solar_zenith,
435
+ solar_azimuth, aoi_expected,
436
+ aoi_proj_expected):
437
+ aoi = irradiance.aoi(surface_tilt, surface_azimuth, solar_zenith,
438
+ solar_azimuth)
439
+ assert_allclose(aoi, aoi_expected, atol=1e-6)
440
441
+ aoi_projection = irradiance.aoi_projection(
442
+ surface_tilt, surface_azimuth, solar_zenith, solar_azimuth)
443
+ assert_allclose(aoi_projection, aoi_proj_expected, atol=1e-6)
0 commit comments