本文整理汇总了Python中galpy.orbit.Orbit.turn_physical_off方法的典型用法代码示例。如果您正苦于以下问题:Python Orbit.turn_physical_off方法的具体用法?Python Orbit.turn_physical_off怎么用?Python Orbit.turn_physical_off使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类galpy.orbit.Orbit
的用法示例。
在下文中一共展示了Orbit.turn_physical_off方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Orbit
# 需要导入模块: from galpy.orbit import Orbit [as 别名]
# 或者: from galpy.orbit.Orbit import turn_physical_off [as 别名]
## os.makedirs("Orbits/{0}".format(folder))
##nu.save("Orbits/{0}/Acos.npy".format(folder), Acos)
##
TIME = 3000*units.Myr
dt = 1 * units.Myr
div = 1.
step_size = dt/div
##Creating the Milky Way Potential
ps= potential.PowerSphericalPotentialwCutoff(alpha=1.8,rc=1.9/8.,normalize=0.05)
mn= potential.MiyamotoNagaiPotential(a=3./8.,b=0.28/8.,normalize=.6)
MWPotential= [ps,mn,scf]
##Creating the orbit
o = Orbit([229.018,-0.124,23.2,-2.296,-2.257,-58.7],radec=True,ro=8.,vo=220.,solarmotion=[-11.1,24.,7.25])
o.turn_physical_off()
##Integrate backwards in time
o = o.flip()
ts= nu.arange(0,(TIME + step_size).value,step_size.value)*units.Myr
o.integrate(ts, MWPotential, method='dopr54_c')
##Integrating Forward in time
newOrbit = Orbit([o.R(TIME), -o.vR(TIME), -o.vT(TIME), o.z(TIME), -o.vz(TIME), o.phi(TIME)],ro=8.,vo=220.)
newOrbit.turn_physical_off()
newOrbit.integrate(ts, MWPotential, method='dopr54_c')
def randomVelocity(std=.001):
if type(std).__name__ == "Quantity":