Skip to content

question about obs argument in Orbit methods #523

Answered by jobovy
BrianTCook asked this question in Q&A
Discussion options

You must be logged in to vote

Apologies for the slow reply, busy day... There are two answers to this question:

  • I think what you are trying to do is to determine the (ra,dec.dist) along the forward and backward path of an orbit started at a given point? That you could do simply as

    import numpy
    from galpy.potential import MWPotential2014
    from galpy.orbit import Orbit
    import astropy.units as u
    R,vR,vT,z,vz,phi= 8.*u.kpc,20.*u.km/u.s,220.*u.km/u.s,0.*u.kpc,30.*u.km/u.s,0.*u.rad
    of= Orbit([R,vR,vT,z,vz,phi],ro=8.23,vo=249.44,zo=0.0208,solarmotion=[-11.1,24.,7.25])
    ts= numpy.linspace(0.,1.,1001)*u.Gyr
    of.integrate(ts,MWPotential2014)
    ob= of() # copy for backwards integration
    ob.integrate(-ts,MWPotential2014)
    # Concatenat…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BrianTCook
Comment options

Answer selected by BrianTCook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants