jobovy / galpy

Galactic Dynamics in python
https://www.galpy.org
BSD 3-Clause "New" or "Revised" License
228 stars 100 forks source link

Exception in computing u0 for the KuzminKutuzovStaeckelPotential #245

Closed jobovy closed 9 years ago

jobovy commented 9 years ago

Reported by @wilmatrick

#import packages:
import numpy
from galpy.potential import KuzminKutuzovStaeckelPotential
from galpy.actionAngle import actionAngleStaeckelGrid

#potential parameters:
Delta = 0.27876  #focal length of (lambda,nu) coordinate system
ac    = 61.9673  #axis ratio of coordinate surfaces of disk component

#setup two components, disk and halo, potentials (already normalized):
pot = KuzminKutuzovStaeckelPotential(ac=ac,Delta=Delta,normalize=True)
#setup action angle object:
aA = actionAngleStaeckelGrid(pot=pot,delta=Delta,Rmax=5.,
                                                 nE=25,npsi=25,nLz=30,numcores=1,c=True)

This fails, because of a failure in

https://github.com/jobovy/galpy/blob/master/galpy/actionAngle_src/actionAngle_c_ext/actionAngleStaeckel.c#L257

jobovy commented 9 years ago

Potential fix in 62c5099c9e6f2eb5f9a725cdbc83951a860aa5b8

codecov-io commented 9 years ago

Current coverage is 99.27%

Merging brentbug into None will change coverage by +99.27% by 62c5099

Coverage Diff

No diff could be generated. No reports for None found.

Powered by Codecov

jobovy commented 9 years ago

62c5099 seems to do the job.