Skip to content

Commit

Permalink
Sphinx updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeline committed Apr 25, 2024
1 parent 8415e96 commit 82d53df
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
41 changes: 19 additions & 22 deletions bifacial_radiance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2843,14 +2843,15 @@ def analysis1axis(self, trackerdict=None, singleindex=None, accuracy='low',
Returns
-------
trackerdict is returned with 'AnalysisObj' for each timestamp:
trackerdict is returned with :py:class:`bifacial_radiance.AnalysisObj`
for each timestamp:
'AnalysisObj' : analysis object for this tracker theta
to get a dictionary of results, run AnalysisObj.getResults()
Results dict has the following keys:
'Wm2Front' : list of front Wm-2 irradiances, len=sensorsy_back
'Wm2Back' : list of rear Wm-2 irradiances, len=sensorsy_back
'backRatio' : list of rear irradiance ratios, len=sensorsy_back
trackerdict.key.'AnalysisObj' : analysis object for this tracker theta
to get a dictionary of results, run :py:class:`bifacial_radiance.AnalysisObj`.getResults
:py:class:`bifacial_radiance.AnalysisObj`.getResults returns the following keys:
'Wm2Front' : np.array of front Wm-2 irradiances, len=sensorsy_back
'Wm2Back' : np.array of rear Wm-2 irradiances, len=sensorsy_back
'backRatio' : np.array of rear irradiance ratios, len=sensorsy_back
"""

Expand Down Expand Up @@ -3405,9 +3406,6 @@ class SceneObj:
name : str
Identifier of scene in case of multiple scenes. Default `Scene0'.
Automatically increments if makeScene is run multiple times.
Returns
-------
'''
def __repr__(self):
Expand Down Expand Up @@ -5315,18 +5313,17 @@ def calc_performance(self, meteo_data, CECMod, cumulativesky, glassglass=False,
Returns
-------
performance : dict
New dictionary with performance results for that simulation. Keys:
POA_eff: mean of [(mean of clean Gfront) + clean Grear * bifaciality factor]
Gfront_mean: mean of clean Gfront
Grear_mean: mean of clean Grear
Mismatch: mismatch calculated from the MAD distribution of
POA_total
Pout_raw: power output calculated from POA_total, considers
wind speed and temp_amb if in trackerdict.
Pout: power output considering electrical mismatch
"""

performance : dictionary with performance results for that simulation.
Keys:
'POA_eff': mean of [(mean of clean Gfront) + clean Grear * bifaciality factor]
'Gfront_mean': mean of clean Gfront
'Grear_mean': mean of clean Grear
'Mismatch': mismatch calculated from the MAD distribution of POA_total
'Pout_raw': power output calculated from POA_total, considers wind speed and temp_amb if in trackerdict.
'Pout': power output considering electrical mismatch
"""

from bifacial_radiance import performance

#TODO: Check that meteo_data only includes correct kwargs
Expand Down
21 changes: 12 additions & 9 deletions bifacial_radiance/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def __repr__(self):
def getDataDict(self):
"""
return dictionary values from self. Originally stored as self.data
"""
return dict(zip(self.keys,[getattr(self,k) for k in self.keys]))

Expand All @@ -25,6 +26,7 @@ class ModuleObj(SuperClass):
Does the heavy lifting of demo.makeModule()
Module details are passed in and stored in module.json.
Pass this object into makeScene or makeScene1axis.
"""


Expand All @@ -35,8 +37,7 @@ def __init__(self, name=None, x=None, y=None, z=None, bifi=1, modulefile=None,
frameParams=None, omegaParams=None, hpc=False, Efficiency=None,
Temp_coeff=None, Peak_Power=None, Module_name=None):
"""
Add module details to the .JSON module config file module.json
Add module details to the .JSON module config file module.json.
Module definitions assume that the module .rad file is defined
with zero tilt, centered along the x-axis and y-axis for the center
of rotation of the module (+X/2, -X/2, +Y/2, -Y/2 on each side).
Expand All @@ -63,11 +64,11 @@ def __init__(self, name=None, x=None, y=None, z=None, bifi=1, modulefile=None,
extra details in the racking/module. Does not overwrite
generated module (unlike "text"), but adds to it at the end.
customObject : str
Append to the module object file a pre-genereated radfile. This
must start with the file path\name. Does not overwrite
generated module (unlike "text"), but adds to it at the end.
It automatically inserts radiance's text before the object name so
its inserted into scene properly ('!xform -rz 0')
Append to the module object file a pre-genereated radfile. This
must start with the file path\name. Does not overwrite
generated module (unlike "text"), but adds to it at the end.
It automatically inserts radiance's text before the object name so
its inserted into scene properly ('!xform -rz 0')
rewriteModulefile : bool
Default True. Will rewrite module file each time makeModule is run.
numpanels : int
Expand All @@ -81,8 +82,8 @@ def __init__(self, name=None, x=None, y=None, z=None, bifi=1, modulefile=None,
Distance behind the modules in the z-direction to the edge of the tube (m)
glass : bool
Add 5mm front and back glass to the module (glass/glass). Warning:
glass increases the analysis variability. Recommend setting
accuracy='high' in AnalysisObj.analysis()
glass increases the analysis variability. Recommend setting
accuracy='high' in AnalysisObj.analysis()
cellModule : dict
Dictionary with input parameters for creating a cell-level module.
Shortcut for ModuleObj.addCellModule()
Expand Down Expand Up @@ -112,6 +113,7 @@ def __init__(self, name=None, x=None, y=None, z=None, bifi=1, modulefile=None,
calculate performance.
Module name : string (default None)
Information about module's name.
'"""

self.keys = ['x', 'y', 'z', 'modulematerial', 'scenex','sceney',
Expand Down Expand Up @@ -204,6 +206,7 @@ def compileText(self, rewriteModulefile=True, json=True):
Overwrite the .rad file for the module
json : bool (default True)
Update the module.json file with ModuleObj attributes
"""
saveDict = self.getDataDict()

Expand Down
12 changes: 7 additions & 5 deletions docs/sphinx/source/manualapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Support methods for scene
SceneObj.showScene
RadianceObj.makeCustomObject
RadianceObj.appendtoScene
SceneObj.appendtoScene

Analysis
==========
Expand All @@ -122,15 +123,16 @@ Methods for irradiance calculations
AnalysisObj.moduleAnalysis
AnalysisObj.analysis
RadianceObj.analysis1axis
RadianceObj.compileResults
RadianceObj.getResults

Mismatch
--------
Power and Mismatch
------------------

.. autosummary::
:toctree: generated/
:caption: Mismatch Analysis
:caption: Power and Mismatch Analysis

AnalysisObj.calc_performance
mismatch.analysisIrradianceandPowerMismatch

Support
Expand All @@ -146,7 +148,7 @@ Input / Output
load
load.loadRadianceObj
load.loadTrackerDict
RadianceObj.loadtrackerdict
RadianceObj.loadtrackerdict
load.read1Result
load.cleanResult
load.deepcleanResult
Expand Down

0 comments on commit 82d53df

Please sign in to comment.