From 5c6e0d1015399d0245db8b5b3a580f3b1c1fb19f Mon Sep 17 00:00:00 2001 From: cdeline Date: Thu, 3 Oct 2024 19:35:06 -0600 Subject: [PATCH] change analyzeRow defaults to sensorsy=9 and sensorsx=1 --- bifacial_radiance/main.py | 2 +- docs/sphinx/source/whatsnew/v0.5.0.rst | 3 ++- tests/test_bifacial_radiance.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bifacial_radiance/main.py b/bifacial_radiance/main.py index d5b74fa9..22955af0 100644 --- a/bifacial_radiance/main.py +++ b/bifacial_radiance/main.py @@ -5267,7 +5267,7 @@ def groundAnalysis(self, scene, modWanted=None, rowWanted=None, return groundscan def analyzeRow(self, octfile, scene, rowWanted=None, name=None, - sensorsy=None, sensorsx=None ): + sensorsy=9, sensorsx=1 ): ''' Function to Analyze every module in the row. diff --git a/docs/sphinx/source/whatsnew/v0.5.0.rst b/docs/sphinx/source/whatsnew/v0.5.0.rst index 293df991..cf2775ef 100644 --- a/docs/sphinx/source/whatsnew/v0.5.0.rst +++ b/docs/sphinx/source/whatsnew/v0.5.0.rst @@ -42,7 +42,8 @@ Bug fixes * Updated Github Actions to use Node20: checkout@v4, setup-python@v5, coactions/setup-xvfb, setup-buildx-action@v3 (:pull:`517`) * Fix PerformanceWarning and SettingWithCopyWarning (:issue:`515`) * Fix error where rearX, rearY, rearZ parameters are not properly saved (:issue:`501`) -* More appropriate significant digits saved and displayed. (this changed some x,y,z values by < .003 due to rounding differences.) +* More appropriate significant digits saved and displayed. (this changed some x,y,z values by < .003 due to rounding differences.) (:pull:`558`) +* :py:func:`bifacial_radiance.AnalysisObj.analyzeRow` default values changed for `sensorsy` and `sensorsx` from `None` to 9 and 1, respectively (:pull:`558`) Documentation ~~~~~~~~~~~~~~ diff --git a/tests/test_bifacial_radiance.py b/tests/test_bifacial_radiance.py index e5b040a6..f1f01a55 100644 --- a/tests/test_bifacial_radiance.py +++ b/tests/test_bifacial_radiance.py @@ -472,7 +472,8 @@ def test_analyzeRow(): assert (analysis.__printval__('x')[2] == 0) & (analysis.x[2] == 0) assert any( analysis.__printval__('Wm2Front') != analysis.Wm2Front) temp = analysis.__repr__() # does the repr compile at all? - + assert analysis.rearX == pytest.approx([0.25, 0, -0.25]) + assert analysis.x == pytest.approx([.333, .167, 0, -.167, -.333], abs=.001) def test_addMaterialGroundRad(): # test addMaterialGroundRad. requires metdata for boulder.