Skip to content

Commit

Permalink
update columns and naming included in results and `compiled_results…
Browse files Browse the repository at this point in the history
…` - add rearX, rearY, rearZ. remove module, row. add module_CEC_type.
  • Loading branch information
cdeline committed Sep 26, 2024
1 parent f74bb03 commit 0b872f7
Show file tree
Hide file tree
Showing 3 changed files with 282 additions and 201 deletions.
11 changes: 8 additions & 3 deletions bifacial_radiance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3077,7 +3077,8 @@ def _printRow(analysisobj, key):
else:
keyname = 'timestamp'
return pd.concat([pd.DataFrame({keyname:key},index=[0]),
analysisobj.results], axis=1)
analysisobj.results.drop(columns=['module','row'],
errors='ignore')], axis=1)



Expand Down Expand Up @@ -3107,12 +3108,15 @@ def _printRow(analysisobj, key):
module_local = trackerdict[key]['scenes'][analysis.sceneNum].module
else:
module_local = module

analysis.calculatePerformance(meteo_data=meteo_data,
module=module_local,
cumulativesky=self.cumulativesky,
CECMod2=CECMod2)
self.compiledResults = pd.concat([self.compiledResults,
_printRow(analysis, key)], ignore_index=True)
_printRow(analysis, key).assign(
module_CEC_name=module_local.CECMod.name)],
ignore_index=True)
except KeyError:
pass

Expand Down Expand Up @@ -4373,7 +4377,8 @@ def results(self):
"""
try:
keylist = ['rowWanted', 'modWanted', 'sceneNum', 'name', 'x', 'y','z',
'Wm2Front', 'Wm2Back', 'Wm2Ground', 'backRatio', 'mattype', 'rearMat' ]
'rearX', 'rearY', 'rearZ', 'Wm2Front', 'Wm2Back', 'Wm2Ground',
'backRatio', 'mattype', 'rearMat' ]
resultdict = {k: v for k, v in self.__dict__.items() if k in keylist}
results = pd.DataFrame.from_dict(resultdict, orient='index').T.rename(
columns={'modWanted':'modNum', 'rowWanted':'rowNum'})
Expand Down
Loading

0 comments on commit 0b872f7

Please sign in to comment.