BaseCalendar¶
- class badidatetime.tests.test_base_calendar.TestBaseCalendar(name)[source]¶
Bases:
TestCase- _classSetupFailed = False¶
- _class_cleanups = []¶
- test__PARTIAL_DAY_TO_HOURS()[source]¶
Test that the _PARTIAL_DAY_TO_HOURS lambda returns the correct hours.
- test__PARTIAL_HOUR_TO_MINUTE()[source]¶
Test that the _PARTIAL_HOUR_TO_MINUTE lambda returns the correct minutes.
- test__PARTIAL_MINUTE_TO_SECOND()[source]¶
Test that the _PARTIAL_MINUTE_TO_SECOND lambda returns the correct seconds.
- test__PARTIAL_SECOND_TO_MICROSECOND()[source]¶
Test that the _PARTIAL_SECOND_TO_MICROSECOND lambda returns the correct microseconds.
- test__aberration()[source]¶
Test that the _aberration method returns the correct aberration of the given date in degrees.
- test__apparent_sidereal_time_greenwich()[source]¶
Test that the apparent_sidereal_time_greenwich method returns the correct apparent sidereal time.
- test__apparent_solar_latitude()[source]¶
Test that the _apparent_solar_latitudemethod returns the correct values.
- test__apparent_solar_longitude()[source]¶
Test that the _apparent_solar_longitude method returns the longitude of sun at moment tee.
Equinox & Solstice Calculator: https://stellafane.org/misc/equinox.html
Solar Position Calculator: https://gml.noaa.gov/grad/solcalc/
Greenwich:lat: 51, 29, 36.24 N (51.4934)lon: 00, 00, 05.562 W (-0.001545)Data from the book pages 225, 446 and 452
Name
Solar Longitude
Approximate Date
Season Length
Vernal (spring) equinox
0◦
March 20
92.76 days
Summer solstice
90◦
June 21
93.65 days
Autumnal (fall) equinox
180◦
September 22−23
89.84 days
Winter solstice
270◦
December 21−22
88.99 days
- test__approx_julian_day_for_equinoxes_or_solstices()[source]¶
Test that the _approx_julian_day_for_equinoxes_or_solstices method returns a Julian day of the equinoxes or solstices.
- test__approx_local_hour_angle()[source]¶
Test that the _approx_local_hour_angle method returns the correct angle based on the jde.
The variable ‘self.bc.latitude’ is the latitude in Tehran Iran.
- test__cos_deg()[source]¶
Test that the _cos_deg method returns the cosine of theta (given in degrees).
- test__coterminal_angle()[source]¶
Test that the _coterminal_angle method converts degrees greater or less that 360 degrees to a number between 0 and 360 degrees.
- test__days_in_years()[source]¶
Test that the _days_in_years method returns the number of days including year one (Gregorian) to the given year.
- test__decimal_day_from_hms()[source]¶
Test that the _decimal_day_from_hms method returns the correct decimal part of the day.
- test__decimal_from_dms()[source]¶
Test that the method _decimal_from_dms correctly converts degrees, minutes, and seconds into a decimal number.
https://warble.com/blog/2017/11/05/virtually-hovering-over-holy-places/
The Shrine of Baha’u’llah: 32°56’36.86″N, 35°5’30.38″ EThe Shrine of The Bab: 32°48’52.49″N, 34°59’13.91″ EThe Guardian’s Resting Place: 51°37’21.85″N, 0°08’35.57″ W
- test__degrees_from_hms()[source]¶
Test that the _degrees_from_hms method converts hours, minutes, and seconds into degrees properly.
- test__delta_t()[source]¶
Test that the _delta_t method returns the correct delta T value for converting between UT and DT time.
To check for valid values see: https://planetcalc.com/9200/
- test__dhms_from_seconds()[source]¶
Test that the _dhms_from_seconds method converts seconds into hours, minutes, and seconds properly.
- test__dms_from_decimal()[source]¶
Test that the _dms_from_decimal method correctly converts a decimal representation of a latitude or longitude into degrees, minutes, and seconds.
- test__eccentricity_earth_orbit()[source]¶
Test that the _eccentricity_earth_orbit method returns the correct values.
- test__exact_from_meeus()[source]¶
Test that the _exact_from_meeus method returns the correct difference needed to compensate for the differences in the Meeus and the exact algorithms.
- test__find_moment_of_equinoxes_or_solstices()[source]¶
Test that the _find_moment_of_equinoxes_or_solstices method returns the correct equinoxe and solstice R.D. moments for the given years.
- test__heliocentric_ecliptical_latitude()[source]¶
Test that the _heliocentric_ecliptical_latitude method returns the correct values.
- test__heliocentric_ecliptical_longitude()[source]¶
Test that the _heliocentric_ecliptical_longitude method returns the correct values.
- test__hms_from_decimal_day()[source]¶
Test that the _hms_from_decimal_day method returns hours, minutes, and seconds deom a decimal number.
- test__hms_from_degrees()[source]¶
Test that the _hms_from_degrees method converts degrees to hours, minutes, and seconds properly.
- test__interpolation_from_three()[source]¶
Test that the _interpolation_from_three method interpolates from three values an estimate of a forth value.
See AA Example 3.a and 3.b
- test__local_zone_correction()[source]¶
Test that the _local_zone_correction method converts a Julian Period day fraction to the without zone information to one with zone information.
- test__mean_moon_elongation()[source]¶
Test that the _mean_moon_elongation method returns the correct values.
- test__mean_sidereal_time_greenwich()[source]¶
Test that the _mean_sidereal_time_greenwich method returns the correct mean sidereal time.
- test__meeus_from_exact()[source]¶
Test that the _meeus_from_exact method returns the correct difference needed to compensate for the differences in the exact and the Meeus algorithms.
- test__moon_ascending_node_longitude()[source]¶
Test that the _moon_ascending_node_longitude method returns the correct values.
- test__moon_mean_anomaly()[source]¶
Test that the _moon_mean_anomaly method returns the correct values.
- test__nutation_longitude()[source]¶
Test that the _nutation_longitude method returns the correct values.
- test__nutation_obliquity()[source]¶
Test that the _nutation_obliquity method returns the correct values.
- test__nutation_obliquity_longitude()[source]¶
Test that the _nutation_obliquity_longitude method returns the correct values.
- test__rising_setting()[source]¶
https://www.timeanddate.com/sun/usa/boston?month=3&year=1988
rise=5.47 am, set=5.56 pmlat 42.364506, lon -71.038887(2447240.5, -71.0833, -5.0, 0),
- test__sec_microsec_from_seconds()[source]¶
Test that the _sec_microsec_from_seconds method returns the seconds and microseconds from a second + partian as in 10.75 seconds.
- test__seconds_from_dhms()[source]¶
Test that the _seconds_from_dhms method converts hours minutes, and seconds to seconds.
- test__sigma()[source]¶
Test that the sigma method returns a sum of the provided lists wuth the given function (condition).
- test__sin_deg()[source]¶
Test that the _sin_deg method returns the sine of theta (given in degrees).
- test__sun_apparent_declination()[source]¶
Test that the _apparent_declination method returns the proper apparent declination measured (from 0° to 90°) from the equator, positive to the north, negative to the south.
- test__sun_apparent_right_ascension()[source]¶
Test that the _sun_apparent_right_ascension method returns the correct angle based on the jde.
- test__sun_earth_mean_anomaly()[source]¶
Test that the _sun_earth_mean_anomaly method returns the correct values.
- test__sun_equation_of_center()[source]¶
Test that the _sun_equation_of_center method returns the correct values.
- test__sun_mean_longitude()[source]¶
Test that the _sun_mean_longitude returns the proper angle from the sun.
- test__sun_setting()[source]¶
Test that the _sun_setting method returns the correct sunset for a given date represented by a Julian Period day.
- test__sun_transit()[source]¶
Test that the _sun_transit method returns the correct transition based on the jde.
- test__true_obliquity_of_ecliptic()[source]¶
Test that the _true_obliquity_of_ecliptic method returns the correct true obliquity of the ecliptic.
- test__truncate_decimal()[source]¶
Test that the _truncate_decimal method correctly truncates a decimal value.
- test__tz_decimal_from_dhms()[source]¶
Test that the _tz_decimal_from_dhms method converts hours, minutes, and seconds of a time zone to a decimal number representing degrees.