code: def calczmax(self):
          
          if hasattr(self,'_zmax'): #pragma: no cover
              return self._zmax
          Ez= calcEz(self._z,self._vz,self._verticalpot)
          if self._vz == 0.: #We are exactly at the maximum height
              zmax= nu.fabs(self._z)
          else:
              zstart= self._z
              try:
                  zend= _zmaxFindStart(self._z,Ez,self._verticalpot)
              except OverflowError: #pragma: no cover
                  zmax= -9999.99
              else:
                  zmax= optimize.brentq(_zmaxEq,zstart,zend,
                                        (Ez,self._verticalpot))
          self._zmax= zmax
          return self._zmax
docs: NAME:
             calczmax
          PURPOSE:
             calculate the maximum height
          INPUT:
          OUTPUT:
             zmax
          HISTORY:
             2012-06-01 - Written - Bovy (IAS)