def massSqMatrix(self, X):
     """
     Calculate the tree-level mass matrix of the scalar field.
     
     This uses :func:`helper_functions.hessianFunction` to calculate the
     matrix using finite differences, with differences
     given by `self.x_eps`. Note that `self.x_eps` is only used directly
     the first time this function is called, so subsequently changing it
     will not have an effect.        
     
     The resulting matrix will have rank `Ndim`. This function may be useful
     for subclasses in finding the boson particle spectrum.
     """
     try:
         f = self._massSqMatrix
     except:
         # Create the gradient function
         self._massSqMatrix = helper_functions.hessianFunction(
             self.V0, self.x_eps, self.Ndim, self.deriv_order)
         f = self._massSqMatrix
     return f(X)
 def d2V(self, X, T):
     """
     Calculates the Hessian (second derivative) matrix for the 
     finite-temperature effective potential.
     
     This uses :func:`helper_functions.hessianFunction` to calculate the
     matrix using finite differences, with differences
     given by `self.x_eps`. Note that `self.x_eps` is only used directly
     the first time this function is called, so subsequently changing it
     will not have an effect.        
     """
     try:
         f = self._d2V
     except:
         # Create the gradient function
         self._d2V = helper_functions.hessianFunction(
             self.Vtot, self.x_eps, self.Ndim, self.deriv_order)
         f = self._d2V
     # Need to add extra axes to T since extra axes get added to X in
     # the helper function.
     T = np.asanyarray(T)[...,np.newaxis]
     return f(X,T, False)