Skip to content

Commit 0f2ccb1

Browse files
committed
Merge branch 'main' into development
2 parents f8add09 + 42288f7 commit 0f2ccb1

15 files changed

Lines changed: 47 additions & 28 deletions

bifacial_radiance/main.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
Pre-requisites:
1111
This software is written for Python >3.6 leveraging many Anaconda tools (e.g. pandas, numpy, etc)
1212
13-
*RADIANCE software should be installed from https://github.com/NatLabRockies/Radiance/releases
13+
*RADIANCE software should be installed from https://github.com/LBNL-ETA/Radiance/releases
1414
1515
*If you want to use gencumulativesky, move 'gencumulativesky.exe' from
1616
'bifacial_radiance/data' into your RADIANCE source directory.
@@ -332,9 +332,9 @@ def _make_reinhart_bands(M):
332332
with n_az*M azimuth patches and az_step/M degrees per patch.
333333
The zenith band (n_az==1) is left as a single patch regardless of M.
334334
335-
Patch counts: M=1 145, M=2 577 (= M²×144 + 1), M=4 2305.
335+
Patch counts: M=1 ? 145, M=2 ? 577 (= M²×144 + 1), M=4 ? 2305.
336336
"""
337-
# Tregenza M=1 base band structure used as the template for all M values
337+
# Tregenza M=1 base band structure — used as the template for all M values
338338
_TREGENZA_BANDS = [
339339
( 0, 12, 30, 12.0),
340340
(12, 24, 30, 12.0),
@@ -343,7 +343,7 @@ def _make_reinhart_bands(M):
343343
(48, 60, 18, 20.0),
344344
(60, 72, 12, 30.0),
345345
(72, 84, 6, 60.0),
346-
(84, 90, 1, 360.0), # zenith never subdivided
346+
(84, 90, 1, 360.0), # zenith — never subdivided
347347
]
348348

349349
bands = []
@@ -416,12 +416,12 @@ def _mtx_to_cal(patches, M=1, sky_path='skies', savefile='cumulative'):
416416
vals = sky_irr[patch_idx: patch_idx + n]
417417
patch_idx += n
418418

419-
if n == 1: # zenith no azimuth dependency
419+
if n == 1: # zenith — no azimuth dependency
420420
f.write(f"row{row_idx}=if(and(alt-{alt_lo}, {alt_hi}-alt),"
421421
f"{vals[0]:.6f},0);\n\n")
422422
else:
423423
# Append vals[0] at the end as wrap-around guard.
424-
# When az is near 360°, select() index reaches n+1; the repeated
424+
# When az is near 360°, select() index reaches n+1; the repeated
425425
# first value matches the genCumSky convention and avoids a
426426
# "select(): domain error" from rtrace.
427427
vals_wrap = list(vals) + [vals[0]]
@@ -2038,13 +2038,13 @@ def _count_wea_timesteps(weafile):
20382038

20392039
if debug:
20402040
print(f"Patches shape: {patches.shape} (should be (n_sky+1) x 3)")
2041-
print(f"Row 0 ground patch: {patches[0]} (expect equal R=G=B)")
2042-
print(f"Row 1 lowest sky: {patches[1]}")
2043-
print(f"Row 30 end of band 0: {patches[30]}")
2044-
print(f"Row 31 start band 1: {patches[31]}")
2045-
print(f"Row -1 zenith: {patches[-1]}")
2041+
print(f"Row 0 — ground patch: {patches[0]} (expect equal R=G=B)")
2042+
print(f"Row 1 — lowest sky: {patches[1]}")
2043+
print(f"Row 30 — end of band 0: {patches[30]}")
2044+
print(f"Row 31 — start band 1: {patches[31]}")
2045+
print(f"Row -1 — zenith: {patches[-1]}")
20462046
print(f"\nScalar irradiance range (sky patches only): "
2047-
f"{patches[1:].mean(axis=1).min():.2f} {patches[1:].mean(axis=1).max():.2f}")
2047+
f"{patches[1:].mean(axis=1).min():.2f} – {patches[1:].mean(axis=1).max():.2f}")
20482048
gendaymtx_total = patches[1:].mean(axis=1).sum()
20492049
n_sky = patches.shape[0] - 1
20502050
print(f"\nTotal cumulative sky irradiance (gendaymtx, {n_sky} patches): {gendaymtx_total:.1f}")
@@ -2083,8 +2083,8 @@ def _count_wea_timesteps(weafile):
20832083

20842084
def _cal_to_rad(self, sky_path='skies', savefile='cumulative'):
20852085
"""
2086-
Wrap a .cal file in a Radiance sky .rad description same template
2087-
as genCumSky() so it can be passed directly to demo.makeOct().
2086+
Wrap a .cal file in a Radiance sky .rad description — same template
2087+
as genCumSky() — so it can be passed directly to demo.makeOct().
20882088
Used inside genCumSky() when use_mtx=True.
20892089
20902090
Parameters

