code: def toVertical(self,R,phi=None):
          
          if _APY_LOADED and isinstance(R,units.Quantity):
              R= R.to(units.kpc).value/self._ro
          if _APY_LOADED and isinstance(phi,units.Quantity):
              phi= phi.to(units.rad).value
          from galpy.potential import toVerticalPotential
          return toVerticalPotential(self,R,phi=phi)
docs: NAME:
  
             toVertical
  
          PURPOSE:
  
             convert a 3D potential into a linear (vertical) potential at R
  
          INPUT:
  
             R - Galactocentric radius at which to create the vertical potential (can be Quantity)
  
             phi= (None) Galactocentric azimuth at which to create the vertical potential (can be Quantity); required for non-axisymmetric potential
  
          OUTPUT:
  
             linear (vertical) potential
  
          HISTORY
  
             unknown