Skip to content

Commit 0f16296

Browse files
authored
Merge pull request #252 from NREL/0333_release
034 release
2 parents 7c37e93 + 66f3d3f commit 0f16296

File tree

66 files changed

+6194
-2786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+6194
-2786
lines changed

.travis.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ sudo: false
33
language: python
44

55
python:
6-
- "2.7"
7-
- "3.6"
6+
# - "3.6"
7+
- "3.7"
88

99
# Test two environments:
1010
# 1) dependencies with pinned versions from requirements.txt
1111
# 2) 'pip install --upgrade --upgrade-strategy=eager .' to install upgraded
1212
# dependencies from PyPi using version ranges defined within setup.py
1313
env:
1414
- REQ_ENV='-r requirements.txt .'
15-
# - REQ_ENV='--upgrade --upgrade-strategy=eager .'
15+
- REQ_ENV='--upgrade --upgrade-strategy=eager .'
1616

1717
# GUI testing requires xvfb
1818
dist: xenial
@@ -63,6 +63,6 @@ deploy:
6363
on:
6464
tags: true
6565
branch: master
66-
#python: 3.6
67-
#condition: $REQ_ENV == '--upgrade --upgrade-strategy=eager .'
66+
#python: 3.7
67+
condition: $REQ_ENV == '--upgrade --upgrade-strategy=eager .'
6868
#skip_cleanup: true

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Redistribution and use in source and binary forms, with or without
88
modification, are permitted provided that the following conditions are met:
99

1010
1. Redistributions of source code must retain the above copyright notice, this
11-
list of conditions and the following disclaimer.
11+
list of conditions and the following disclaimer.
1212

1313
2. Redistributions in binary form must reproduce the above copyright notice,
14-
this list of conditions and the following disclaimer in the documentation
15-
and/or other materials provided with the distribution.
14+
this list of conditions and the following disclaimer in the documentation
15+
and/or other materials provided with the distribution.
1616

1717
3. Neither the name of the copyright holder nor the names of its
1818
contributors may be used to endorse or promote products derived from

bifacial_radiance/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import absolute_import
21
from bifacial_radiance.main import AnalysisObj, GroundObj, MetObj, RadianceObj, SceneObj
32
#from bifacial_radiance.readepw import readepw
43
from bifacial_radiance import load

bifacial_radiance/data/module.json

