Skip to content

Commit

Permalink
get bifacialityfactor from scene in call to calculateResultsGencumsky…
Browse files Browse the repository at this point in the history
…1axis

reduce CompiledResults savefile to 3 digits
  • Loading branch information
cdeline committed Sep 3, 2024
1 parent e1ac5a3 commit 2caeb8a
Show file tree
Hide file tree
Showing 4 changed files with 602 additions and 84 deletions.
19 changes: 11 additions & 8 deletions bifacial_radiance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2529,7 +2529,8 @@ def makeScene1axis(self, trackerdict=None, module=None, sceneDict=None,
module : str or ModuleObj
Name or ModuleObj created with makeModule()
sceneDict :
Dictionary with keys:`tilt`, `hub_height`, `pitch`, `azimuth`
Dictionary with keys:`tilt`, `hub_height`, `pitch` (or GCR), `azimuth`,
optional: 'originx', 'originy'
cumulativesky : bool
Defines if sky will be generated with cumulativesky or gendaylit.
customtext : str
Expand Down Expand Up @@ -3065,8 +3066,6 @@ def _printRow(analysisobj, key):

meteo_data = _trackerMeteo(trackerdict[key])




try:
for analysis in trackerdict[key]['AnalysisObj']: # loop over multiple row & module in trackerDict['AnalysisObj']
Expand Down Expand Up @@ -3100,12 +3099,16 @@ def _printRow(analysisobj, key):
except KeyError:
pass


if module is None:
module_local = trackerdict[keys_all[0]]['scenes'][analysis.sceneNum].module
else:
module_local = module
self.CompiledResults = performance.calculateResultsGencumsky1axis(results=self.CompiledResults,
bifacialityfactor=1.0,
bifacialityfactor=module_local.bifi,
fillcleanedSensors=True, agriPV=False)

self.CompiledResults.to_csv(os.path.join('results', 'Cumulative_Results.csv'))
self.CompiledResults.to_csv(os.path.join('results', 'Cumulative_Results.csv'),
float_format='%0.3f')

self.trackerdict = trackerdict
return self.CompiledResults
Expand Down Expand Up @@ -5263,7 +5266,7 @@ def _checkPath(rowpath): # create the file structure if it doesn't exist
savefile = 'compiledRow_{}.csv'.format(rowWanted)

df_row.to_csv(os.path.join(rowpath, savefile), sep = ',',
index = False)
index=False, float_format='%0.3f')


return df_row
Expand Down Expand Up @@ -5321,7 +5324,7 @@ def analyzeField(self, octfile, scene, name=None,
savefile = 'compiledField_{}.csv'.format(name)

result.to_csv(os.path.join(fieldpath, savefile), sep = ',',
index = False)
index=False, float_format='%0.3f')


return result
Expand Down
6 changes: 3 additions & 3 deletions bifacial_radiance/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def _makeModuleFromDict(self, x=None, y=None, z=None, xgap=None, ygap=None,
return text
#End of makeModuleFromDict()

def addCEC(self, CECMod, glassglass=False, bifi=None):
def addCEC(self, CECMod, glassglass=None, bifi=None):
"""
Expand All @@ -708,8 +708,8 @@ def addCEC(self, CECMod, glassglass=False, bifi=None):
"""
keys = ['alpha_sc', 'a_ref', 'I_L_ref', 'I_o_ref', 'R_sh_ref', 'R_s', 'Adjust']


self.glassglass = glassglass
if glassglass is not None:
self.glassglass = glassglass
if bifi:
self.bifi = bifi

Expand Down
Loading

0 comments on commit 2caeb8a

Please sign in to comment.