Skip to content

Commit

Permalink
adjust scan by 1/2 a cell when sensorsY is equal to numCellsy-1.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeline committed Oct 9, 2024
1 parent 334a638 commit c5bb3e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
22 changes: 17 additions & 5 deletions bifacial_radiance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4228,7 +4228,7 @@ def _checkSensors(sensors):

xstartfront = x1 + x2 + x3 + originx
xstartback = x1 + x2 + x4 + originx

ystartfront = y1 + y2 + y3 + originy
ystartback = y1 + y2 + y4 + originy

Expand Down Expand Up @@ -4291,10 +4291,22 @@ def _checkSensors(sensors):

firstsensorxstartfront = xstartfront+xinc_front
firstsensorxstartback = xstartback+xinc_back
firstsensorystartfront = ystartfront+yinc_front
firstsensorystartback = ystartback+yinc_back
firstsensorzstartfront = zstartfront + zinc_front
firstsensorzstartback = zstartback + zinc_back
# check to make sure sensorsy don't line up with gaps in between cellModule
if ((getattr(scene.module, 'cellModule', None)) and
(sensorsy_front == scene.module.cellModule.numcellsy-1)):
firstsensorystartfront = ystartfront+yinc_front/2
firstsensorzstartfront = zstartfront + zinc_front/2
else:
firstsensorystartfront = ystartfront+yinc_front
firstsensorzstartfront = zstartfront + zinc_front
if ((getattr(scene.module, 'cellModule', None)) and
(sensorsy_back == scene.module.cellModule.numcellsy-1)):
firstsensorystartback = ystartback+yinc_back/2
firstsensorzstartback = zstartback + zinc_back/2
else:
firstsensorystartback = ystartback+yinc_back
firstsensorzstartback = zstartback + zinc_back


## Correct positions for sensorsx other than 1
# TODO: At some point, this equations can include the case where
Expand Down
1 change: 1 addition & 0 deletions docs/sphinx/source/whatsnew/pending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Bug fixes
* Fixed a leap year bug in :py:func:`~bifacial_radiance.RadianceObj.readWeatherFile` that crashed if epwfiles are loaded that include leap year data (like Feb. 28 2020). (:issue:`552`)
* Bug fix in :py:func:`bifacial_radiance.load.cleanResult` that wouldn't work with files created when front and rear scan are different lengths. (:issue:`419`)
* GUI bug fixes where the sensorsy was not loading correctly, module .rad file was not being re-written, and an invalid default timestamp is used.
* Bug fix in :py:func:`bifacial_radiance.AnalysisObj.moduleAnalysis` when sensorsY equals numCellsy-1 and the scan lines up in the gaps between cells. shift scan by half a cell.

Documentation
~~~~~~~~~~~~~~
Expand Down

0 comments on commit c5bb3e5

Please sign in to comment.