From 69463e04cf38027fd9232bd4ff50e75bf286597a Mon Sep 17 00:00:00 2001 From: Don Cross Date: Wed, 18 Dec 2019 10:19:26 -0500 Subject: [PATCH] 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? --- generate/run.bat | 6 ++++++ generate/test.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/generate/run.bat b/generate/run.bat index d759f938..86dd4fca 100644 --- a/generate/run.bat +++ b/generate/run.bat @@ -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) diff --git a/generate/test.py b/generate/test.py index 070d9611..3b05a3ac 100755 --- a/generate/test.py +++ b/generate/test.py @@ -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)