Practical Astronomy
practical_astronomy.pa_sun Namespace Reference

Functions

def approximate_position_of_sun (lct_hours, lct_minutes, lct_seconds, local_day, local_month, local_year, is_daylight_saving, zone_correction)
 
def precise_position_of_sun (lct_hours, lct_minutes, lct_seconds, local_day, local_month, local_year, is_daylight_saving, zone_correction)
 
def sun_distance_and_angular_size (lct_hours, lct_minutes, lct_seconds, local_day, local_month, local_year, is_daylight_saving, zone_correction)
 
def sunrise_and_sunset (local_day, local_month, local_year, is_daylight_saving, zone_correction, geographical_long_deg, geographical_lat_deg)
 
def morning_and_evening_twilight (local_day, local_month, local_year, is_daylight_saving, zone_correction, geographical_long_deg, geographical_lat_deg, twilight_type)
 
def equation_of_time (gwdate_day, gwdate_month, gwdate_year)
 
def solar_elongation (ra_hour, ra_min, ra_sec, dec_deg, dec_min, dec_sec, gwdate_day, gwdate_month, gwdate_year)
 

Function Documentation

◆ approximate_position_of_sun()

def practical_astronomy.pa_sun.approximate_position_of_sun (   lct_hours,
  lct_minutes,
  lct_seconds,
  local_day,
  local_month,
  local_year,
  is_daylight_saving,
  zone_correction 
)
    Calculate approximate position of the sun for a local date and time.

    Arguments:
        lct_hours -- Local civil time, in hours.
        lct_minutes -- Local civil time, in minutes.
        lct_seconds -- Local civil time, in seconds.
        local_day -- Local date, day part.
        local_month -- Local date, month part.
        local_year -- Local date, year part.
        is_daylight_saving -- Is daylight savings in effect?
        zone_correction -- Time zone correction, in hours.

    Returns:
        sun_ra_hour -- Right Ascension of Sun, hour part
        sun_ra_min -- Right Ascension of Sun, minutes part
        sun_ra_sec -- Right Ascension of Sun, seconds part
        sun_dec_deg -- Declination of Sun, degrees part
        sun_dec_min -- Declination of Sun, minutes part
        sun_dec_sec -- Declination of Sun, seconds part

◆ equation_of_time()

def practical_astronomy.pa_sun.equation_of_time (   gwdate_day,
  gwdate_month,
  gwdate_year 
)
    Calculate the equation of time. (The difference between the real Sun time and the mean Sun time.)
    
    Arguments:
        gwdate_day -- Greenwich date (day part)
        gwdate_month -- Greenwich date (month part)
        gwdate_year -- Greenwich date (year part)

    Returns:
        equation_of_time_min -- equation of time (minute part)
        equation_of_time_sec -- equation of time (seconds part)

◆ morning_and_evening_twilight()

def practical_astronomy.pa_sun.morning_and_evening_twilight (   local_day,
  local_month,
  local_year,
  is_daylight_saving,
  zone_correction,
  geographical_long_deg,
  geographical_lat_deg,
  twilight_type 
)
    Calculate times of morning and evening twilight.

    Arguments:
        local_day -- Local date, day part.
        local_month -- Local date, month part.
        local_year -- Local date, year part.
        is_daylight_saving -- Is daylight savings in effect?
        zone_correction -- Time zone correction, in hours.
        geographical_long_deg -- Geographical longitude, in degrees.
        geographical_lat_deg -- Geographical latitude, in degrees.
        twilight_type -- "C" (civil), "N" (nautical), or "A" (astronomical)

    Returns:
        am_twilight_begins_hour -- Beginning of AM twilight (hour part)
        am_twilight_begins_min -- Beginning of AM twilight (minutes part)
        pm_twilight_ends_hour -- Ending of PM twilight (hour part)
        pm_twilight_ends_min -- Ending of PM twilight (minutes part)
        status -- Calculation status

◆ precise_position_of_sun()

