Add some more magnitude links, and remove "pass"es

This commit is contained in:
Brandon Rhodes 2020-03-27 16:30:01 -04:00
parent 169e7950bb
commit 50bb465e0c
2 changed files with 12 additions and 5 deletions

View File

@ -4,6 +4,18 @@ Planetary routines adapted from:
https://arxiv.org/pdf/1808.01973.pdf
Which links to:
https://sourceforge.net/projects/planetary-magnitudes/
Which has directories with three successive versions of their magnitude
computation, the most recent of which provides the files on which this
Python code is based:
Ap_Mag_V3.f90
Ap_Mag_Output_V3.txt
Ap_Mag_Input_V3.txt
"""
from numpy import log10

View File

@ -2,19 +2,16 @@
from skyfield import magnitudelib as m
def test_mercury_magnitude_function():
pass
assert abs(-2.477 - m.mercury_magnitude(0.310295423552, 1.32182643625754, 1.1677)) < 0.0005
assert abs(0.181 - m.mercury_magnitude(0.413629222334, 0.92644808718613, 90.1662)) < 0.0005
assert abs(7.167 - m.mercury_magnitude(0.448947624811, 0.56004973217883, 178.7284)) < 0.0005
def test_venus_magnitude_function():
pass
assert abs(-3.917 - m.venus_magnitude(0.722722540169, 1.71607489554051, 1.3232)) < 0.0005
assert abs(-4.916 - m.venus_magnitude(0.721480714554, 0.37762511206278, 124.1348)) < 0.0005
assert abs(-3.090 - m.venus_magnitude(0.726166592736, 0.28889582420642, 179.1845)) < 0.0005
def test_earth_magnitude_function():
pass
assert abs(-3.269 - m.earth_magnitude(0.983331936476, 1.41317594650699, 8.7897)) < 0.0005
assert abs(-6.909 - m.earth_magnitude(0.983356079811, 0.26526856764726, 4.1369)) < 0.0005
assert abs(1.122 - m.earth_magnitude(0.983356467727, 0.62933287342927, 175.6869)) < 0.0005
@ -23,7 +20,6 @@ def test_mars_magnitude_function():
pass
def test_jupiter_magnitude_function():
pass
assert abs(-1.667 - m.jupiter_magnitude(5.446231815414, 6.44985867459088, 0.2446)) < 0.0005
assert abs(-2.934 - m.jupiter_magnitude(4.957681473205, 3.95393078136013, 0.3431)) < 0.0005
assert abs(0.790 - m.jupiter_magnitude(5.227587855371, 5.23501920009381, 147.0989)) < 0.0005
@ -32,7 +28,6 @@ def test_saturn_magnitude_function():
pass
def test_uranus_magnitude_function():
pass
assert abs(5.381 - m.uranus_magnitude(18.321003215845, 17.3229728525108, 0.0410, -20.29, -20.28)) < 0.0005
assert abs(6.025 - m.uranus_magnitude(20.096361095266, 21.0888470145276, 0.0568, 1.02, 0.97)) < 0.0005
assert abs(8.318 - m.uranus_magnitude(19.38003071775, 11.1884243801383, 161.7728, -71.16, 55.11)) < 0.0005