Skip to content

Commit 8833cfe

Browse files
committed
tweak doc and dfout order
1 parent a778852 commit 8833cfe

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

pvlib/solarposition.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -219,26 +219,26 @@ def ephemeris(time, location, pressure=101325, temperature=12):
219219
----------
220220
time : pandas.DatetimeIndex
221221
location : pvlib.Location
222-
pressure : float or DataFrame
223-
Ambient pressure (Pascals)
224-
225-
temperature : float or DataFrame
226-
Ambient temperature (C)
222+
pressure : float or Series
223+
Ambient pressure (Pascals)
224+
temperature : float or Series
225+
Ambient temperature (C)
227226
228227
Returns
229228
-------
230229
231230
DataFrame with the following columns:
232231
233-
* elevation : actual elevation (not accounting for refraction) of the sun
234-
in decimal degrees, 0 = on horizon. The complement of the zenith
235-
angle.
232+
* apparent_elevation : apparent sun elevation accounting for
233+
atmospheric refraction.
234+
* elevation : actual elevation (not accounting for refraction)
235+
of the sun in decimal degrees, 0 = on horizon.
236+
The complement of the zenith angle.
236237
* azimuth : Azimuth of the sun in decimal degrees East of North.
237-
* zenith : Solar zenith angle
238-
* apparent_elevation : apparent sun elevation accounting for atmospheric
239-
refraction. This is the complement of the Apparent Zenith Angle.
238+
This is the complement of the apparent zenith angle.
240239
* apparent_zenith : apparent sun zenith accounting for atmospheric
241240
refraction.
241+
* zenith : Solar zenith angle
242242
* solar_time : Solar time in decimal hours (solar noon is 12.00).
243243
244244
References
@@ -250,7 +250,6 @@ def ephemeris(time, location, pressure=101325, temperature=12):
250250
See also
251251
--------
252252
pyephem, spa
253-
254253
'''
255254

256255
# Added by Rob Andrews (@Calama-Consulting), Calama Consulting, 2014
@@ -369,11 +368,11 @@ def ephemeris(time, location, pressure=101325, temperature=12):
369368

370369
# make output DataFrame
371370
DFOut = pd.DataFrame(index=time_utc).tz_convert(location.tz)
371+
DFOut['apparent_elevation'] = ApparentSunEl
372372
DFOut['elevation'] = SunEl
373373
DFOut['azimuth'] = SunAz
374-
DFOut['zenith'] = 90 - SunEl
375-
DFOut['apparent_elevation'] = ApparentSunEl
376374
DFOut['apparent_zenith'] = 90 - ApparentSunEl
375+
DFOut['zenith'] = 90 - SunEl
377376
DFOut['solar_time'] = SolarTime
378377

379378
return DFOut

0 commit comments

Comments
 (0)