.

phoebe.dynamics package¶

phoebe.dynamics.keplerian module¶

phoebe.dynamics.keplerian.dynamics_from_bundle(b, times, compute=None, return_euler=False, **kwargs)[source]

Parse parameters in the bundle and call dynamics().

See dynamics() for more detailed information.

NOTE: you must either provide compute (the label) OR all relevant options as kwargs (ltte)

Args:

b: (Bundle) the bundle with a set hierarchy times: (list or array) times at which to run the dynamics return_euler: (bool, default=False) whether to include euler angles

in the return
Returns:
t, xs, ys, zs, vxs, vys, vzs [, theta, longan, incl]. t is a numpy array of all times, the remaining are a list of numpy arrays (a numpy array per star - in order given by b.hierarchy.get_stars()) for the cartesian positions and velocities of each star at those same times. Euler angles (theta, longan, incl) are only returned if return_euler is set to True.
phoebe.dynamics.keplerian.dynamics(times, periods, eccs, smas, t0_perpasses, per0s, long_ans, incls, dpdts, deccdts, dperdts, components, t0=0.0, vgamma=0.0, mass_conservation=True, ltte=False, return_euler=False)[source]

Compute the positions and velocites of each star in their nested Keplerian orbits at a given list of times.

See dynamics_from_bundle() for a wrapper around this function which automatically handles passing everything in the correct order and in the correct units.

Args:
times: (iterable) times at which to compute positions and
velocities for each star
periods: (iterable) period of the parent orbit for each star
[days]

eccs: (iterable) eccentricity of the parent orbit for each star smas: (iterable) semi-major axis of the parent orbit for each

t0_perpasses: (iterable) t0_perpass of the parent orbit for each
star [days]
per0s: (iterable) longitudes of periastron of the parent orbit
long_ans: (iterable) longitudes of the ascending node of the
parent orbit for each star [rad]
incls: (iterable) inclination of the parent orbit for each
dpdts: (iterable) change in period with respect to time of the
parent orbit for each star [days/day]
deccdts: (iterable) change in eccentricity with respect to time
of the parent orbit for each star [1/day]
dperdts: (iterable) change in periastron with respect to time
of the parent orbit for each star [rad/d]
components: (iterable) component (‘primary’ or ‘secondary’) of
each star within its parent orbit [string]
t0: (float, default=0) time at which all initial values (ie period, per0)
are given [days]
mass_conservation: (bool, optional) whether to require mass
conservation if any of the derivatives (dpdt, dperdt, etc) are non-zero [default: True]
return_euler: (bool, default=False) whether to include euler angles
in the return
Returns:
t, xs, ys, zs, vxs, vys, vzs [, theta, longan, incl]. t is a numpy array of all times, the remaining are a list of numpy arrays (a numpy array per star - in order given by b.hierarchy.get_stars()) for the cartesian positions and velocities of each star at those same times. Euler angles (theta, longan, incl) are only returned if return_euler is set to True.

phoebe.dynamics.nbody module¶

phoebe.dynamics.nbody.dynamics_from_bundle(b, times, compute=None, return_roche_euler=False, use_kepcart=False, **kwargs)[source]

Parse parameters in the bundle and call dynamics().

See dynamics() for more detailed information.

NOTE: you must either provide compute (the label) OR all relevant options as kwargs (ltte, stepsize, gr, integrator)

Args:

b: (Bundle) the bundle with a set hierarchy times: (list or array) times at which to run the dynamics stepsize: (float, optional) stepsize for the integration

[default: 0.01]
orbiterror: (float, optional) orbiterror for the integration
[default: 1e-16]

ltte: (bool, default False) whether to account for light travel time effects. gr: (bool, default False) whether to account for general relativity effects.

Returns:
t, xs, ys, zs, vxs, vys, vzs. t is a numpy array of all times, the remaining are a list of numpy arrays (a numpy array per star - in order given by b.hierarchy.get_stars()) for the cartesian positions and velocities of each star at those same times.
phoebe.dynamics.nbody.dynamics(times, masses, smas, eccs, incls, per0s, long_ans, mean_anoms, rotperiods=None, t0=0.0, vgamma=0.0, stepsize=0.01, ltte=False, gr=False, integrator='ias15', return_roche_euler=False, use_kepcart=False)[source]
phoebe.dynamics.nbody.dynamics_from_bundle_bs(b, times, compute=None, return_roche_euler=False, **kwargs)[source]

Parse parameters in the bundle and call dynamics().

See dynamics() for more detailed information.

NOTE: you must either provide compute (the label) OR all relevant options as kwargs (ltte)

Args:

b: (Bundle) the bundle with a set hierarchy times: (list or array) times at which to run the dynamics stepsize: (float, optional) stepsize for the integration

[default: 0.01]
orbiterror: (float, optional) orbiterror for the integration
[default: 1e-16]

ltte: (bool, default False) whether to account for light travel time effects.

Returns:
t, xs, ys, zs, vxs, vys, vzs. t is a numpy array of all times, the remaining are a list of numpy arrays (a numpy array per star - in order given by b.hierarchy.get_stars()) for the cartesian positions and velocities of each star at those same times.
phoebe.dynamics.nbody.dynamics_bs(times, masses, smas, eccs, incls, per0s, long_ans, mean_anoms, t0=0.0, vgamma=0.0, stepsize=0.01, orbiterror=1e-16, ltte=False, return_roche_euler=False)[source]

Burlisch-Stoer integration of orbits to give positions and velocities of any given number of stars in hierarchical orbits. This code currently uses the NBody code in Josh Carter’s photodynam code available here:

If using the Nbody mode in PHOEBE, please cite him as well:

[[TODO: include citation]]

See dynamics_from_bundle() for a wrapper around this function which automatically handles passing everything in the correct order and in the correct units.

For each iterable input, stars and orbits should be listed in order from primary -> secondary for each nested hierarchy level. Each iterable for orbits should have length one less than those for each star (ie if 3 masses are provided, then 2 smas, eccs, etc need to be provided)

Args:
times: (iterable) times at which to compute positions and
velocities for each star

masses: (iterable) mass for each star in [solMass] smas: (iterable) semi-major axis for each orbit [AU] eccs: (iterable) eccentricities for each orbit incls: (iterable) inclinations for each orbit [rad] per0s: (iterable) longitudes of periastron for each orbit [rad] long_ans: (iterable) longitudes of the ascending node for each

mean_anoms: (iterable) mean anomalies for each orbit t0: (float) time at which to start the integrations stepsize: (float, optional) stepsize of the integrations

[default: 0.01]
orbiterror: (float, optional) orbiterror of the integrations
[default: 1e-16]

ltte: (bool, default False) whether to account for light travel time effects.

Returns:
t, xs, ys, zs, vxs, vys, vzs. t is a numpy array of all times, the remaining are a list of numpy arrays (a numpy array per star - in order given by b.hierarchy.get_stars()) for the cartesian positions and velocities of each star at those same times.

Module contents¶

phoebe.dynamics.at_i(array, i=0)[source]
phoebe.dynamics.dynamics_at_i(xs, ys, zs, vxs, vys, vzs, ethetas=None, elongans=None, eincls=None, i=0)[source]
.
Last update: 10/29/2018 9:20 a.m. (CET)