def zmax(self,analytic=False,pot=None,**kwargs):
        """
        NAME:
           zmax
        PURPOSE:
           return the maximum vertical height
        INPUT:
           analytic - compute this analytically
           pot - potential to use for analytical calculation
        OUTPUT:
           Z_max
        HISTORY:
           2010-09-20 - Written - Bovy (NYU)
           2012-06-01 - Added analytic calculation - Bovy (IAS)
        """
        if analytic:
            self._setupaA(pot=pot,**kwargs)
            return float(self._aA.EccZmaxRperiRap(self)[1])
        if not hasattr(self,'orbit'):
            raise AttributeError("Integrate the orbit first or use analytic=True for approximate zmax")
        return nu.amax(nu.fabs(self.orbit[:,3]))
NAME:
           zmax
        PURPOSE:
           return the maximum vertical height
        INPUT:
           analytic - compute this analytically
           pot - potential to use for analytical calculation
        OUTPUT:
           Z_max
        HISTORY:
           2010-09-20 - Written - Bovy (NYU)
           2012-06-01 - Added analytic calculation - Bovy (IAS)