code: def rap(self,analytic=False,pot=None,**kwargs):
          
          if analytic:
              self._setupaA(pot=pot,type='adiabatic')
              (rperi,rap)= self._aA.calcRapRperi(self)
              return rap
          if not hasattr(self,'orbit'):
              raise AttributeError("Integrate the orbit first")
          if not hasattr(self,'rs'):
              self.rs= self.orbit[:,0]
          return nu.amax(self.rs)
docs: NAME:
             rap
          PURPOSE:
             return the apocenter radius
          INPUT:
             analytic - compute this analytically
             pot - potential to use for analytical calculation
          OUTPUT:
             R_ap
          HISTORY:
             2010-09-20 - Written - Bovy (NYU)