docstr: Compute voxel-wise t-statistic map. This map is different from
  what you would get from an SPM-style mass univariate analysis
  because the method accounts for both spatial uncertainty in
  reference space and possibly errors on first-level inputs (if
  variance images are provided).
  
  Returns
  -------
  tmap_img: nipy image
    t-statistic map.
docstr_tok: ["Compute","voxel-wise","t-statistic","map",".","This","map","is","different","from","what","you","would","get","from","an","SPM-style","mass","univariate","analysis","because","the","method","accounts","for","both","spatial","uncertainty","in","reference","space","and","possibly","errors","on","first-level","inputs","(","if","variance","images","are","provided",")",".","Returns","--","--","--","-","tmap_img",":","nipy","image","t-statistic","map","."]
code: def t_map(self):
      """
      Compute voxel-wise t-statistic map. This map is different from
      what you would get from an SPM-style mass univariate analysis
      because the method accounts for both spatial uncertainty in
      reference space and possibly errors on first-level inputs (if
      variance images are provided).
  
      Returns
      -------
      tmap_img: nipy image
        t-statistic map.
      """
      tmap = np.zeros(self.msk.shape)
      beta = self.beta
      var = self.vbeta
      tmap[self.msk] = beta / np.sqrt(var)
      tmap_img = make_xyz_image(tmap, self.affine, self.reference)
      if self.res_path is not None:
          _save_image(tmap_img, join(self.res_path, "tmap.nii.gz"))
          tmp = np.zeros(self.msk.shape)
          tmp[self.msk] = beta
          _save_image(
              make_xyz_image(tmp, self.affine, self.reference),
              join(self.res_path, "beta.nii.gz"),
          )
          tmp[self.msk] = var
          _save_image(
              make_xyz_image(tmp, self.affine, self.reference),
              join(self.res_path, "vbeta.nii.gz"),
          )
      return tmap_img
  
imports: import warnings
  from os.path import join
  import numpy
  import scipy.ndimage
  import scipy.stats
  from nibabel import io_orientation
  from ...None import save_image
  from ...core.image.image_spaces import make_xyz_image, xyz_affine
  from ..kernel_smooth import fwhm2sigma
  from ..registration import resample
  from ..statistics.bayesian_mixed_effects import two_level_glm
  from ..statistics.histogram import histogram
label_desc: Use image node_id 6 for calling the ParcelAnalysis obj's underlying member method code with example usage: obj.t_map() and returns: tmap_img