We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The analyticactionangle function does not take a single PhaseSpacePosition point:
analyticactionangle
pot = gp.IsochronePotential(m=1.24e+11, b=4.02, units = galactic) ics = gd.PhaseSpacePosition(pos=[7.5,0,0.] * u.kpc, vel=[0,-200,0] * u.km/u.s) pot.action_angle(ics)
TypeError Traceback (most recent call last) /var/folders/gx/w54ng9cs5k3bfxcphmqpmc740001vz/T/ipykernel_72625/1131334737.py in ----> 1 pot.action_angle(ics)
gala/potential/potential/builtin/cybuiltin.pyx in gala.potential.potential.builtin.cybuiltin.IsochronePotential.action_angle()
/opt/anaconda3/lib/python3.9/site-packages/gala/dynamics/analyticactionangle.py in isochrone_to_aa(w, potential) 105 # Compute theta_z 106 psi = np.arctan2(np.cos(theta), -np.sin(theta)rvtheta/L) --> 107 psi[np.abs(vtheta) <= 1e-10] = np.pi/2. # blows up for small vtheta 108 109 omega_th = 0.5 * (1 + L/np.sqrt(LL + 4GM*b))
TypeError: numpy.float64 object does not support item assignment
while this works: pot = gp.IsochronePotential(m=1.24e+11, b=4.02, units = galactic) ics = gd.PhaseSpacePosition(pos=[7.5,0,0.] * u.kpc, vel=[0,-200,0] * u.km/u.s) orbits = gp.Hamiltonian(pot).integrate_orbit(ics, dt=4, n_steps=750) pot.action_angle(orbits)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
analyticactionangle
function does not take a single PhaseSpacePosition point:pot = gp.IsochronePotential(m=1.24e+11, b=4.02, units = galactic)
ics = gd.PhaseSpacePosition(pos=[7.5,0,0.] * u.kpc, vel=[0,-200,0] * u.km/u.s)
pot.action_angle(ics)
TypeError Traceback (most recent call last)
/var/folders/gx/w54ng9cs5k3bfxcphmqpmc740001vz/T/ipykernel_72625/1131334737.py in
----> 1 pot.action_angle(ics)
gala/potential/potential/builtin/cybuiltin.pyx in gala.potential.potential.builtin.cybuiltin.IsochronePotential.action_angle()
/opt/anaconda3/lib/python3.9/site-packages/gala/dynamics/analyticactionangle.py in isochrone_to_aa(w, potential)
105 # Compute theta_z
106 psi = np.arctan2(np.cos(theta), -np.sin(theta)rvtheta/L)
--> 107 psi[np.abs(vtheta) <= 1e-10] = np.pi/2. # blows up for small vtheta
108
109 omega_th = 0.5 * (1 + L/np.sqrt(LL + 4GM*b))
TypeError: numpy.float64 object does not support item assignment
while this works:
pot = gp.IsochronePotential(m=1.24e+11, b=4.02, units = galactic)
ics = gd.PhaseSpacePosition(pos=[7.5,0,0.] * u.kpc, vel=[0,-200,0] * u.km/u.s)
orbits = gp.Hamiltonian(pot).integrate_orbit(ics, dt=4, n_steps=750)
pot.action_angle(orbits)
The text was updated successfully, but these errors were encountered: