2828
2929
3030def get_solarposition (
31- time : pd . DatetimeIndex ,
32- latitude : float ,
33- longitude : float ,
34- altitude : float | None = None ,
35- pressure : float | None = None ,
36- method : str = 'nrel_numpy' ,
37- temperature : float = 12. ,
31+ time ,
32+ latitude ,
33+ longitude ,
34+ altitude ,
35+ pressure = None ,
36+ method = 'nrel_numpy' ,
37+ temperature = 12. ,
3838 ** kwargs
3939):
4040 """
@@ -155,11 +155,11 @@ def spa_c(time, latitude, longitude, pressure=101325., altitude=0.,
155155 longitude : float
156156 Longitude in decimal degrees. Positive east of prime meridian,
157157 negative to west.
158- pressure : float, default 101325
158+ pressure : float, default 101325.0
159159 Pressure in Pascals
160- altitude : float, default 0
160+ altitude : float, default 0.0
161161 Height above sea level. [m]
162- temperature : float, default 12
162+ temperature : float, default 12.0
163163 Temperature in C
164164 delta_t : float, default 67.0
165165 Difference between terrestrial time and UT1.
@@ -308,11 +308,11 @@ def spa_python(time, latitude, longitude,
308308 longitude : float
309309 Longitude in decimal degrees. Positive east of prime meridian,
310310 negative to west.
311- altitude : float, default 0
311+ altitude : float, default 0.0
312312 Distance above sea level.
313- pressure : int or float, optional, default 101325
313+ pressure : int or float, optional, default 101325.0
314314 avg. yearly air pressure in Pascals.
315- temperature : int or float, optional, default 12
315+ temperature : int or float, optional, default 12.0
316316 avg. yearly air temperature in degrees C.
317317 delta_t : float or array, optional, default 67.0
318318 Difference between terrestrial time and UT1.
@@ -513,9 +513,9 @@ def _ephem_setup(latitude, longitude, altitude, pressure, temperature,
513513
514514def sun_rise_set_transit_ephem (times , latitude , longitude ,
515515 next_or_previous = 'next' ,
516- altitude = 0 ,
517- pressure = 101325 ,
518- temperature = 12 , horizon = '0:00' ):
516+ altitude = 0. ,
517+ pressure = 101325. ,
518+ temperature = 12. , horizon = '0:00' ):
519519 """
520520 Calculate the next sunrise and sunset times using the PyEphem package.
521521
@@ -529,11 +529,11 @@ def sun_rise_set_transit_ephem(times, latitude, longitude,
529529 Longitude in degrees, positive east of prime meridian, negative to west
530530 next_or_previous : str
531531 'next' or 'previous' sunrise and sunset relative to time
532- altitude : float, default 0
532+ altitude : float, default 0.0
533533 distance above sea level in meters.
534- pressure : int or float, optional, default 101325
534+ pressure : int or float, optional, default 101325.0
535535 air pressure in Pascals.
536- temperature : int or float, optional, default 12
536+ temperature : int or float, optional, default 12.0
537537 air temperature in degrees C.
538538 horizon : string, format +/-X:YY
539539 arc degrees:arc minutes from geometrical horizon for sunrise and
@@ -596,8 +596,8 @@ def sun_rise_set_transit_ephem(times, latitude, longitude,
596596 'transit' : trans })
597597
598598
599- def pyephem (time , latitude , longitude , altitude = 0 , pressure = 101325 ,
600- temperature = 12 , horizon = '+0:00' ):
599+ def pyephem (time , latitude , longitude , altitude = 0. , pressure = 101325. ,
600+ temperature = 12. , horizon = '+0:00' ):
601601 """
602602 Calculate the solar position using the PyEphem package.
603603
@@ -611,11 +611,11 @@ def pyephem(time, latitude, longitude, altitude=0, pressure=101325,
611611 longitude : float
612612 Longitude in decimal degrees. Positive east of prime meridian,
613613 negative to west.
614- altitude : float, default 0
614+ altitude : float, default 0.0
615615 Height above sea level in meters. [m]
616- pressure : int or float, optional, default 101325
616+ pressure : int or float, optional, default 101325.0
617617 air pressure in Pascals.
618- temperature : int or float, optional, default 12
618+ temperature : int or float, optional, default 12.0
619619 air temperature in degrees C.
620620 horizon : string, optional, default '+0:00'
621621 arc degrees:arc minutes from geometrical horizon for sunrise and
@@ -685,7 +685,7 @@ def pyephem(time, latitude, longitude, altitude=0, pressure=101325,
685685 return sun_coords
686686
687687
688- def ephemeris (time , latitude , longitude , pressure = 101325 , temperature = 12 ):
688+ def ephemeris (time , latitude , longitude , pressure = 101325.0 , temperature = 12.0 ):
689689 """
690690 Python-native solar position calculator.
691691 The accuracy of this code is not guaranteed.
@@ -701,9 +701,9 @@ def ephemeris(time, latitude, longitude, pressure=101325, temperature=12):
701701 longitude : float
702702 Longitude in decimal degrees. Positive east of prime meridian,
703703 negative to west.
704- pressure : float or Series, default 101325
704+ pressure : float or Series, default 101325.0
705705 Ambient pressure (Pascals)
706- temperature : float or Series, default 12
706+ temperature : float or Series, default 12.0
707707 Ambient temperature (C)
708708
709709 Returns
@@ -862,7 +862,7 @@ def ephemeris(time, latitude, longitude, pressure=101325, temperature=12):
862862
863863
864864def calc_time (lower_bound , upper_bound , latitude , longitude , attribute , value ,
865- altitude = 0 , pressure = 101325 , temperature = 12 , horizon = '+0:00' ,
865+ altitude = 0.0 , pressure = 101325.0 , temperature = 12.0 , horizon = '+0:00' ,
866866 xtol = 1.0e-12 ):
867867 """
868868 Calculate the time between lower_bound and upper_bound
@@ -885,12 +885,12 @@ def calc_time(lower_bound, upper_bound, latitude, longitude, attribute, value,
885885 and 'az' (which must be given in radians).
886886 value : int or float
887887 The value of the attribute to solve for
888- altitude : float, default 0
888+ altitude : float, default 0.0
889889 Distance above sea level.
890- pressure : int or float, optional, default 101325
890+ pressure : int or float, optional, default 101325.0
891891 Air pressure in Pascals. Set to 0 for no
892892 atmospheric correction.
893- temperature : int or float, optional, default 12
893+ temperature : int or float, optional, default 12.0
894894 Air temperature in degrees C.
895895 horizon : string, optional, default '+0:00'
896896 arc degrees:arc minutes from geometrical horizon for sunrise and
0 commit comments