@@ -114,24 +114,18 @@ def perez_diffuse_luminance(timestamps, surface_tilt, surface_azimuth,
114114 # Calculate diffuse luminance
115115 luminance = pd .DataFrame (
116116 np .array ([
117- components ['horizon ' ] / vf_perez ['vf_horizon' ],
118- components ['circumsolar ' ] / vf_perez ['vf_circumsolar' ],
119- components ['isotropic ' ] / vf_perez ['vf_isotropic' ]
117+ components ['poa_horizon ' ] / vf_perez ['vf_horizon' ],
118+ components ['poa_circumsolar ' ] / vf_perez ['vf_circumsolar' ],
119+ components ['poa_isotropic ' ] / vf_perez ['vf_isotropic' ]
120120 ]).T ,
121121 index = df_inputs .index ,
122122 columns = ['luminance_horizon' , 'luminance_circumsolar' ,
123123 'luminance_isotropic' ]
124124 )
125- luminance .loc [components ['sky_diffuse' ] == 0 , :] = 0.
126-
127- # Format components column names
128- components = components .rename (columns = {'isotropic' : 'poa_isotropic' ,
129- 'circumsolar' : 'poa_circumsolar' ,
130- 'horizon' : 'poa_horizon' })
125+ luminance .loc [components ['poa_sky_diffuse' ] == 0 , :] = 0.
131126
132127 df_inputs = pd .concat ([df_inputs , components , vf_perez , luminance ],
133128 axis = 1 , join = 'outer' )
134- df_inputs = df_inputs .rename (columns = {'sky_diffuse' : 'poa_total_diffuse' })
135129
136130 # Adjust the circumsolar luminance when it hits the back surface
137131 if df_inputs_back_surface .shape [0 ] > 0 :
0 commit comments