docs/sphinx/source/whatsnew.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ What's New
77
These are new features and improvements of note in each release.
88

99
.. include:: whatsnew/pending.rst
10+
.. include:: whatsnew/v0.5.2.rst
1011
.. include:: whatsnew/v0.5.1.rst
1112
.. include:: whatsnew/v0.5.0.rst
1213
.. include:: whatsnew/v0.4.4.rst
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. _whatsnew_052:
2+
3+
v0.5.2 (May 29, 2026)
4+
------------------------
5+
Bugfix release
6+
7+
8+
Bug fixes
9+
~~~~~~~~~
10+
* Change references that had been nrel.gov domain to nlr.gov domain.
11+
* Change Github references from github.com/nrel/ to github.com/NatLabRockies/
12+
13+
Documentation
14+
~~~~~~~~~~~~~~
15+
16+
Contributors
17+
~~~~~~~~~~~~
18+
* Chris Deline (:ghuser:`cdeline`)

docs/tutorials/13 - Modeling Modules with Glass.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
"\n",
219219
"***7. Annotate the image with convert***\n",
220220
"\n",
221-
" convert render.png -fill black -gravity South -annotate +0+5 'Created with NREL bifacial_radiance https://github.com/NREL/bifacial_radiance' render_annotated.png\n"
221+
" convert render.png -fill black -gravity South -annotate +0+5 'Created with NREL bifacial_radiance https://github.com/NatLabRockies/bifacial_radiance' render_annotated.png\n"
222222
]
223223
},
224224
{

docs/tutorials/13 - Modeling Modules with Glass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
#
133133
# ***7. Annotate the image with convert***
134134
#
135-
# convert render.png -fill black -gravity South -annotate +0+5 'Created with NREL bifacial_radiance https://github.com/NREL/bifacial_radiance' render_annotated.png
135+
# convert render.png -fill black -gravity South -annotate +0+5 'Created with NREL bifacial_radiance https://github.com/NatLabRockies/bifacial_radiance' render_annotated.png
136136
#
137137

138138
# In[4]:

docs/tutorials/2 - Single Axis Tracking Yearly Simulation.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"\n",
4141
"This procedure was presented in:\n",
4242
"\n",
43-
"Ayala Pelaez S, Deline C, Greenberg P, Stein JS, Kostuk RK. Model and validation of single-axis tracking with bifacial PV. IEEE J Photovoltaics. 2019;9(3):715–21. https://ieeexplore.ieee.org/document/8644027 and https://www.nrel.gov/docs/fy19osti/72039.pdf (pre-print, conference version)\n",
43+
"Ayala Pelaez S, Deline C, Greenberg P, Stein JS, Kostuk RK. Model and validation of single-axis tracking with bifacial PV. IEEE J Photovoltaics. 2019;9(3):715–21. https://ieeexplore.ieee.org/document/8644027 and https://www.nlr.gov/docs/fy19osti/72039.pdf (pre-print, conference version)\n",
4444
"\n",
4545
"\n",
4646
"***Steps:***\n",

docs/tutorials/2 - Single Axis Tracking Yearly Simulation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#
2424
# This procedure was presented in:
2525
#
26-
# Ayala Pelaez S, Deline C, Greenberg P, Stein JS, Kostuk RK. Model and validation of single-axis tracking with bifacial PV. IEEE J Photovoltaics. 2019;9(3):715–21. https://ieeexplore.ieee.org/document/8644027 and https://www.nrel.gov/docs/fy19osti/72039.pdf (pre-print, conference version)
26+
# Ayala Pelaez S, Deline C, Greenberg P, Stein JS, Kostuk RK. Model and validation of single-axis tracking with bifacial PV. IEEE J Photovoltaics. 2019;9(3):715–21. https://ieeexplore.ieee.org/document/8644027 and https://www.nlr.gov/docs/fy19osti/72039.pdf (pre-print, conference version)
2727
#
2828
#
2929
# ***Steps:***

docs/tutorials/21 - Weather to Module Performance.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"metadata": {},
109109
"outputs": [],
110110
"source": [
111-
"url = 'https://raw.githubusercontent.com/NREL/SAM/patch/deploy/libraries/CEC%20Modules.csv'\n",
111+
"url = 'https://raw.githubusercontent.com/NatLabRockies/SAM/patch/deploy/libraries/CEC%20Modules.csv'\n",
112112
"db = pd.read_csv(url, index_col=0) # Reading this might take 1 min or so, the database is big."
113113
]
114114
},

