Skip to content

Commit 3106ba4

Browse files
committed
fix whitespace
1 parent 98f3b52 commit 3106ba4

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

pvlib/atmosphere.py

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
The ``atmosphere`` module contains methods to calculate
2+
The ``atmosphere`` module contains methods to calculate
33
relative and absolute airmass and to determine
44
pressure from altitude or vice versa.
55
"""
@@ -29,7 +29,7 @@ def pres2alt(pressure):
2929
Returns
3030
-------
3131
altitude : scalar or Series
32-
Altitude in meters above sea level
32+
Altitude in meters above sea level
3333
3434
Notes
3535
------
@@ -66,7 +66,7 @@ def alt2pres(altitude):
6666
Parameters
6767
----------
6868
Altitude : scalar or Series
69-
Altitude in meters above sea level
69+
Altitude in meters above sea level
7070
7171
Returns
7272
-------
@@ -103,26 +103,26 @@ def alt2pres(altitude):
103103

104104
def absoluteairmass(airmass_relative, pressure=101325.):
105105
'''
106-
Determine absolute (pressure corrected) airmass from relative
106+
Determine absolute (pressure corrected) airmass from relative
107107
airmass and pressure
108108
109109
Gives the airmass for locations not at sea-level (i.e. not at standard
110110
pressure). The input argument "AMrelative" is the relative airmass. The
111111
input argument "pressure" is the pressure (in Pascals) at the location
112112
of interest and must be greater than 0. The calculation for
113113
absolute airmass is
114-
114+
115115
.. math::
116116
absolute airmass = (relative airmass)*pressure/101325
117117
118118
Parameters
119119
----------
120120
121-
airmass_relative : scalar or Series
122-
The airmass at sea-level.
121+
airmass_relative : scalar or Series
122+
The airmass at sea-level.
123123
124124
pressure : scalar or Series
125-
The site pressure in Pascal.
125+
The site pressure in Pascal.
126126
127127
Returns
128128
-------
@@ -131,7 +131,7 @@ def absoluteairmass(airmass_relative, pressure=101325.):
131131
132132
References
133133
----------
134-
[1] C. Gueymard, "Critical analysis and performance assessment of
134+
[1] C. Gueymard, "Critical analysis and performance assessment of
135135
clear sky solar irradiance models using theoretical and measured data,"
136136
Solar Energy, vol. 51, pp. 121-138, 1993.
137137
@@ -147,26 +147,26 @@ def relativeairmass(zenith, model='kastenyoung1989'):
147147
Gives the relative (not pressure-corrected) airmass.
148148
149149
Gives the airmass at sea-level when given a sun zenith angle
150-
(in degrees).
150+
(in degrees).
151151
The ``model`` variable allows selection of different airmass models
152-
(described below). If ``model`` is not
152+
(described below). If ``model`` is not
153153
included or is not valid, the default model is 'kastenyoung1989'.
154154
155155
Parameters
156156
----------
157157
158-
zenith : float or Series
159-
Zenith angle of the sun in degrees.
158+
zenith : float or Series
159+
Zenith angle of the sun in degrees.
160160
Note that some models use the apparent (refraction corrected)
161161
zenith angle, and some models use the true
162162
(not refraction-corrected) zenith angle.
163163
See model descriptions to determine which type of zenith
164164
angle is required.
165165
Apparent zenith angles must be calculated at sea level.
166-
167-
model : String
166+
167+
model : String
168168
Available models include the following:
169-
169+
170170
* 'simple' - secant(apparent zenith angle) -
171171
Note that this gives -inf at zenith=90
172172
* 'kasten1966' - See reference [1] - requires apparent sun zenith
@@ -178,8 +178,8 @@ def relativeairmass(zenith, model='kastenyoung1989'):
178178
179179
Returns
180180
-------
181-
airmass_relative : float or Series
182-
Relative airmass at sea level. Will return NaN values for any
181+
airmass_relative : float or Series
182+
Relative airmass at sea level. Will return NaN values for any
183183
zenith angle greater than 90 degrees.
184184
185185
References
@@ -190,31 +190,31 @@ def relativeairmass(zenith, model='kastenyoung1989'):
190190
Army Material Command, CRREL.
191191
192192
[2] A. T. Young and W. M. Irvine, "Multicolor Photoelectric Photometry
193-
of the Brighter Planets," The Astronomical Journal, vol. 72,
193+
of the Brighter Planets," The Astronomical Journal, vol. 72,
194194
pp. 945-950, 1967.
195195
196196
[3] Fritz Kasten and Andrew Young. "Revised optical air mass tables and
197197
approximation formula". Applied Optics 28:4735-4738
198198
199-
[4] C. Gueymard, "Critical analysis and performance assessment of
199+
[4] C. Gueymard, "Critical analysis and performance assessment of
200200
clear sky solar irradiance models using theoretical and measured data,"
201201
Solar Energy, vol. 51, pp. 121-138, 1993.
202202
203-
[5] A. T. Young, "AIR-MASS AND REFRACTION," Applied Optics, vol. 33,
203+
[5] A. T. Young, "AIR-MASS AND REFRACTION," Applied Optics, vol. 33,
204204
pp. 1108-1110, Feb 1994.
205205
206206
[6] Keith A. Pickering. "The Ancient Star Catalog". DIO 12:1, 20,
207-
207+
208208
[7] Matthew J. Reno, Clifford W. Hansen and Joshua S. Stein,
209209
"Global Horizontal Irradiance Clear Sky Models: Implementation and Analysis"
210210
Sandia Report, (2012).
211211
'''
212-
212+
213213
z = zenith
214214
zenith_rad = np.radians(z)
215-
215+
216216
model = model.lower()
217-
217+
218218
if 'kastenyoung1989' == model:
219219
AM = ( 1.0 / (np.cos(zenith_rad) +
220220
0.50572*(((6.07995 + (90 - z)) ** - 1.6364))) )
@@ -242,10 +242,10 @@ def relativeairmass(zenith, model='kastenyoung1989'):
242242
model)
243243
AM = ( 1.0 / (np.cos(zenith_rad) +
244244
0.50572*(((6.07995 + (90 - z)) ** - 1.6364))) )
245-
245+
246246
try:
247247
AM[z > 90] = np.nan
248248
except TypeError:
249249
AM = np.nan if z > 90 else AM
250-
250+
251251
return AM

pvlib/test/test_atmosphere.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
# setup times and location to be tested.
18-
times = pd.date_range(start=datetime.datetime(2014,6,24),
18+
times = pd.date_range(start=datetime.datetime(2014,6,24),
1919
end=datetime.datetime(2014,6,26), freq='1Min')
2020

2121
tus = Location(32.2, -111, 'US/Arizona', 700)
@@ -30,7 +30,7 @@
3030

3131
def test_pres2alt():
3232
atmosphere.pres2alt(100000)
33-
33+
3434
def test_alt2press():
3535
atmosphere.pres2alt(1000)
3636

@@ -46,7 +46,7 @@ def test_airmasses():
4646
def run_airmass(model, zenith):
4747
atmosphere.relativeairmass(zenith, model)
4848

49-
49+
5050
def test_absoluteairmass():
5151
relative_am = atmosphere.relativeairmass(ephem_data['zenith'], 'simple')
5252
atmosphere.absoluteairmass(relative_am)

0 commit comments

Comments
 (0)