isofit.core.sunposition ======================= .. py:module:: isofit.core.sunposition Classes ------- .. autoapisummary:: isofit.core.sunposition._sp isofit.core.sunposition.Sunposition Functions --------- .. autoapisummary:: isofit.core.sunposition.julian_day isofit.core.sunposition.arcdist isofit.core.sunposition.observed_sunpos isofit.core.sunposition.topocentric_sunpos isofit.core.sunposition.sunpos Module Contents --------------- .. py:class:: _sp . .. py:method:: calendar_time(dt) :staticmethod: . .. py:method:: julian_day(dt) :staticmethod: Calculate the Julian Day from a datetime.datetime object in UTC. .. py:method:: julian_ephemeris_day(jd, deltat) :staticmethod: Calculate the Julian Ephemeris Day from the Julian Day and delta-time = (terrestrial time - universal time) in seconds. .. py:method:: julian_century(jd) :staticmethod: Caluclate the Julian Century from Julian Day or Julian Ephemeris Day. .. py:method:: julian_millennium(jc) :staticmethod: Calculate the Julian Millennium from Julian Ephemeris Century. .. py:attribute:: _EHL_ :value: [[(175347046, 0.0, 0.0), (3341656, 4.6692568, 6283.07585), (34894, 4.6261, 12566.1517), (3497,... .. py:attribute:: _EHB_ :value: [[(280, 3.199, 84334.662), (102, 5.422, 5507.553), (80, 3.88, 5223.69), (44, 3.7, 2352.87), (32,... .. py:attribute:: _EHR_ :value: [[(100013989, 0.0, 0.0), (1670700, 3.0984635, 6283.07585), (13956, 3.05525, 12566.1517), (3084,... .. py:method:: heliocentric_longitude(jme) :staticmethod: Compute the Earth Heliocentric Longitude (L) in degrees given the Julian Ephemeris Millennium. .. py:method:: heliocentric_latitude(jme) :staticmethod: Compute the Earth Heliocentric Latitude (B) in degrees given the Julian Ephemeris Millennium. .. py:method:: heliocentric_radius(jme) :staticmethod: Compute the Earth Heliocentric Radius (R) in astronimical units given the Julian Ephemeris Millennium. .. py:method:: heliocentric_position(jme) :staticmethod: Compute the Earth Heliocentric Longitude, Latitude, and Radius given the Julian Ephemeris Millennium. Returns (L, B, R) where L = longitude in degrees, B = latitude in degrees, and R = radius in astronimical units. .. py:method:: geocentric_position(helio_pos) :staticmethod: Compute the geocentric latitude (Theta) and longitude (beta) (in degrees) of the sun given Earth's heliocentric position (L, B, R). .. py:attribute:: _NLOY_ .. py:attribute:: _NLOab_ .. py:attribute:: _NLOcd_ .. py:method:: ecliptic_obliquity(jme, delta_epsilon) :staticmethod: Calculate the true obliquity of the ecliptic (epsilon, in degrees) given the Julian Ephemeris Millennium and the obliquity. .. py:method:: nutation_obliquity(jce) :staticmethod: Compute the nutation in longitude (delta_psi) and the true obliquity (epsilon) given the Julian Ephemeris Century. .. py:method:: abberation_correction(R) :staticmethod: Calculate the abberation correction (delta_tau, in degrees) given the Earth Heliocentric Radius (in AU). .. py:method:: sun_longitude(helio_pos, delta_psi) :staticmethod: Calculate the apparent sun longitude (lambda, in degrees) and geocentric longitude (beta, in degrees) given the earth heliocentric position and delta_psi. .. py:method:: greenwich_sidereal_time(jd, delta_psi, epsilon) :staticmethod: Calculate the apparent Greenwich sidereal time (v, in degrees) given the Julian Day. .. py:method:: sun_ra_decl(llambda, epsilon, beta) :staticmethod: Calculate the sun's geocentric right ascension (alpha, in degrees) and declination (delta, in degrees). .. py:method:: sun_topo_ra_decl_hour(latitude, longitude, elevation, jd, delta_t=0) :staticmethod: Calculate the sun's topocentric right ascension (alpha'), declination (delta'), and hour angle (H'). .. py:method:: sun_topo_azimuth_zenith(latitude, delta_prime, H_prime, temperature=14.6, pressure=1013) :staticmethod: Compute the sun's topocentric azimuth and zenith angles. Azimuth is measured eastward from north, zenith from vertical. Temperature = average temperature in C (default is 14.6 = global average in 2013). Pressure = average pressure in mBar (default 1013 = global average). .. py:method:: norm_lat_lon(lat, lon) :staticmethod: . .. py:method:: topo_pos(t, lat, lon, elev, temp, press, dt) :staticmethod: Compute RA,dec,H, all in degrees. .. py:method:: pos(t, lat, lon, elev, temp, press, dt) :staticmethod: Compute azimute,zenith,RA,dec,H all in degree. .. py:function:: julian_day(dt) Convert UTC datetimes or UTC timestamps to Julian days. :param dt: UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp) :type dt: array_like :returns: **jd** -- datetimes converted to fractional Julian days :rtype: ndarray .. py:function:: arcdist(p0, p1, radians=False) Angular distance between azimuth, zenith pairs. :param p0: :type p0: array_like, shape (..., 2) :param p1: p[...,0] = azimuth angles, p[...,1] = zenith angles :type p1: array_like, shape (..., 2) :param radians: If False, angles are in degrees, otherwise in radians :type radians: boolean (default False) :returns: **ad** -- Arcdistances between corresponding pairs in p0,p1 In degrees by default, in radians if radians=True :rtype: array_like, shape is broadcast(p0,p1).shape .. py:function:: observed_sunpos(dt, latitude, longitude, elevation, temperature=None, pressure=None, delta_t=0, radians=False) Compute the observed coordinates of the sun as viewed at the given time and location. :param dt: UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp) representing the times of observations :type dt: array_like :param latitude: decimal degrees, positive for north of the equator and east of Greenwich :type latitude: array_like :param longitude: decimal degrees, positive for north of the equator and east of Greenwich :type longitude: array_like :param elevation: meters, relative to the WGS-84 ellipsoid :type elevation: array_like :param temperature: celcius, default is 14.6 (global average in 2013) :type temperature: array_like or None, optional :param pressure: millibar, default is 1013 (global average in ??) :type pressure: array_like or None, optional :param delta_t: seconds, default is 0, difference between the earth's rotation time (TT) and universal time (UT) :type delta_t: array_like, optional :param radians: return results in radians if True, degrees if False (default) :type radians: {True, False}, optional :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 :rtype: ndarray, (...,2) .. py:function:: topocentric_sunpos(dt, latitude, longitude, temperature=None, pressure=None, delta_t=0, radians=False) Compute the topocentric coordinates of the sun as viewed at the given time and location. :param dt: UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp) representing the times of observations :type dt: array_like :param latitude: decimal degrees, positive for north of the equator and east of Greenwich :type latitude: array_like :param longitude: decimal degrees, positive for north of the equator and east of Greenwich :type longitude: array_like :param elevation: meters, relative to the WGS-84 ellipsoid :type elevation: array_like :param temperature: celcius, default is 14.6 (global average in 2013) :type temperature: array_like or None, optional :param pressure: millibar, default is 1013 (global average in ??) :type pressure: array_like or None, optional :param delta_t: seconds, default is 0, difference between the earth's rotation time (TT) and universal time (UT) :type delta_t: array_like, optional :param radians: return results in radians if True, degrees if False (default) :type radians: {True, False}, optional :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 :rtype: ndarray, (...,3) .. py:function:: sunpos(dt, latitude, longitude, elevation, temperature=None, pressure=None, delta_t=0, radians=False) Compute the observed and topocentric coordinates of the sun as viewed at the given time and location. :param dt: UTC datetime objects or UTC timestamps (as per datetime.utcfromtimestamp) representing the times of observations :type dt: array_like :param latitude: decimal degrees, positive for north of the equator and east of Greenwich :type latitude: array_like :param longitude: decimal degrees, positive for north of the equator and east of Greenwich :type longitude: array_like :param elevation: meters, relative to the WGS-84 ellipsoid :type elevation: array_like :param temperature: celcius, default is 14.6 (global average in 2013) :type temperature: array_like or None, optional :param pressure: millibar, default is 1013 (global average in ??) :type pressure: array_like or None, optional :param delta_t: seconds, default is 0, difference between the earth's rotation time (TT) and universal time (UT) :type delta_t: array_like, optional :param radians: return results in radians if True, degrees if False (default) :type radians: {True, False}, optional :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 :rtype: ndarray, (...,5) .. py:class:: Sunposition(t, lat, lon, elev, temp, p, dt, rad, csv=False) Compute sun position parameters given the time and location. .. py:attribute:: t :value: None .. py:attribute:: elev :value: None .. py:attribute:: temp :value: None .. py:attribute:: p :value: None .. py:attribute:: dt :value: None .. py:attribute:: rad :value: None .. py:attribute:: az :value: None .. py:attribute:: zen :value: None .. py:attribute:: ra :value: None .. py:attribute:: dec :value: None .. py:attribute:: h :value: None .. py:attribute:: lat .. py:attribute:: lon .. py:property:: citation Print the citation.