Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/NREL/bifacial_radiance
Browse files Browse the repository at this point in the history
… into development
  • Loading branch information
cdeline committed Mar 15, 2023
2 parents d390396 + a6d1b05 commit f02bce5
Show file tree
Hide file tree
Showing 30 changed files with 165 additions and 95,042 deletions.
25 changes: 10 additions & 15 deletions docs/tutorials/11 - AgriPV Systems.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@
"\n",
"These journal outlines 4 useful uses of bifacial_radiance and some tricks: \n",
"\n",
"<ul>\n",
" <li> Creating the modules in the AgriPV site </li>\n",
" <li> Adding extra geometry for the pillars/posts supporting the AgriPV site </li>\n",
" <li> Hacking the sensors to sample the ground irradiance and create irradiance map </li>\n",
" <li> Adding object to simulate variations in ground albedo from different crops between rows. </li>\n",
"</ul>\n",
"* Creating the modules in the AgriPV site\n",
"* Adding extra geometry for the pillars/posts supporting the AgriPV site\n",
"* Hacking the sensors to sample the ground irradiance and create irradiance map\n",
"* Adding object to simulate variations in ground albedo from different crops between rows.\n",
"\n",
"\n",
"#### Steps:\n",
"\n",
"<ol>\n",
" <li> <a href='#step1'> Generate the geometry </a></li>\n",
" <li> <a href='#step2'> Analyse the Ground Irradiance </a></li>\n",
" <li> <a href='#step3'> Analyse and MAP the Ground Irradiance </a></li>\n",
" <li> <a href='#step4'> Adding different Albedo Section </a></li>\n",
"</ol>\n",
"1. <a href='#step1'> Generate the geometry </a>\n",
"2. <a href='#step2'> Analyse the Ground Irradiance </a>\n",
"3. <a href='#step3'> Analyse and MAP the Ground Irradiance </a>\n",
"4. <a href='#step4'> Adding different Albedo Section </a>\n",
" \n",
"#### Preview of what we will create: \n",
" \n",
Expand Down Expand Up @@ -198,7 +194,7 @@
"source": [
"If desired, you can view the Oct file at this point:\n",
"\n",
"### rvu -vf views\\front.vp -e .01 tutorial_11.oct\n"
"***rvu -vf views\\front.vp -e .01 tutorial_11.oct***"
]
},
{
Expand Down Expand Up @@ -316,7 +312,7 @@
"source": [
"### View the geometry with the posts on :\n",
"\n",
"#### rvu -vf views\\front.vp -e .01 -pe 0.4 -vp 12 -10 3.5 -vd -0.0995 0.9950 0.0 tutorial_11.oct\n",
"***rvu -vf views\\front.vp -e .01 -pe 0.4 -vp 12 -10 3.5 -vd -0.0995 0.9950 0.0 tutorial_11.oct***\n",
"\n"
]
},
Expand Down Expand Up @@ -1068,7 +1064,6 @@
}
],
"metadata": {
"celltoolbar": "Tags",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
Expand Down
25 changes: 10 additions & 15 deletions docs/tutorials/11 - AgriPV Systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,18 @@
#
# These journal outlines 4 useful uses of bifacial_radiance and some tricks:
#
# <ul>
# <li> Creating the modules in the AgriPV site </li>
# <li> Adding extra geometry for the pillars/posts supporting the AgriPV site </li>
# <li> Hacking the sensors to sample the ground irradiance and create irradiance map </li>
# <li> Adding object to simulate variations in ground albedo from different crops between rows. </li>
# </ul>
# * Creating the modules in the AgriPV site
# * Adding extra geometry for the pillars/posts supporting the AgriPV site
# * Hacking the sensors to sample the ground irradiance and create irradiance map
# * Adding object to simulate variations in ground albedo from different crops between rows.
#
#
# #### Steps:
#
# <ol>
# <li> <a href='#step1'> Generate the geometry </a></li>
# <li> <a href='#step2'> Analyse the Ground Irradiance </a></li>
# <li> <a href='#step3'> Analyse and MAP the Ground Irradiance </a></li>
# <li> <a href='#step4'> Adding different Albedo Section </a></li>
# </ol>
# 1. <a href='#step1'> Generate the geometry </a>
# 2. <a href='#step2'> Analyse the Ground Irradiance </a>
# 3. <a href='#step3'> Analyse and MAP the Ground Irradiance </a>
# 4. <a href='#step4'> Adding different Albedo Section </a>
#
# #### Preview of what we will create:
#
Expand Down Expand Up @@ -136,8 +132,7 @@

# If desired, you can view the Oct file at this point:
#
# ### rvu -vf views\front.vp -e .01 tutorial_11.oct
#
# ***rvu -vf views\front.vp -e .01 tutorial_11.oct***

# In[6]:

Expand Down Expand Up @@ -209,7 +204,7 @@

# ### View the geometry with the posts on :
#
# #### rvu -vf views\front.vp -e .01 -pe 0.4 -vp 12 -10 3.5 -vd -0.0995 0.9950 0.0 tutorial_11.oct
# ***rvu -vf views\front.vp -e .01 -pe 0.4 -vp 12 -10 3.5 -vd -0.0995 0.9950 0.0 tutorial_11.oct***
#
#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"#### First, here is a complicated way to find the maximum of all arrays so all heatmaps are referenced to that value"
"First, here is a complicated way to find the maximum of all arrays so all heatmaps are referenced to that value"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/12 - AgriPV Clearance Height Evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@

# ## 3. Plot Heatmaps of the Ground Irradiance

# #### First, here is a complicated way to find the maximum of all arrays so all heatmaps are referenced to that value
# First, here is a complicated way to find the maximum of all arrays so all heatmaps are referenced to that value

# In[16]:

Expand Down
19 changes: 10 additions & 9 deletions docs/tutorials/13 - Modeling Modules with Glass.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Modeling example with glass"
"## Modeling example with glass"
]
},
{
Expand Down Expand Up @@ -164,39 +164,41 @@
" rvu -> rpict -> pcond -> pfilt -> ra_tiff -> convert\n",
"\n",
"In detail:\n",
"##### 1.\tUse rvu to view the oct file. \n",
"\n",
"***1. Use rvu to view the oct file***\n",
"\n",
" rvu 1axis_07_01_08.oct \n",
"\n",
"Use aim and origin to move around, zoom in/out, etc. Save a view file with view render.\n",
"\n",
"##### 2.\tRun rpict to render the image to hdr. \n",
"***2. Run rpict to render the image to hdr***\n",
"\n",
"This is the time consuming step. It takes between 1 and 3 hours depending on how complex the geometry is.\n",
"\n",
" rpict -x 4800 -y 4800 -i -ps 1 -dp 530 -ar 964 -ds 0.016 -dj 1 -dt 0.03 -dc 0.9 -dr 5 -st 0.12 -ab 5 -aa 0.11 -ad 5800 -as 5800 -av 25 25 25 -lr 14 -lw 0.0002 -vf render.vf bifacial_example.oct > render.hdr\n",
"\n",
"\n",
"##### 3.\tRun pcond to mimic human visual response\n",
"***3. Run pcond to mimic human visual response***\n",
"\n",
" pcond -h render.hdr > render.pcond.hdr\n",
"\n",
"\n",
"##### 4.\tResize and adjust exposure with pfilt\n",
"***4. Resize and adjust exposure with pfilt***\n",
"\n",
" pfilt -e +0.2 -x /4 -y /4 render.pcond.hdr > render.pcond.pfilt.hdr\n",
"\n",
"\n",
"##### 5.\tConvert hdr to tif\n",
"***5. Convert hdr to tif***\n",
"\n",
" ra_tiff render.pcond.pfilt.hdr render.tif\n",
"\n",
"\n",
"##### 6.\tConvert tif to png with imagemagick convert utility\n",
"***6. Convert tif to png with imagemagick convert utility***\n",
"\n",
" convert render.tif render.png\n",
"\n",
"\n",
"##### 7.\tAnnotate the image with convert\n",
"***7. Annotate the image with convert***\n",
"\n",
" 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"
]
Expand Down Expand Up @@ -621,7 +623,6 @@
}
],
"metadata": {
"celltoolbar": "Tags",
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
Expand Down
18 changes: 10 additions & 8 deletions docs/tutorials/13 - Modeling Modules with Glass.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
demo.gendaylit(8) # January 1 4pm (timepoint # 8)\


# ### Modeling example with glass
# ## Modeling example with glass

# In[3]:

Expand Down Expand Up @@ -83,39 +83,41 @@
# rvu -> rpict -> pcond -> pfilt -> ra_tiff -> convert
#
# In detail:
# ##### 1. Use rvu to view the oct file.
#
# ***1. Use rvu to view the oct file***
#
# rvu 1axis_07_01_08.oct
#
# Use aim and origin to move around, zoom in/out, etc. Save a view file with view render.
#
# ##### 2. Run rpict to render the image to hdr.
# ***2. Run rpict to render the image to hdr***
#
# This is the time consuming step. It takes between 1 and 3 hours depending on how complex the geometry is.
#
# rpict -x 4800 -y 4800 -i -ps 1 -dp 530 -ar 964 -ds 0.016 -dj 1 -dt 0.03 -dc 0.9 -dr 5 -st 0.12 -ab 5 -aa 0.11 -ad 5800 -as 5800 -av 25 25 25 -lr 14 -lw 0.0002 -vf render.vf bifacial_example.oct > render.hdr
#
#
# ##### 3. Run pcond to mimic human visual response
# ***3. Run pcond to mimic human visual response***
#
# pcond -h render.hdr > render.pcond.hdr
#
#
# ##### 4. Resize and adjust exposure with pfilt
# ***4. Resize and adjust exposure with pfilt***
#
# pfilt -e +0.2 -x /4 -y /4 render.pcond.hdr > render.pcond.pfilt.hdr
#
#
# ##### 5. Convert hdr to tif
# ***5. Convert hdr to tif***
#
# ra_tiff render.pcond.pfilt.hdr render.tif
#
#
# ##### 6. Convert tif to png with imagemagick convert utility
# ***6. Convert tif to png with imagemagick convert utility***
#
# convert render.tif render.png
#
#
# ##### 7. Annotate the image with convert
# ***7. Annotate the image with convert***
#
# convert render.png -fill black -gravity South -annotate +0+5 'Created with NREL bifacial_radiance https://github.com/NREL/bifacial_radiance' render_annotated.png
#
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/14 - Cement Racking Albedo Improvements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1535,9 +1535,8 @@
}
],
"metadata": {
"celltoolbar": "Tags",
"kernelspec": {
"display_name": "Python 3.8.5 ('base')",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/14 - Cement Racking Albedo Improvements.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
timeindex = metdata.datetime.index(pd.to_datetime('2021-06-17 12:0:0 -8')) # Davis, CA is TZ -8
demo.gendaylit(timeindex)

tilt = demo.getSingleTimestampTrackerAngle(metdata, timeindex=timeindex, gcr=gcr,
tilt = demo.getSingleTimestampTrackerAngle(timeindex=timeindex, gcr=gcr,
azimuth=180, axis_tilt=0,
limit_angle=60, backtrack=True)
# create a scene with all the variables
Expand Down Expand Up @@ -135,7 +135,7 @@
for timess in range (starttimeindex, endtimeindex):
j+=1
demo.gendaylit(timess)
tilt = demo.getSingleTimestampTrackerAngle(metdata, timeindex=timess, gcr=gcr,
tilt = demo.getSingleTimestampTrackerAngle(metdata=metdata, timeindex=timess, gcr=gcr,
azimuth=180, axis_tilt=0,
limit_angle=60, backtrack=True)
# create a scene with all the variables
Expand All @@ -153,7 +153,7 @@


demo.gendaylit(timeindex)
tilt = demo.getSingleTimestampTrackerAngle(metdata, timeindex=timeindex, gcr=gcr,
tilt = demo.getSingleTimestampTrackerAngle(metdata=metdata, timeindex=timeindex, gcr=gcr,
azimuth=180, axis_tilt=0,
limit_angle=60, backtrack=True)
# create a scene with all the variables
Expand Down Expand Up @@ -233,7 +233,7 @@
for timess in range (starttimeindex, endtimeindex):
j+=1
demo.gendaylit(timess)
tilt = demo.getSingleTimestampTrackerAngle(metdata, timeindex=timess, gcr=gcr,
tilt = demo.getSingleTimestampTrackerAngle(metdata=metdata, timeindex=timess, gcr=gcr,
azimuth=180, axis_tilt=0,
limit_angle=60, backtrack=True)
# create a scene with all the variables
Expand Down
18 changes: 7 additions & 11 deletions docs/tutorials/15 - New Functionalities Examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@
"\n",
"This journal includes short examples on how to use the new functionalities of version 0.4.0 of bifacial_radiance. The parts are:\n",
"\n",
"<ol type=\"I\">\n",
" <li> <a href='#functionality1'> Simulating Modules with Frames and Omegas </a> </li>\n",
" <li> <a href='#functionality2'> Improvements to irradiance sampling</a></li>\n",
" <ul>\n",
" <li> -Scanning full module (sensors on x)! </li>\n",
" <li> -Different points in the front and the back</li>\n",
" </ul>\n",
" <li> <a href='#functionality3'> Full row scanning.</a> </li>\n",
"</ol>"
"1. <a href='#functionality1'> Simulating Modules with Frames and Omegas </a>\n",
"2. <a href='#functionality2'> Improvements to irradiance sampling</a>\n",
" * Scanning full module (sensors on x)!\n",
" * Different points in the front and the back\n",
"3. <a href='#functionality3'> Full row scanning.</a>"
]
},
{
Expand Down Expand Up @@ -329,7 +325,7 @@
"id": "0ea6414f",
"metadata": {},
"source": [
"#### Same sensors front and back, two sensors accross x"
"### Same sensors front and back, two sensors accross x"
]
},
{
Expand Down Expand Up @@ -386,7 +382,7 @@
"id": "687132bd",
"metadata": {},
"source": [
"#### Different sensors front and back, two sensors accross x"
"### Different sensors front and back, two sensors accross x"
]
},
{
Expand Down
18 changes: 7 additions & 11 deletions docs/tutorials/15 - New Functionalities Examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@
#
# This journal includes short examples on how to use the new functionalities of version 0.4.0 of bifacial_radiance. The parts are:
#
# <ol type="I">
# <li> <a href='#functionality1'> Simulating Modules with Frames and Omegas </a> </li>
# <li> <a href='#functionality2'> Improvements to irradiance sampling</a></li>
# <ul>
# <li> -Scanning full module (sensors on x)! </li>
# <li> -Different points in the front and the back</li>
# </ul>
# <li> <a href='#functionality3'> Full row scanning.</a> </li>
# </ol>
# 1. <a href='#functionality1'> Simulating Modules with Frames and Omegas </a>
# 2. <a href='#functionality2'> Improvements to irradiance sampling</a>
# * Scanning full module (sensors on x)!
# * Different points in the front and the back
# 3. <a href='#functionality3'> Full row scanning.</a>

# In[1]:

Expand Down Expand Up @@ -156,7 +152,7 @@
analysis = bifacial_radiance.AnalysisObj() # return an analysis object including the scan dimensions for back irradiance


# #### Same sensors front and back, two sensors accross x
# ### Same sensors front and back, two sensors accross x

# In[8]:

Expand All @@ -179,7 +175,7 @@
print('\n', bifacial_radiance.load.read1Result('results\irr_'+name+'.csv'))


# #### Different sensors front and back, two sensors accross x
# ### Different sensors front and back, two sensors accross x

# In[9]:

Expand Down

0 comments on commit f02bce5

Please sign in to comment.