You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
solarposition.ephemeris returns results in dataframe with a localized time index, rather than UTC time. This results in slow performance because the dataframe is assembled from Series and np.arrays that are calculated using UTC time, requiring a timezone conversion.
To Reproduce
Change line 693 from DFOut = pd.DataFrame(index=time)
to
DFOut = pd.DataFrame(index=time_utc)
to observe the speedup: roughly 23 sec calculation time for 500k timesteps with index=time, and <5 seconds for index=time_utc
pvlib.__version__: 0.5.2
pandas.__version__: 0.20.3
Recommend that solarposition.ephemeris return a dataframe indexed in UTC time.
The text was updated successfully, but these errors were encountered:
The returned index is the same as the input index, and is not necessarily localized. I think the bottleneck is the same as in #502 -- in each case the DataFrame index is not the same as the first Series index. I agree with the proposed change, but suggest that we also add
DFOut.index = time
following the construction of the DataFrame. So the whole thing would look like
solarposition.ephemeris
returns results in dataframe with a localized time index, rather than UTC time. This results in slow performance because the dataframe is assembled from Series and np.arrays that are calculated using UTC time, requiring a timezone conversion.To Reproduce
Change line 693 from
DFOut = pd.DataFrame(index=time)
to
DFOut = pd.DataFrame(index=time_utc)
to observe the speedup: roughly 23 sec calculation time for 500k timesteps with
index=time
, and <5 seconds forindex=time_utc
pvlib.__version__
: 0.5.2pandas.__version__
: 0.20.3Recommend that
solarposition.ephemeris
return a dataframe indexed in UTC time.The text was updated successfully, but these errors were encountered: