Skip to content

Commit

Permalink
Relax analytic peri/apo test for DiskSCFPotential
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Dec 29, 2016
1 parent 0e194a3 commit 2bd2445
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nose/test_orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,8 @@ def test_analytic_ecc_rperi_rap():
tol['FlattenedPowerPotential']= -8. #these are more difficult
tol['KeplerPotential']= -8. #these are more difficult
tol['PseudoIsothermalPotential']= -7. #these are more difficult
tol['KuzminDiskPotential'] = -8 #these are more difficult
tol['KuzminDiskPotential'] = -8. #these are more difficult
tol['DiskSCFPotential'] = -8. #these are more difficult
for p in pots:
#Setup instance of potential
if p in list(tol.keys()): ttol= tol[p]
Expand Down Expand Up @@ -1155,7 +1156,7 @@ def test_analytic_ecc_rperi_rap():
trap_analytic= o.rap(analytic=True)
#print p, integrator, trap, trap_analytic, (trap-trap_analytic)**2.
assert (trap-trap_analytic)**2. < 10.**ttol, \
"Analytically computed apocenter radius does not agree with numerical estimate for potential %s and integrator %s" %(p,integrator)
"Analytically computed apocenter radius does not agree with numerical estimate for potential %s and integrator %s by %g" %(p,integrator,(trap-trap_analytic))
assert (o.rap(ro=8.)/8.-trap_analytic)**2. < 10.**ttol, \
"Apocenter in physical coordinates does not agree with physical-scale times apocenter in normalized coordinates for potential %s and integrator %s" %(p,integrator)
#Do this also for an orbit starting at apocenter
Expand Down

0 comments on commit 2bd2445

Please sign in to comment.