-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Description
🐛 Bug
galpy.df.jeans.sigmalos errors when provided with a potential from galpy.potential while galpy.df.jeans.sigmar does not.
Reproducible example
import astropy.units as u
from galpy.potential import PlummerPotential
from galpy.df.jeans import sigmar, sigmalos
prof = PlummerPotential(1693*u.solMass, b=100*u.pc)
print(sigmar(prof, 1.0*u.pc, beta=0.0)) # 0.1030855301393923 km/s
print(sigmalos(prof, 1.0*u.pc, beta=0.0)) # errors
print(sigmalos(prof, 1.0, beta=0.0)) # also errors without unit
Expected behavior
Docstrings indicate that galpy.df.jeans.sigmalos should be able to take the same arguments as sigmar but it errors instead.
System Details
Ran on the galpy REPL at https://www.galpy.org/repl
Version info is
Emscripten-3.1.14-wasm32-32bit
Python 3.10.2 (main, Aug 29 2022, 18:09:32) [Clang 15.0.0 (https://github.com/llvm/llvm-project 7effcbda49ba32991b8955821b8f
numpy 1.22.4
scipy 1.8.1
matplotlib 3.5.2
galpy 1.10.1.dev0
astropy 5.1
Additional context
Stacktrace seems to point to some unit-related code but sigmalos also errors when R is a plain number.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels