code: def _calc_covar_matrix(self, profile):
          
          corr = self._calc_corr(profile)
          std = self._calc_ln_std(profile)
          # Modify the standard deviation by the truncated norm scale
          std *= randnorm.scale
  
          var = std ** 2
          covar = corr * std[:-1] * std[1:]
  
          # Main diagonal is the variance
          mat = diags([covar, var, covar], [-1, 0, 1]).toarray()
  
          return mat
docs: Calculate the covariance matrix.
  
          Parameters
          ----------
          profile : site.Profile
              Input site profile
  
          Yields
          ------
          covar : `class`:numpy.array
              Covariance matrix