Skip to content

Commit e033abd

Browse files
committed
some more pep8 fixes
1 parent 7355466 commit e033abd

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

pvlib/irradiance.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ def extraradiation(datetime_or_doy, solar_constant=1366.1, method='spencer'):
105105

106106
if method == 'asce':
107107
pvl_logger.debug('Calculating ET rad using ASCE method')
108-
RoverR0sqrd = 1 + 0.033*np.cos(B)
108+
RoverR0sqrd = 1 + 0.033 * np.cos(B)
109109
elif method == 'spencer':
110110
pvl_logger.debug('Calculating ET rad using Spencer method')
111-
RoverR0sqrd = (1.00011 + 0.034221*np.cos(B) + 0.00128*np.sin(B) +
112-
0.000719*np.cos(2*B) + 7.7e-05*np.sin(2*B))
111+
RoverR0sqrd = (1.00011 + 0.034221 * np.cos(B) + 0.00128 * np.sin(B) +
112+
0.000719 * np.cos(2 * B) + 7.7e-05 * np.sin(2 * B))
113113
elif method == 'pyephem':
114114
pvl_logger.debug('Calculating ET rad using pyephem method')
115115
times = input_to_datetimeindex(datetime_or_doy)
@@ -149,7 +149,7 @@ def _array_to_datetimeindex(doy_array):
149149
-------
150150
pd.DatetimeIndex
151151
"""
152-
return pd.DatetimeIndex(map(_doy_to_timestamp, doy_array))
152+
return pd.DatetimeIndex(list(map(_doy_to_timestamp, doy_array)))
153153

154154

155155
def _doy_to_timestamp(doy, epoch='2013-12-31'):
@@ -433,7 +433,7 @@ def globalinplane(AOI, DNI, In_Plane_SkyDiffuse, GR):
433433
* ``Ediff`` : Total in-plane diffuse irradiance (W/m^2)
434434
'''
435435

436-
Eb = DNI*np.cos(np.radians(AOI))
436+
Eb = DNI * np.cos(np.radians(AOI))
437437
E = Eb + In_Plane_SkyDiffuse + GR
438438
Ediff = In_Plane_SkyDiffuse + GR
439439

@@ -662,7 +662,7 @@ def klucher(surf_tilt, surf_az, DHI, GHI, sun_zen, sun_az):
662662
F = 0
663663

664664
term1 = 0.5 * (1 + tools.cosd(surf_tilt))
665-
term2 = 1 + F * (tools.sind(0.5*surf_tilt) ** 3)
665+
term2 = 1 + F * (tools.sind(0.5 * surf_tilt) ** 3)
666666
term3 = 1 + F * (cos_tt ** 2) * (tools.sind(sun_zen) ** 3)
667667

668668
sky_diffuse = DHI * term1 * term2 * term3
@@ -871,7 +871,7 @@ def reindl(surf_tilt, surf_az, DHI, DNI, GHI, DNI_ET, sun_zen, sun_az):
871871
# these are actually the () and [] sub-terms of the second term of eqn 8
872872
term1 = 1 - AI
873873
term2 = 0.5 * (1 + tools.cosd(surf_tilt))
874-
term3 = 1 + np.sqrt(HB / GHI) * (tools.sind(0.5*surf_tilt) ** 3)
874+
term3 = 1 + np.sqrt(HB / GHI) * (tools.sind(0.5 * surf_tilt) ** 3)
875875

876876
sky_diffuse = DHI * (AI * Rb + term1 * term2 * term3)
877877
sky_diffuse[sky_diffuse < 0] = 0
@@ -1048,7 +1048,7 @@ def perez(surf_tilt, surf_az, DHI, DNI, DNI_ET, sun_zen, sun_az, AM,
10481048
z = np.radians(sun_zen) # convert to radians
10491049

10501050
# epsilon is the sky's "clearness"
1051-
eps = ((DHI + DNI)/DHI + kappa * (z**3)) / (1 + kappa * (z**3))
1051+
eps = ((DHI + DNI) / DHI + kappa * (z ** 3)) / (1 + kappa * (z ** 3))
10521052

10531053
# Perez et al define clearness bins according to the following rules.
10541054
# 1 = overcast ... 8 = clear
@@ -1094,7 +1094,7 @@ def perez(surf_tilt, surf_az, DHI, DNI, DNI_ET, sun_zen, sun_az, AM,
10941094
F1[F1 < 0] = 0
10951095
F1 = F1.astype(float)
10961096

1097-
F2 = F2c[ebin, 0] + F2c[ebin, 1]*delta + F2c[ebin, 2] * z
1097+
F2 = F2c[ebin, 0] + F2c[ebin, 1] * delta + F2c[ebin, 2] * z
10981098
F2[F2 < 0] = 0
10991099
F2 = F2.astype(float)
11001100

@@ -1108,7 +1108,7 @@ def perez(surf_tilt, surf_az, DHI, DNI, DNI_ET, sun_zen, sun_az, AM,
11081108

11091109
term1 = 0.5 * (1 - F1) * (1 + tools.cosd(surf_tilt))
11101110
term2 = F1 * A[ebin.index] / B[ebin.index]
1111-
term3 = F2*tools.sind(surf_tilt)
1111+
term3 = F2 * tools.sind(surf_tilt)
11121112

11131113
sky_diffuse = DHI[ebin.index] * (term1 + term2 + term3)
11141114
sky_diffuse[sky_diffuse < 0] = 0

0 commit comments

Comments
 (0)