Skip to content

Commit

Permalink
Revert "Update load.py"
Browse files Browse the repository at this point in the history
This reverts commit b25712e.
  • Loading branch information
mcbrown042 committed Jul 27, 2022
1 parent b25712e commit 5bacb47
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions bifacial_radiance/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def read1Result(selectfile):
import pandas as pd

#resultsDict = pd.read_csv(os.path.join('results',selectfile))
resultsDF = pd.read_csv(selectfile, index_col=0)
resultsDF = pd.read_csv(selectfile)

#return(np.array(temp['Wm2Front']), np.array(temp['Wm2Back']))
return resultsDF
Expand Down Expand Up @@ -207,16 +207,13 @@ def cleanResult(resultsDF, matchers=None):

if matchers is None:
matchers = ['sky','pole','tube','bar','ground', '3267', '1540']
# NaNindex = [i for i,s in enumerate(resultsDF['mattype']) if any(xs in s for xs in matchers)]
# NaNindex2 = [i for i,s in enumerate(resultsDF['rearMat']) if any(xs in s for xs in matchers)]
# #NaNindex += [i for i,s in enumerate(frontDict['mattype']) if any(xs in s for xs in matchers)]
# for i in NaNindex:
# resultsDF.loc[i,'Wm2Front'] = np.NAN
# for i in NaNindex2:
# resultsDF.loc[i,'Wm2Back'] = np.NAN

resultsDF.loc[resultsDF.mattype.str.contains('|'.join(matchers)),['Wm2Front','Wm2Back']] = np.NAN
resultsDF.loc[resultsDF.rearMat.str.contains('|'.join(matchers)),['Wm2Front','Wm2Back']] = np.NAN
NaNindex = [i for i,s in enumerate(resultsDF['mattype']) if any(xs in s for xs in matchers)]
NaNindex2 = [i for i,s in enumerate(resultsDF['rearMat']) if any(xs in s for xs in matchers)]
#NaNindex += [i for i,s in enumerate(frontDict['mattype']) if any(xs in s for xs in matchers)]
for i in NaNindex:
resultsDF.loc[i,'Wm2Front'] = np.NAN
for i in NaNindex2:
resultsDF.loc[i,'Wm2Back'] = np.NAN

return resultsDF

Expand Down

0 comments on commit 5bacb47

Please sign in to comment.