isofit.core.sunposition
- julian_day(dt)[source]
Convert UTC datetimes or UTC timestamps to Julian days.
- Parameters:
dt (array_like) – UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp)
- Returns:
jd – datetimes converted to fractional Julian days
- Return type:
ndarray
- arcdist(p0, p1, radians=False)[source]
Angular distance between azimuth, zenith pairs.
- Parameters:
p0 (array_like, shape (..., 2)) –
p1 (array_like, shape (..., 2)) – p[…,0] = azimuth angles, p[…,1] = zenith angles
radians (boolean (default False)) – If False, angles are in degrees, otherwise in radians
- Returns:
ad – Arcdistances between corresponding pairs in p0,p1 In degrees by default, in radians if radians=True
- Return type:
array_like, shape is broadcast(p0,p1).shape
- observed_sunpos(dt, latitude, longitude, elevation, temperature=None, pressure=None, delta_t=0, radians=False)[source]
Compute the observed coordinates of the sun as viewed at the given time and location.
- Parameters:
dt (array_like) – UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp) representing the times of observations
latitude (array_like) – decimal degrees, positive for north of the equator and east of Greenwich
longitude (array_like) – decimal degrees, positive for north of the equator and east of Greenwich
elevation (array_like) – meters, relative to the WGS-84 ellipsoid
temperature (array_like or None, optional) – celcius, default is 14.6 (global average in 2013)
pressure (array_like or None, optional) – millibar, default is 1013 (global average in ??)
delta_t (array_like, optional) – seconds, default is 0, difference between the earth’s rotation time (TT) and universal time (UT)
radians ({True, False}, optional) – return results in radians if True, degrees if False (default)
- Returns:
coords – The shape of the array is parameters broadcast together, plus a final dimension for the coordinates. coords[…,0] = observed azimuth angle, measured eastward from north coords[…,1] = observed zenith angle, measured down from vertical
- Return type:
ndarray, (…,2)
- topocentric_sunpos(dt, latitude, longitude, temperature=None, pressure=None, delta_t=0, radians=False)[source]
Compute the topocentric coordinates of the sun as viewed at the given time and location.
- Parameters:
dt (array_like) – UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp) representing the times of observations
latitude (array_like) – decimal degrees, positive for north of the equator and east of Greenwich
longitude (array_like) – decimal degrees, positive for north of the equator and east of Greenwich
elevation (array_like) – meters, relative to the WGS-84 ellipsoid
temperature (array_like or None, optional) – celcius, default is 14.6 (global average in 2013)
pressure (array_like or None, optional) – millibar, default is 1013 (global average in ??)
delta_t (array_like, optional) – seconds, default is 0, difference between the earth’s rotation time (TT) and universal time (UT)
radians ({True, False}, optional) – return results in radians if True, degrees if False (default)
- Returns:
coords – The shape of the array is parameters broadcast together, plus a final dimension for the coordinates. coords[…,0] = topocentric right ascension coords[…,1] = topocentric declination coords[…,2] = topocentric hour angle
- Return type:
ndarray, (…,3)
- sunpos(dt, latitude, longitude, elevation, temperature=None, pressure=None, delta_t=0, radians=False)[source]
Compute the observed and topocentric coordinates of the sun as viewed at the given time and location.
- Parameters:
dt (array_like) – UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp) representing the times of observations
latitude (array_like) – decimal degrees, positive for north of the equator and east of Greenwich
longitude (array_like) – decimal degrees, positive for north of the equator and east of Greenwich
elevation (array_like) – meters, relative to the WGS-84 ellipsoid
temperature (array_like or None, optional) – celcius, default is 14.6 (global average in 2013)
pressure (array_like or None, optional) – millibar, default is 1013 (global average in ??)
delta_t (array_like, optional) – seconds, default is 0, difference between the earth’s rotation time (TT) and universal time (UT)
radians ({True, False}, optional) – return results in radians if True, degrees if False (default)
- Returns:
coords – The shape of the array is parameters broadcast together, plus a final dimension for the coordinates. coords[…,0] = observed azimuth angle, measured eastward from north coords[…,1] = observed zenith angle, measured down from vertical coords[…,2] = topocentric right ascension coords[…,3] = topocentric declination coords[…,4] = topocentric hour angle
- Return type:
ndarray, (…,5)
- class Sunposition(t, lat, lon, elev, temp, p, dt, rad, csv=False)[source]
Bases:
object
Compute sun position parameters given the time and location.
- lat = None
- lon = None
- elev = None
- temp = None
- p = None
- dt = None
- rad = None
- t = None
- az = None
- zen = None
- ra = None
- dec = None
- h = None
- property citation
Print the citation.