Skip to content

Correct spelling modelt to model #196 #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/sphinx/source/whatsnew/v0.4.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ the API changes.
API Changes
~~~~~~~~~~~


* In ``pvlib.irradiance.perez``, renamed argument ``modelt`` to ``model`` (:issue:`196`)

Enhancements
~~~~~~~~~~~~
Expand Down Expand Up @@ -39,3 +39,4 @@ Code Contributors
~~~~~~~~~~~~~~~~~

* Will Holmgren
* Jonathan Chambers
12 changes: 6 additions & 6 deletions pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def total_irrad(surface_tilt, surface_azimuth,
elif model == 'perez':
sky = perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
solar_zenith, solar_azimuth, airmass,
modelt=model_perez)
model=model_perez)
else:
raise ValueError('invalid model selection {}'.format(model))

Expand Down Expand Up @@ -965,7 +965,7 @@ def king(surface_tilt, dhi, ghi, solar_zenith):

def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
solar_zenith, solar_azimuth, airmass,
modelt='allsitescomposite1990'):
model='allsitescomposite1990'):
'''
Determine diffuse irradiance from the sky on a tilted surface using
one of the Perez models.
Expand Down Expand Up @@ -1108,7 +1108,7 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,

# The various possible sets of Perez coefficients are contained
# in a subfunction to clean up the code.
F1c, F2c = _get_perez_coefficients(modelt)
F1c, F2c = _get_perez_coefficients(model)

F1 = (F1c[ebin, 0] + F1c[ebin, 1] * delta[ebin.index] +
F1c[ebin, 2] * z[ebin.index])
Expand Down Expand Up @@ -1140,14 +1140,14 @@ def perez(surface_tilt, surface_azimuth, dhi, dni, dni_extra,
return sky_diffuse


def _get_perez_coefficients(perezmodelt):
def _get_perez_coefficients(perezmodel):
'''
Find coefficients for the Perez model

Parameters
----------

perezmodelt : string (optional, default='allsitescomposite1990')
perezmodel : string (optional, default='allsitescomposite1990')

a character string which selects the desired set of Perez
coefficients. If model is not provided as an input, the default,
Expand Down Expand Up @@ -1296,7 +1296,7 @@ def _get_perez_coefficients(perezmodelt):
[1.4340, -3.9940, -0.4920, 0.4530, -2.3760, 0.1170],
[1.0070, -2.2920, -0.4820, 0.3900, -3.3680, 0.2290]], }

array = np.array(coeffdict[perezmodelt])
array = np.array(coeffdict[perezmodel])

F1coeffs = array.T[0:3].T
F2coeffs = array.T[3:7].T
Expand Down