Lines changed: 142 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,142 @@
1-
{"Prism Solar Bi60": {"x": 0.984, "y": 1.695, "scenex": 1.084, "sceney": 1.695, "scenez": 0.15, "numpanels": 1, "bifi": 0.9, "text": "! genbox black Prism_Solar_Bi60 0.984 1.695 0.02 | xform -t -0.492 -0.8475 0.15 -a 1 -t 0 1.695 0", "modulefile": "objects\\Prism_Solar_Bi60.rad", "moduleoffset": 0.15, "xgap": 0.1, "ygap": 0.0, "zgap": 0.1, "cellModule": null, "torquetube": {"bool": false, "diameter": 0.1, "tubetype": "round", "material": "Metal_Grey"}}, "2upTracker": {"x": 0.984, "y": 1.7, "scenex": 1.004, "sceney": 3.45, "scenez": 0.1, "numpanels": 2, "bifi": 1.0, "text": "! genbox black 2upTracker 0.984 1.7 0.02 | xform -t -0.492 -1.7249999999999999 0.1 -a 2 -t 0 1.75 0\r\n! genrev Metal_Grey tube1 t*1.004 0.05 32 | xform -ry 90 -t -0.502 0 0", "modulefile": "objects\\2upTracker.rad", "moduleoffset": 0.1, "xgap": 0.02, "ygap": 0.05, "zgap": 0.05, "cellModule": null, "torquetube": {"bool": true, "diameter": 0.1, "tubetype": "round", "material": "Metal_Grey"}}, "test": {"x": 1.59, "y": 0.95, "scenex": 1.59, "sceney": 0.95, "scenez": 0.15, "numpanels": 1, "bifi": 1, "text": "! genbox black test 1.59 0.95 0.02 | xform -t -0.795 -0.475 0 -a 1 -t 0 0.95 0", "modulefile": "objects\\test.rad", "offsetfromaxis": 0, "xgap": 0, "ygap": 0.0, "zgap": 0.1, "cellModule": null, "torquetube": {"bool": false, "diameter": 0.1, "tubetype": "Round", "material": "Metal_Grey"}}, "Prism Solar Bi60 landscape": {"x": 1.695, "y": 0.984, "scenex": 1.705, "sceney": 0.984, "scenez": 0.15, "numpanels": 1, "bifi": 1, "text": "! genbox black Prism_Solar_Bi60_landscape 1.695 0.984 0.02 | xform -t -0.8475 -0.492 0 -a 1 -t 0 0.984 0", "modulefile": "objects\\Prism_Solar_Bi60_landscape.rad", "offsetfromaxis": 0, "xgap": 0.01, "ygap": 0.0, "zgap": 0.1, "cellModule": null, "torquetube": {"bool": false, "diameter": 0.1, "tubetype": "Round", "material": "Metal_Grey"}}, "cellModule": {"x": 1.91, "y": 0.95, "scenex": 1.92, "sceney": 0.95, "scenez": 0.0, "numpanels": 1, "bifi": 0.9, "text": "! genbox black cellPVmodule 0.15 0.15 0.02 | xform -t -0.88 -0.475 0.0 -a 12 -t 0.16 0 0 -a 6 -t 0 0.16 0 -a 1 -t 0 0.95 0", "modulefile": "objects\\cellModule.rad", "moduleoffset": 0.0, "xgap": 0.01, "ygap": 0.0, "zgap": 0.0, "cellModule": {"numcellsx": 12, "numcellsy": 6, "xcell": 0.15, "ycell": 0.15, "xcellgap": 0.01, "ycellgap": 0.01}, "torquetube": {"bool": false, "diameter": 0.0, "tubetype": "round", "material": "Metal_Grey"}}, "Custom Tracker Module": {"x": 0.984, "y": 1.7, "scenex": 1.004, "sceney": 3.5, "scenez": 0.1, "numpanels": 2, "bifi": 1, "text": "! genbox black Custom_Tracker_Module 0.984 1.7 0.02 | xform -t -0.492 -1.75 0.1 -a 2 -t 0 1.8 0\r\n! genrev Metal_Grey tube1 t*1.004 0.05 32 | xform -ry 90 -t -0.502 0 0", "modulefile": "objects\\Custom_Tracker_Module.rad", "offsetfromaxis": 0.1, "xgap": 0.02, "ygap": 0.1, "zgap": 0.05, "cellModule": null, "torquetube": {"bool": true, "diameter": 0.1, "tubetype": "round", "material": "Metal_Grey"}}}
1+
2+
{
3+
"2upTracker": {
4+
"bifi": 1.0,
5+
"cellModule": null,
6+
"modulefile": "objects\\2upTracker.rad",
7+
"moduleoffset": 0.1,
8+
"numpanels": 2,
9+
"scenex": 1.004,
10+
"sceney": 3.45,
11+
"scenez": 0.1,
12+
"text": "! genbox black 2upTracker 0.984 1.7 0.02 | xform -t -0.492 -1.7249999999999999 0.1 -a 2 -t 0 1.75 0\r\n! genrev Metal_Grey tube1 t*1.004 0.05 32 | xform -ry 90 -t -0.502 0 0",
13+
"torquetube": {
14+
"bool": true,
15+
"diameter": 0.1,
16+
"material": "Metal_Grey",
17+
"tubetype": "round"
18+
},
19+
"x": 0.984,
20+
"xgap": 0.02,
21+
"y": 1.7,
22+
"ygap": 0.05,
23+
"zgap": 0.05
24+
},
25+
"Custom Tracker Module": {
26+
"bifi": 1,
27+
"cellModule": null,
28+
"modulefile": "objects\\Custom_Tracker_Module.rad",
29+
"numpanels": 2,
30+
"offsetfromaxis": 0.1,
31+
"scenex": 1.004,
32+
"sceney": 3.5,
33+
"scenez": 0.1,
34+
"text": "! genbox black Custom_Tracker_Module 0.984 1.7 0.02 | xform -t -0.492 -1.75 0.1 -a 2 -t 0 1.8 0\r\n! genrev Metal_Grey tube1 t*1.004 0.05 32 | xform -ry 90 -t -0.502 0 0",
35+
"torquetube": {
36+
"bool": true,
37+
"diameter": 0.1,
38+
"material": "Metal_Grey",
39+
"tubetype": "round"
40+
},
41+
"x": 0.984,
42+
"xgap": 0.02,
43+
"y": 1.7,
44+
"ygap": 0.1,
45+
"zgap": 0.05
46+
},
47+
"Prism Solar Bi60": {
48+
"bifi": 0.9,
49+
"cellModule": null,
50+
"modulefile": "objects\\Prism_Solar_Bi60.rad",
51+
"moduleoffset": 0.15,
52+
"numpanels": 1,
53+
"scenex": 1.084,
54+
"sceney": 1.695,
55+
"scenez": 0.15,
56+
"text": "! genbox black Prism_Solar_Bi60 0.984 1.695 0.02 | xform -t -0.492 -0.8475 0.15 -a 1 -t 0 1.695 0",
57+
"torquetube": {
58+
"bool": false,
59+
"diameter": 0.1,
60+
"material": "Metal_Grey",
61+
"tubetype": "round"
62+
},
63+
"x": 0.984,
64+
"xgap": 0.1,
65+
"y": 1.695,
66+
"ygap": 0.0,
67+
"zgap": 0.1
68+
},
69+
"Prism Solar Bi60 landscape": {
70+
"bifi": 1,
71+
"cellModule": null,
72+
"modulefile": "objects\\Prism_Solar_Bi60_landscape.rad",
73+
"numpanels": 1,
74+
"offsetfromaxis": 0,
75+
"scenex": 1.705,
76+
"sceney": 0.984,
77+
"scenez": 0.15,
78+
"text": "! genbox black Prism_Solar_Bi60_landscape 1.695 0.984 0.02 | xform -t -0.8475 -0.492 0 -a 1 -t 0 0.984 0",
79+
"torquetube": {
80+
"bool": false,
81+
"diameter": 0.1,
82+
"material": "Metal_Grey",
83+
"tubetype": "Round"
84+
},
85+
"x": 1.695,
86+
"xgap": 0.01,
87+
"y": 0.984,
88+
"ygap": 0.0,
89+
"zgap": 0.1
90+
},
91+
"cellModule": {
92+
"bifi": 0.9,
93+
"cellModule": {
94+
"numcellsx": 12,
95+
"numcellsy": 6,
96+
"xcell": 0.15,
97+
"xcellgap": 0.01,
98+
"ycell": 0.15,
99+
"ycellgap": 0.01
100+
},
101+
"modulefile": "objects\\cellModule.rad",
102+
"moduleoffset": 0.0,
103+
"numpanels": 1,
104+
"scenex": 1.92,
105+
"sceney": 0.95,
106+
"scenez": 0.0,
107+
"text": "! genbox black cellPVmodule 0.15 0.15 0.02 | xform -t -0.88 -0.475 0.0 -a 12 -t 0.16 0 0 -a 6 -t 0 0.16 0 -a 1 -t 0 0.95 0",
108+
"torquetube": {
109+
"bool": false,
110+
"diameter": 0.0,
111+
"material": "Metal_Grey",
112+
"tubetype": "round"
113+
},
114+
"x": 1.91,
115+
"xgap": 0.01,
116+
"y": 0.95,
117+
"ygap": 0.0,
118+
"zgap": 0.0
119+
},
120+
"test": {
121+
"bifi": 1,
122+
"cellModule": null,
123+
"modulefile": "objects\\test.rad",
124+
"numpanels": 1,
125+
"offsetfromaxis": 0,
126+
"scenex": 1.59,
127+
"sceney": 0.95,
128+
"scenez": 0.15,
129+
"text": "! genbox black test 1.59 0.95 0.02 | xform -t -0.795 -0.475 0 -a 1 -t 0 0.95 0",
130+
"torquetube": {
131+
"bool": false,
132+
"diameter": 0.1,
133+
"material": "Metal_Grey",
134+
"tubetype": "Round"
135+
},
136+
"x": 1.59,
137+
"xgap": 0,
138+
"y": 0.95,
139+
"ygap": 0.0,
140+
"zgap": 0.1
141+
}
142+
}

bifacial_radiance/gui.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,8 +1507,23 @@ def showScene():
15071507
#moduleParamsDict, trackingParamsDict, torquetubeParamsDict, \
15081508
#analysisParamsDict, cellLevelModuleParamsDict,_
15091509
P = read_valuesfromGUI()
1510+
1511+
# Case: tracking scenario
1512+
if P[0]['tracking'] is True:
1513+
print('Rendering tracker scene at 0 (noon) tilt')
1514+
# assume 0 tilt
1515+
key = '01_01_12'
1516+
trackerdict = {key: {'surf_azm':P[1]['axis_azimuth']+90,
1517+
'surf_tilt': 0.0, 'theta':0, 'ghi':999} }
1518+
1519+
trackerdict = demo.makeScene1axis(trackerdict,
1520+
sceneDict = P[1],
1521+
cumulativesky=False,
1522+
moduletype=moduletype)
1523+
scene = trackerdict[key]['scene']
1524+
else: # fixed tilt scenario
1525+
scene = demo.makeScene(moduletype=moduletype, sceneDict=P[1])
15101526

1511-
scene = demo.makeScene(moduletype=moduletype, sceneDict=P[1])
15121527
scene.showScene()
15131528

15141529
def modulenamecallbackFunc(event):

bifacial_radiance/load.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
TEMP folder in bifacial_radiance \\ bifacial_radiance
88
99
"""
10-
11-
def load_inputvariablesfile(intputfile):
10+
''' DEPRECATED - doesn't work with python3
11+
def load_inputvariablesfile(inputfile):
1212
"""
1313
Loads inputfile which must be in the bifacial_radiance directory,
1414
and must be a ``.py`` file with all the variables, and organizes the variables
@@ -59,7 +59,6 @@ def load_inputvariablesfile(intputfile):
5959
analysisParamsDict : Dictionary
6060
sensorsy, modWanted, rowWanted
6161
"""
62-
6362
import inputfile as ibf
6463
6564
simulationParamsDict = {'testfolder':ibf.testfolder,
@@ -76,9 +75,9 @@ def load_inputvariablesfile(intputfile):
7675
'timestampSimulation': ibf.timestampSimulation,
7776
'timeIndexSimulation': ibf.timeIndexSimulation,
7877
'hpc': ibf.hpc,
79-
'daydateSimulation': ibf.dayDateSimulation,
80-
'singleKeySimulation': ibf.singleKeySimulation,
81-
'singleKeyRangeSimulation': ibf.singleKeyRangeSimulation}
78+
'daydateSimulation': ibf.dayDateSimulation}
79+
#'singleKeySimulation': ibf.singleKeySimulation,
80+
#'singleKeyRangeSimulation': ibf.singleKeyRangeSimulation}
8281
8382
timeControlParamsDict = {'timestampstart': ibf.timestampstart,
8483
'timestampend': ibf.timestampend,
@@ -118,6 +117,7 @@ def load_inputvariablesfile(intputfile):
118117
moduleParamsDict, cellLevelModuleParamsDict, sceneParamsDict,
119118
trackingParamsDict, analysisParamsDict)
120119
120+
'''
121121

122122
def loadRadianceObj(savefile=None):
123123
"""

0 commit comments

Comments
 (0)