def test_spa_c_physical_dst(expected_solpos): times = pd.date_range(datetime.datetime(2003,10,17,13,30,30), periods=1, freq='D', tz=golden.tz) ephem_data = solarposition.spa_c(times, golden.latitude, golden.longitude, pressure=82000, temperature=11) expected_solpos.index = times assert_frame_equal(expected_solpos, ephem_data[expected_solpos.columns])
def test_spa_physical(): times = pd.date_range(datetime.datetime(2003,10,17,12,30,30), periods=1, freq='D') try: ephem_data = solarposition.spa_c(times, golden_mst, pressure=82000, temperature=11).ix[0] except ImportError: raise SkipTest assert_almost_equals(39.872046, ephem_data['elevation'], 6) assert_almost_equals(50.111622, ephem_data['apparent_zenith'], 6) assert_almost_equals(194.340241, ephem_data['azimuth'], 6) assert_almost_equals(39.888378, ephem_data['apparent_elevation'], 6)
def test_spa_c_physical_dst(): times = pd.date_range(datetime.datetime(2003,10,17,13,30,30), periods=1, freq='D', tz=golden.tz) try: ephem_data = solarposition.spa_c(times, golden.latitude, golden.longitude, pressure=82000, temperature=11) except ImportError: raise SkipTest this_expected = expected.copy() this_expected.index = times assert_frame_equal(this_expected, ephem_data[expected.columns])
def test_spa_c_physical_dst(): times = pd.date_range(datetime.datetime(2003, 10, 17, 13, 30, 30), periods=1, freq='D', tz=golden.tz) try: ephem_data = solarposition.spa_c(times, golden.latitude, golden.longitude, pressure=82000, temperature=11) except ImportError: raise SkipTest this_expected = expected.copy() this_expected.index = times assert_frame_equal(this_expected, ephem_data[expected.columns])
def test_spa_localization(): try: assert_frame_equal(solarposition.spa_c(times, tus), solarposition.spa_c(times_localized, tus)) except ImportError: raise SkipTest