@@ -48,56 +48,42 @@ def evaluate_orbit(
4848 We can then integrate an initial phase-space position in this potential to
4949 get an orbit:
5050
51- >>> w0 = gc.PhaseSpaceCoordinate(q=u.Quantity([10., 0., 0.], "kpc"),
52- ... p=u.Quantity([0., 200, 0.], "km/s"),
53- ... t=u.Quantity(-100, "Myr"))
54- >>> ts = u.Quantity(np.linspace(0., 1., 4), "Gyr")
51+ >>> w0 = gc.PhaseSpaceCoordinate(t=u.Q(-100, "Myr"),
52+ ... q=u.Q([10., 0., 0.], "kpc"), p=u.Q([0., 200, 0.], "km/s"))
53+ >>> ts = u.Q(np.linspace(0., 1., 4), "Gyr")
5554
5655 >>> orbit = gd.evaluate_orbit(potential, w0, ts)
5756 >>> orbit
5857 Orbit(
59- q=CartesianPos3D(...), p=CartesianVel3D(...),
60- t=Quantity([...], unit='Myr'),
61- frame=SimulationFrame(),
62- interpolant=None
63- )
58+ q=CartesianPos3D(...), p=CartesianVel3D(...), t=Q([...], 'Myr'),
59+ frame=SimulationFrame(), interpolant=None )
6460
65- >>> ts = u.Quantity (np.linspace(0., 1., 10), "Gyr")
61+ >>> ts = u.Q (np.linspace(0., 1., 10), "Gyr")
6662 >>> orbit = gd.evaluate_orbit(potential, w0, ts)
6763 >>> orbit
6864 Orbit(
69- q=CartesianPos3D(...), p=CartesianVel3D(...),
70- t=Quantity([...], unit='Myr'),
71- frame=SimulationFrame(),
72- interpolant=None
73- )
65+ q=CartesianPos3D(...), p=CartesianVel3D(...), t=Q( [...], 'Myr' ),
66+ frame=SimulationFrame(), interpolant=None )
7467
7568 We can also integrate a batch of orbits at once:
7669
77- >>> w0 = gc.PhaseSpaceCoordinate(q=u.Quantity ([[10., 0, 0], [10., 0, 0]], "kpc"),
78- ... p=u.Quantity ([[0, 200, 0], [0, 220, 0]], "km/s"),
79- ... t=u.Quantity ([-100, -150], "Myr"))
70+ >>> w0 = gc.PhaseSpaceCoordinate(q=u.Q ([[10., 0, 0], [10., 0, 0]], "kpc"),
71+ ... p=u.Q ([[0, 200, 0], [0, 220, 0]], "km/s"),
72+ ... t=u.Q ([-100, -150], "Myr"))
8073 >>> orbit = gd.evaluate_orbit(potential, w0, ts)
8174 >>> orbit
8275 Orbit(
83- q=CartesianPos3D(
84- x=Quantity([...], unit='kpc'),
85- ...
86- ),
87- p=CartesianVel3D(...),
88- t=Quantity([...], unit='Myr'),
89- frame=SimulationFrame(),
90- interpolant=None
91- )
76+ q=CartesianPos3D(...), p=CartesianVel3D(...), t=Q( [...], 'Myr' ),
77+ frame=SimulationFrame(), interpolant=None )
9278
9379 :class:`~galax.dynamics.PhaseSpaceCoordinate` has a ``t`` argument for the
9480 time at which the position is given. As noted earlier, this can be used to
9581 integrate from a different time than the initial time of the position:
9682
97- >>> w0 = gc.PhaseSpaceCoordinate(q=u.Quantity ([10., 0., 0.], "kpc"),
98- ... p=u.Quantity ([0., 200, 0.], "km/s"),
99- ... t=u.Quantity (0, "Myr"))
100- >>> ts = u.Quantity (np.linspace(0.3, 1.0, 8), "Gyr")
83+ >>> w0 = gc.PhaseSpaceCoordinate(q=u.Q ([10., 0., 0.], "kpc"),
84+ ... p=u.Q ([0., 200, 0.], "km/s"),
85+ ... t=u.Q (0, "Myr"))
86+ >>> ts = u.Q (np.linspace(0.3, 1.0, 8), "Gyr")
10187 >>> orbit = gd.evaluate_orbit(potential, w0, ts)
10288 >>> orbit.q[0] # doctest: +SKIP
10389 Array([ 9.779, -0.3102, 0. ], dtype=float64)
0 commit comments