Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/NREL/development' into sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeline committed Oct 4, 2019
2 parents 45d36de + 67d1dea commit 6a9f58a
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ performance. Please see the instructions here, notebook examples in the
## Installation Video

https://youtu.be/4A9GocfHKyM
This video shows how to install the bifacial_radiance software and all associated softwares needed. More info on the Wiki. Instructions are also shown below.
This video shows how to install the bifacial_radiance software and all associated software needed. More info on the Wiki. Instructions are also shown below.

## New: GUI!

Expand Down
6 changes: 3 additions & 3 deletions bifacial_radiance/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def analysisIrradianceandPowerMismatcheEUPVSEC(testfolder, writefiletitle, senso
# 2DO IMPORTANT:
# This section is not ready because I don't think the empty dataframe
# will absolve me from all the mathematical following equations to
# non existing F_cellaverage adn B_cellaverage
# ... have ot restructure all of this
# non existing F_cellaverage and B_cellaverage
# ... have to restructure all of this
# nicerly!!!! ugh.
F_cellcenter = sensorupsampletocellsbyInterpolation(F, cellsy)
B_cellcenter = sensorupsampletocellsbyInterpolation(B, cellsy)
Expand Down Expand Up @@ -555,4 +555,4 @@ def updatelegacynames(testfolder, downsamplingmethod='byAverage'):
print("File already on right header format it seems")
return



6 changes: 3 additions & 3 deletions bifacial_radiance/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ def setDefaults():

# MAIN CONTROL
###################
# Create teh widgets for the maincontrol_frame
# Create the widgets for the maincontrol_frame
def selGetEPW():
getepwfile_label.config(state='normal')
entry_getepwfileLat.config(state='normal')
Expand Down Expand Up @@ -1191,7 +1191,7 @@ def tcThree():
tcStartEndDate()
#tcTimestamps()

# Fixed, Hourly for hte whole Year:
# Fixed, Hourly for the whole Year:
def tcFour():
selfixed()
tcAll()
Expand Down Expand Up @@ -1791,4 +1791,4 @@ def gui():

# If the script is run as a file, it needs to call gui().
if __name__ == '__main__':
gui()
gui()
8 changes: 4 additions & 4 deletions bifacial_radiance/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def deepcleanResult(resultsDict, sensorsy, numpanels, automatic=True):
cleans results read by read1Result specifically for 1 UP and 2UP configurations in v0.2.4
Asks user to select material of the module (usually the one with the most results)
and removes sky, ground, and other materials (side of module, for exmaple)
and removes sky, ground, and other materials (side of module, for example)
TODO: add automatization of panel select.
Expand Down Expand Up @@ -479,9 +479,9 @@ def boolConvert(d):
if simulationParamsDict['timestampRangeSimulation'] or simulationParamsDict['daydateSimulation']:
if config.has_section("timeControlParamsDict"):
timeControlParamsDict2 = boolConvert(confdict['timeControlParamsDict'])
timeControlParamsDict={} # saving a main dictionary wiht only relevant options.
timeControlParamsDict={} # saving a main dictionary with only relevant options.
else:
print("Mising timeControlParamsDict for simulation options specified! Breaking")
print("Missing timeControlParamsDict for simulation options specified! Breaking")
# break;

if simulationParamsDict['getEPW']:
Expand Down Expand Up @@ -915,4 +915,4 @@ def unpack(self):
self.trackingParams, \
self.torquetubeParams, \
self.analysisParams, \
self.cellLevelModuleParams
self.cellLevelModuleParams
4 changes: 2 additions & 2 deletions bifacial_radiance/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def runModelChain(simulationParamsDict, sceneParamsDict, timeControlParamsDict=N
'''
This calls config.py values, which are arranged into dictionaries,
and runs all the respective processes based on the varaibles in the config.py.
and runs all the respective processes based on the variables in the config.py.
Still under testing!
Expand Down Expand Up @@ -313,7 +313,7 @@ def _addRadfile(trackerdict):
_,_,timelist = _returnTimeVals(timeControlParamsDict, trackerdict)
trackerdict = {t: trackerdict[t] for t in timelist}

# Tracker dict should go here becuase sky routine reduces the size of trackerdict.
# Tracker dict should go here because sky routine reduces the size of trackerdict.
trackerdict = demo.makeScene1axis(trackerdict=trackerdict,
moduletype=simulationParamsDict['moduletype'],
sceneDict=sceneParamsDict,
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/(development) Caballero Test Murcia.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@
"Total Ibh/Lbh: 0.000000\n",
"Created skyfile skies\\1axis_30.0.rad\n",
"nMods and nRows input is being deprecated. Please include nMods and nRows inside of your sceneDict definition\n",
"Meanwhile, this funciton will check if SceneDict has nMods and nRows and will use that as values, and if not, it will assign nMods and nRows to it.\n",
"Meanwhile, this function will check if SceneDict has nMods and nRows and will use that as values, and if not, it will assign nMods and nRows to it.\n",
"\n",
"Making .rad files for cumulativesky 1-axis workflow\n",
"19 Radfiles created in /objects/\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/(development) PVSC 2018 Fig. 13.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"tubetype='round'\n",
"material = 'Metal_Grey'\n",
"diameter = 0.1\n",
"axisofrotationTorqueTube = False # Original PVSC version rotated around the modules like most other softwares.\n",
"axisofrotationTorqueTube = False # Original PVSC version rotated around the modules like most other software.\n",
"# Variables that will get defined on each iteration below:\n",
"zgap = 0 # 0.2, 0.3 values tested. Re-defined on each simulation.\n",
"torquetube = False # baseline is no torque tube. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# 2-UP with Torque Tube, Fixed Tilt Example, with CLEAN Routine\n",
"\n",
"This journal has exmaples of vairous things:\n",
"This journal has examples of various things:\n",
"\n",
"1) Running a fixed_tilt simulation beginning to end.\n",
"\n",
Expand Down Expand Up @@ -238,7 +238,7 @@
"moduledict=demo.makeModule(name=module_type,x=x,y=y,bifi=1, \n",
" torquetube=torqueTube, diameter = diameter, tubetype = tubetype, material = torqueTubeMaterial, zgap = zgap, numpanels = numpanels, ygap = ygap, rewriteModulefile = True, xgap = xgap)\n",
"# create a scene with all the variables. \n",
"# Specifying the pitch automatically with the collector width (sceney) returend by moduledict.\n",
"# Specifying the pitch automatically with the collector width (sceney) returned by moduledict.\n",
"# Height has been deprecated as an input. pass clearance_height or hub_height in the scenedict.\n",
"sceneDict = {'tilt':tilt,'pitch': np.round(moduledict['sceney'] / gcr,3),\n",
" 'hub_height':hub_height,'azimuth':azimuth_ang, \n",
Expand Down Expand Up @@ -278,7 +278,7 @@
"source": [
"analysis = bifacial_radiance.AnalysisObj(octfile, demo.name) # return an analysis object including the scan dimensions for back irradiance\n",
"\n",
"sensorsy = 200 # setting this veyr high to see a detailed profile of the irradiance, including\n",
"sensorsy = 200 # setting this very high to see a detailed profile of the irradiance, including\n",
"#the shadow of the torque tube on the rear side of the module.\n",
"frontscan, backscan = analysis.moduleAnalysis(scene, modWanted = 2, rowWanted = 1, sensorsy = 200)\n",
"frontDict, backDict = analysis.analysis(octfile, demo.name, frontscan, backscan) # compare the back vs front irradiance \n",
Expand All @@ -294,7 +294,7 @@
"\n",
"## Calculate Bifacial Ratio (clean results)\n",
"\n",
"Altough we could a bifacial ratio average at this point, this value would be misleading, since some of the sensors generated will fall on the torque tube, the sky, and/or the ground since we have torquetube and ygap in the scene. To calculate the real bifacial ratio average, we must use the clean routines.\n"
"Although we could calculate a bifacial ratio average at this point, this value would be misleading, since some of the sensors generated will fall on the torque tube, the sky, and/or the ground since we have torquetube and ygap in the scene. To calculate the real bifacial ratio average, we must use the clean routines.\n"
]
},
{
Expand Down Expand Up @@ -1357,7 +1357,7 @@
"## Marker at 0,0 position\n",
"This shows how to add a custom element, in this case a Cube, that will be placed in the center of your already created scene to mark the 0,0 location. \n",
"\n",
"This can be added at any point after makeScene has been runned once. Notice that if this extra element is in the scene and the analysis sensors fall on this element, they will measure irradiance at this element and no the modules."
"This can be added at any point after makeScene has been run once. Notice that if this extra element is in the scene and the analysis sensors fall on this element, they will measure irradiance at this element and no the modules."
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/v3 - Multiple SceneObjects Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"\n",
"3) Add a marker to find the origin (0,0) on a scene (for sanity-checks/visualization).\n",
"\n",
"A scene Object is defined as an array of modules, with whatever paremeters you want to give it. In this case, we are modeling one array of 2 rows of 5 modules in landscape, and one array of 1 row of 5 modules in 2-UP, portrait configuration, as the image below:\n",
"A scene Object is defined as an array of modules, with whatever parameters you want to give it. In this case, we are modeling one array of 2 rows of 5 modules in landscape, and one array of 1 row of 5 modules in 2-UP, portrait configuration, as the image below:\n",
"\n",
"![multiple Scene Objects Example](images_wiki\\Journal_example_multiple_objects.PNG)\n"
]
Expand Down Expand Up @@ -227,7 +227,7 @@
}
],
"source": [
"# NOTE: offseting translation by 0.1 so the center of the marker is at the desired coordinate.\n",
"# NOTE: offsetting translation by 0.1 so the center of the marker is at the desired coordinate.\n",
"name='Post1'\n",
"text='! genbox black originMarker 0.2 0.2 1 | xform -t -0.1 -0.1 0'\n",
"customObject = demo.makeCustomObject(name,text)\n",
Expand Down Expand Up @@ -372,7 +372,7 @@
}
],
"source": [
"# Sanity check for first obect. Since we didn't pass any desired module, it should grab the center module of the center row (rounding down)\n",
"# Sanity check for first object. Since we didn't pass any desired module, it should grab the center module of the center row (rounding down)\n",
"# for 2 rows, that is row 1, module 5 ~ indexed at 0, a4.0.a0.PVmodule.....\"\"\n",
"print (frontdict['x'])\n",
"print (\"\")\n",
Expand Down Expand Up @@ -412,7 +412,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Sanity check for first obect. Since we didn't pass any desired module, it should grab the center module of the center row (rounding down). For 1 rows, that is row 0, module 3 ~ indexed at 0, a2.0.a0.PVmodule... and a2.0.a1.PVmodule since it is a 2-UP system.\n"
"Sanity check for first object. Since we didn't pass any desired module, it should grab the center module of the center row (rounding down). For 1 rows, that is row 0, module 3 ~ indexed at 0, a2.0.a0.PVmodule... and a2.0.a1.PVmodule since it is a 2-UP system.\n"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/v3_1Axis_tracking_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"else:\n",
" metdata = demo.readTMY() # load TMY3 data from another source, like solar prospector. A version is saved as \\EPWs\\tmy3_temp.csv\n",
"\n",
"# Alternatively, you can use readWeatherFile, which doens't care if the file is an EPW or a CSV.\n",
"# Alternatively, you can use readWeatherFile, which doesn't care if the file is an EPW or a CSV.\n",
"metdata = demo.readWeatherFile(epwfile)"
]
},
Expand Down Expand Up @@ -715,7 +715,7 @@
"metdata = demo.readEPW(epwfile)\n",
"demo.set1axis()\n",
"demo.genCumSky1axis()\n",
"module_type = '2upTracker' # Since we already created this module type, we don't need to makeModule, we just ned to call it when we make the Scene.\n",
"module_type = '2upTracker' # Since we already created this module type, we don't need to makeModule, we just need to call it when we make the Scene.\n",
"sceneDict = {'pitch':module_height / gcr,'height':hub_height, 'nMods': 20, 'nRows': 7} # orientation deprecated on v.0.2.4.\n",
"demo.makeScene1axis(moduletype=module_type,sceneDict = sceneDict)\n",
"demo.makeOct1axis()\n",
Expand Down Expand Up @@ -768,12 +768,12 @@
"# Create the skyfiles needed for 1-axis tracking. \n",
"# If you don't specify a startdate and enddate, all the year will be created, which will take more time. \n",
"# For this example we are doing the first half of January.\n",
"# Specifying the startdate and enddate also trims down the trackerdict from the whole year to just the entries between that start adn enddate.\n",
"# Specifying the startdate and enddate also trims down the trackerdict from the whole year to just the entries between that start and enddate.\n",
"trackerdict2 = demo2.gendaylit1axis(startdate='01/01', enddate='01/15') # optional parameters 'startdate', 'enddate' inputs = string 'MM/DD' or 'MM_DD' \n",
"\n",
"# This is for exemplifying the changes undergone in the trackerdict by each step. Just printing information.\n",
"print (\"\\nTrimmed trackerdict by gendaylit1axis to start and enddate: %s \" % (len(trackerdict2)))\n",
"print (\"Contents of trackerdict for sample hour after runing gendaylit1axis \\n trackerdict2['01_01_11']: %s \" % ( trackerdict2['01_01_11']))\n"
"print (\"Contents of trackerdict for sample hour after running gendaylit1axis \\n trackerdict2['01_01_11']: %s \" % ( trackerdict2['01_01_11']))\n"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
usage: `pip install -e .`
GenCumulativeSky was conceived, developed and validated by Darren Robinson and Andrew Stone for efficient solar irradiation modelling using RADIANCE
When using GenCumulativeSky they would be pleased if you would ackowledge their work by referring to the following article: "Robinson, D., Stone, A.,
When using GenCumulativeSky they would be pleased if you would acknowledge their work by referring to the following article: "Robinson, D., Stone, A.,
Irradiation modeling made simple – the cumulative sky approach and its applications, Proc. PLEA 2004, Eindhoven 2004."
"""
Expand Down

0 comments on commit 6a9f58a

Please sign in to comment.