code: def E(self,*args,**kwargs):
          
          if not 'pot' in kwargs or kwargs['pot'] is None:
              try:
                  pot= self._pot
              except AttributeError:
                  raise AttributeError("Integrate orbit or specify pot=")
              if 'pot' in kwargs and kwargs['pot'] is None:
                  kwargs.pop('pot')          
          else:
              pot= kwargs.pop('pot')
          if isinstance(pot,Potential):
              thispot= RZToplanarPotential(pot)
          elif isinstance(pot,list):
              thispot= []
              for p in pot:
                  if isinstance(p,Potential): thispot.append(RZToplanarPotential(p))
                  else: thispot.append(p)
          else:
              thispot= pot
          if len(args) > 0:
              t= args[0]
          else:
              t= 0.
          #Get orbit
          thiso= self(*args,**kwargs)
          onet= (len(thiso.shape) == 1)
          if onet:
              return _evaluateplanarPotentials(thispot,thiso[0],
                                               t=t)\
                                              +thiso[1]**2./2.\
                                              +thiso[2]**2./2.
          else:
              return nu.array([_evaluateplanarPotentials(thispot,thiso[0,ii],
                                                        t=t[ii])\
                                   +thiso[1,ii]**2./2.\
                                   +thiso[2,ii]**2./2. for ii in range(len(t))])
docs: NAME:
             E
          PURPOSE:
             calculate the energy
          INPUT:
             t - (optional) time at which to get the radius
             pot= potential instance or list of such instances
          OUTPUT:
             energy
          HISTORY:
             2010-09-15 - Written - Bovy (NYU)
             2011-04-18 - Added t - Bovy (NYU)