Get the (optionally) truncated SVD components

        Parameters
        ----------
        maxsing : int
            the number of singular components to use.  If None,
            maxsing is calculated using Matrix.get_maxsing() and eigthresh
        eigthresh : float
            the ratio of largest to smallest singular components to use
            for truncation.  Ignored if maxsing is not None
        truncate : bool
            flag to truncate components. If False, U, s, and V will be zeroed out instead of truncated.
            Default is True

        Returns
        -------
        u : Matrix
            (optionally) truncated left singular vectors
        s : Matrix
            (optionally) truncated singular value matrix
        v : Matrix
            (optionally) truncated right singular vectors

def pseudo_inv_components(self,maxsing=None,eigthresh=1.0e-5,truncate=True):
        """ Get the (optionally) truncated SVD components

        Parameters
        ----------
        maxsing : int
            the number of singular components to use.  If None,
            maxsing is calculated using Matrix.get_maxsing() and eigthresh
        eigthresh : float
            the ratio of largest to smallest singular components to use
            for truncation.  Ignored if maxsing is not None
        truncate : bool
            flag to truncate components. If False, U, s, and V will be zeroed out instead of truncated.
            Default is True

        Returns
        -------
        u : Matrix
            (optionally) truncated left singular vectors
        s : Matrix
            (optionally) truncated singular value matrix
        v : Matrix
            (optionally) truncated right singular vectors

        """

        if maxsing is None:
            maxsing = self.get_maxsing(eigthresh=eigthresh)
        else:
             maxsing = min(self.get_maxsing(eigthresh=eigthresh),maxsing)

        s = self.full_s.copy()
        v = self.v.copy()
        u = self.u.copy()
        if truncate:

            s = s[:maxsing,:maxsing]
            v = v[:,:maxsing]
            u = u[:,:maxsing]
        else:
            new_s = self.full_s.copy()
            s = new_s
            s.x[maxsing:, maxsing:] = 0.0
            v.x[:, maxsing:] = 0.0
            u.x[:, maxsing:] = 0.0

        return u,s,v