docs/tutorials/21 - Weather to Module Performance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
# In[4]:
5353

5454

55-
url = 'https://raw.githubusercontent.com/NREL/SAM/patch/deploy/libraries/CEC%20Modules.csv'
55+
url = 'https://raw.githubusercontent.com/NatLabRockies/SAM/patch/deploy/libraries/CEC%20Modules.csv'
5656
db = pd.read_csv(url, index_col=0) # Reading this might take 1 min or so, the database is big.
5757

5858

docs/tutorials/8 - Electrical Mismatch Method.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"\n",
4242
"* Deline, C., Ayala Pelaez, S., MacAlpine, S., Olalla, C. Estimating and Parameterizing Mismatch Power Loss in Bifacial Photovoltaic Systems. Progress in PV 2020, https://doi.org/10.1002/pip.3259\n",
4343
"\n",
44-
"* Deline C, Ayala Pelaez S, MacAlpine S, Olalla C. Bifacial PV System Mismatch Loss Estimation & Parameterization. Presented in: 36th EU PVSEC, Marseille Fr. Slides: https://www.nrel.gov/docs/fy19osti/74885.pdf. Proceedings: https://www.nrel.gov/docs/fy20osti/73541.pdf\n",
44+
"* Deline C, Ayala Pelaez S, MacAlpine S, Olalla C. Bifacial PV System Mismatch Loss Estimation & Parameterization. Presented in: 36th EU PVSEC, Marseille Fr. Slides: https://www.nlr.gov/docs/fy19osti/74885.pdf. Proceedings: https://www.nlr.gov/docs/fy20osti/73541.pdf\n",
4545
"\n",
46-
"* Ayala Pelaez S, Deline C, MacAlpine S, Olalla C. Bifacial PV system mismatch loss estimation. Poster presented at the 6th BifiPV Workshop, Amsterdam 2019. https://www.nrel.gov/docs/fy19osti/74831.pdf and http://bifipv-workshop.com/index.php?id=amsterdam-2019-program \n",
46+
"* Ayala Pelaez S, Deline C, MacAlpine S, Olalla C. Bifacial PV system mismatch loss estimation. Poster presented at the 6th BifiPV Workshop, Amsterdam 2019. https://www.nlr.gov/docs/fy19osti/74831.pdf and http://bifipv-workshop.com/index.php?id=amsterdam-2019-program \n",
4747
"\n",
4848
"Ideally **mismatch losses M** should be calculated for the whole year, and then the **mismatch loss factor to apply to Grear \"Lrear\"** required by due diligence softwares can be calculated:\n",
4949
"\n",

0 commit comments

Comments
 (0)