def practical_astronomy.pa_sun.precise_position_of_sun (   lct_hours,
  lct_minutes,
  lct_seconds,
  local_day,
  local_month,
  local_year,
  is_daylight_saving,
  zone_correction 
)
    Calculate precise position of the sun for a local date and time.

    Arguments:
        lct_hours -- Local civil time, in hours.
        lct_minutes -- Local civil time, in minutes.
        lct_seconds -- Local civil time, in seconds.
        local_day -- Local date, day part.
        local_month -- Local date, month part.
        local_year -- Local date, year part.
        is_daylight_saving -- Is daylight savings in effect?
        zone_correction -- Time zone correction, in hours.

    Returns:
        sun_ra_hour -- Right Ascension of Sun, hour part
        sun_ra_min -- Right Ascension of Sun, minutes part
        sun_ra_sec -- Right Ascension of Sun, seconds part
        sun_dec_deg -- Declination of Sun, degrees part
        sun_dec_min -- Declination of Sun, minutes part
        sun_dec_sec -- Declination of Sun, seconds part

◆ solar_elongation()

def practical_astronomy.pa_sun.solar_elongation (   ra_hour,
  ra_min,
  ra_sec,
  dec_deg,
  dec_min,
  dec_sec,
  gwdate_day,
  gwdate_month,
  gwdate_year 
)
    Calculate solar elongation for a celestial body.

    Solar elongation is the angle between the lines of sight from the Earth to the Sun and from the Earth to the celestial body.

    Arguments:
        ra_hour -- Right Ascension, hour part
        ra_min -- Right Ascension, minutes part
        ra_sec -- Right Ascension, seconds part
        dec_deg -- Declination, degrees part
        dec_min -- Declination, minutes part
        dec_sec -- Declination, seconds part
        gwdate_day -- Greenwich Date, day part
        gwdate_month -- Greenwich Date, month part
        gwdate_year -- Greenwich Date, year part

    Returns:
        solar_elongation_deg -- Solar elongation, in degrees

◆ sun_distance_and_angular_size()

def practical_astronomy.pa_sun.sun_distance_and_angular_size (   lct_hours,
  lct_minutes,
  lct_seconds,
  local_day,
  local_month,
  local_year,
  is_daylight_saving,
  zone_correction 
)
    Calculate distance to the Sun (in km), and angular size.

    Arguments:
        lct_hours -- Local civil time, in hours.
        lct_minutes -- Local civil time, in minutes.
        lct_seconds -- Local civil time, in seconds.
        local_day -- Local date, day part.
        local_month -- Local date, month part.
        local_year -- Local date, year part.
        is_daylight_saving -- Is daylight savings in effect?
        zone_correction -- Time zone correction, in hours.

    Returns:
        sun_dist_km -- Sun's distance, in kilometers
        sun_ang_size_deg -- Sun's angular size (degrees part)
        sun_ang_size_min -- Sun's angular size (minutes part)
        sun_ang_size_sec -- Sun's angular size (seconds part)

◆ sunrise_and_sunset()

def practical_astronomy.pa_sun.sunrise_and_sunset (   local_day,
  local_month,
  local_year,
  is_daylight_saving,
  zone_correction,
  geographical_long_deg,
  geographical_lat_deg 
)
    Calculate local sunrise and sunset.

    Arguments:
        local_day -- Local date, day part.
        local_month -- Local date, month part.
        local_year -- Local date, year part.
        is_daylight_saving -- Is daylight savings in effect?
        zone_correction -- Time zone correction, in hours.
        geographical_long_deg -- Geographical longitude, in degrees.
        geographical_lat_deg -- Geographical latitude, in degrees.

    Returns:
        local_sunrise_hour -- Local sunrise, hour part
        local_sunrise_minute -- Local sunrise, minutes part
        local_sunset_hour -- Local sunset, hour part
        local_sunset_minute -- Local sunset, minutes part
        azimuth_of_sunrise_deg -- Azimuth (horizon direction) of sunrise, in degrees
        azimuth_of_sunset_deg -- Azimuth (horizon direction) of sunset, in degrees
        status -- Calculation status