def _calculate_solar_geometry(self, datetime):
month = datetime.month<EOL>day = datetime.day<EOL>hour = datetime.hour<EOL>minute = datetime.minute<EOL>year = <NUM_LIT> if self.is_leap_year else <NUM_LIT><EOL>def find_fraction_of_24(hour, minute):<EOL><INDENT>"""<STR_LIT>"""<EOL>return round((minute + hour * <NUM_LIT>) / <NUM_LIT>, <NUM_LIT:2>)<EOL><DEDENT>def days_from_010119(year, month, day):<EOL><INDENT>"""<STR_LIT>"""<EOL>years = range(<NUM_LIT>, year)<EOL>def is_leap_year(year):<EOL><INDENT>"""<STR_LIT>"""<EOL>return year % <NUM_LIT:4> == <NUM_LIT:0> and (year % <NUM_LIT:100> != <NUM_LIT:0> or year % <NUM_LIT> == <NUM_LIT:0>)<EOL><DEDENT>days_in_year = []<EOL>for item in years:<EOL><INDENT>if is_leap_year(item):<EOL><INDENT>days_in_year.append(<NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>days_in_year.append(<NUM_LIT>)<EOL><DEDENT><DEDENT>days_in_precending_years = <NUM_LIT:0><EOL>for days in days_in_year:<EOL><INDENT>days_in_precending_years += days<EOL><DEDENT>if is_leap_year(year):<EOL><INDENT>month_dict = {<NUM_LIT:1>: <NUM_LIT>, <NUM_LIT:2>: <NUM_LIT>, <NUM_LIT:3>: <NUM_LIT>, <NUM_LIT:4>: <NUM_LIT:30>, <NUM_LIT:5>: <NUM_LIT>, <NUM_LIT:6>: <NUM_LIT:30>,<EOL><NUM_LIT:7>: <NUM_LIT>, <NUM_LIT:8>: <NUM_LIT>, <NUM_LIT:9>: <NUM_LIT:30>, <NUM_LIT:10>: <NUM_LIT>, <NUM_LIT:11>: <NUM_LIT:30>, <NUM_LIT:12>: <NUM_LIT>}<EOL><DEDENT>else:<EOL><INDENT>month_dict = {<NUM_LIT:1>: <NUM_LIT>, <NUM_LIT:2>: <NUM_LIT>, <NUM_LIT:3>: <NUM_LIT>, <NUM_LIT:4>: <NUM_LIT:30>, <NUM_LIT:5>: <NUM_LIT>, <NUM_LIT:6>: <NUM_LIT:30>,<EOL><NUM_LIT:7>: <NUM_LIT>, <NUM_LIT:8>: <NUM_LIT>, <NUM_LIT:9>: <NUM_LIT:30>, <NUM_LIT:10>: <NUM_LIT>, <NUM_LIT:11>: <NUM_LIT:30>, <NUM_LIT:12>: <NUM_LIT>}<EOL><DEDENT>"""<STR_LIT>"""<EOL>keys = tuple(month_dict.keys())<EOL>days_in_precending_months = <NUM_LIT:0><EOL>for i in range(month - <NUM_LIT:1>):<EOL><INDENT>days_in_precending_months += month_dict[keys[i]]<EOL><DEDENT>return days_in_precending_years + days_in_precending_months + day + <NUM_LIT:1><EOL><DEDENT>julian_day = days_from_010119(year, month, day) + <NUM_LIT> +find_fraction_of_24(hour, minute) - (float(self.time_zone) / <NUM_LIT>)<EOL>julian_century = (julian_day - <NUM_LIT>) / <NUM_LIT><EOL>geom_mean_long_sun = (<NUM_LIT> + julian_century *<EOL>(<NUM_LIT> + julian_century * <NUM_LIT>)<EOL>) % <NUM_LIT><EOL>geom_mean_anom_sun = <NUM_LIT> + julian_century *(<NUM_LIT> - <NUM_LIT> * julian_century)<EOL>eccent_orbit = <NUM_LIT> - julian_century *(<NUM_LIT> + <NUM_LIT> * julian_century)<EOL>sun_eq_of_ctr = math.sin(<EOL>math.radians(geom_mean_anom_sun)) *(<NUM_LIT> - julian_century * (<NUM_LIT> + <NUM_LIT> * julian_century)<EOL>) +math.sin(math.radians(<NUM_LIT:2> * geom_mean_anom_sun)) *(<NUM_LIT> - <NUM_LIT> * julian_century) +math.sin(math.radians(<NUM_LIT:3> * geom_mean_anom_sun)) *<NUM_LIT><EOL>sun_true_long = geom_mean_long_sun + sun_eq_of_ctr<EOL>sun_app_long = sun_true_long - <NUM_LIT> - <NUM_LIT> *math.sin(math.radians(<NUM_LIT> - <NUM_LIT> * julian_century))<EOL>mean_obliq_ecliptic = <NUM_LIT> +(<NUM_LIT> + ((<NUM_LIT> - julian_century * (<NUM_LIT> + julian_century *<EOL>(<NUM_LIT> - julian_century *<EOL><NUM_LIT>)))) / <NUM_LIT>) / <NUM_LIT><EOL>oblique_corr = mean_obliq_ecliptic + <NUM_LIT> *math.cos(math.radians(<NUM_LIT> - <NUM_LIT> * julian_century))<EOL>sol_dec = math.degrees(math.asin(math.sin(math.radians(oblique_corr)) *<EOL>math.sin(math.radians(sun_app_long))))<EOL>var_y = math.tan(math.radians(oblique_corr / <NUM_LIT:2>)) *math.tan(math.radians(oblique_corr / <NUM_LIT:2>))<EOL>eq_of_time = <NUM_LIT:4>* math.degrees(<EOL>var_y * math.sin(<NUM_LIT:2> * math.radians(geom_mean_long_sun)) -<EOL><NUM_LIT:2> * eccent_orbit * math.sin(math.radians(geom_mean_anom_sun)) +<EOL><NUM_LIT:4> * eccent_orbit * var_y *<EOL>math.sin(math.radians(geom_mean_anom_sun)) *<EOL>math.cos(<NUM_LIT:2> * math.radians(geom_mean_long_sun)) -<EOL><NUM_LIT:0.5> * (var_y ** <NUM_LIT:2>) *<EOL>math.sin(<NUM_LIT:4> * math.radians(geom_mean_long_sun)) -<EOL><NUM_LIT> * (eccent_orbit ** <NUM_LIT:2>) *<EOL>math.sin(<NUM_LIT:2> * math.radians(geom_mean_anom_sun))<EOL>)<EOL>return sol_dec, eq_of_time<EOL>
Calculate Solar geometry for an hour of the year.

        Attributes:
            datetime: A Ladybug datetime

        Returns:
            Solar declination: Solar declination in radians
            eq_of_time: Equation of time as minutes