mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-05-24 08:45:55 -04:00
Python/Windows: added rotation and refraction unit tests.
Also had to adjust a couple of error thresholds. Windows version of Python calculates slightly different numbers than Linux version. Perhaps a difference in runtime libraries?
This commit is contained in:
@@ -218,6 +218,12 @@ echo.Running Python tests.
|
||||
test.py time
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
test.py refraction
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
test.py rotation
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
test.py apsis
|
||||
if errorlevel 1 (exit /b 1)
|
||||
|
||||
|
||||
@@ -896,7 +896,7 @@ def Test_EQD_HOR(body):
|
||||
check_eqd = astronomy.RotateVector(irot, vec_hor)
|
||||
diff = VectorDiff(check_eqd, vec_eqd)
|
||||
print('Test_EQD_HOR {}: OFDATE inverse rotation diff = {}'.format(body.name, diff))
|
||||
if diff > 1.0e-15:
|
||||
if diff > 2.0e-15:
|
||||
print('Test_EQD_HOR: EXCESSIVE OFDATE INVERSE HORIZONTAL ERROR.')
|
||||
sys.exit(1)
|
||||
|
||||
@@ -907,7 +907,7 @@ def Test_EQD_HOR(body):
|
||||
check_eqj = astronomy.RotateVector(yrot, vec_hor)
|
||||
diff = VectorDiff(check_eqj, vec_eqj)
|
||||
print('Test_EQD_HOR {}: J2000 inverse rotation diff = {}'.format(body.name, diff))
|
||||
if diff > 3.0e-15:
|
||||
if diff > 4.0e-15:
|
||||
print('Test_EQD_HOR: EXCESSIVE J2000 INVERSE HORIZONTAL ERROR.')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user