code: def ttest_1samp_no_p(X, sigma=0, method="relative"):
      """Perform one-sample t-test.
  
      This is a modified version of :func:`scipy.stats.ttest_1samp` that avoids
      a (relatively) time-consuming p-value calculation, and can adjust
      for implausibly small variance values :footcite:`RidgwayEtAl2012`.
  
      Parameters
      ----------
      X : array
          Array to return t-values for.
      sigma : float
          The variance estimate will be given by ``var + sigma * max(var)`` or
          ``var + sigma``, depending on "method". By default this is 0 (no
          adjustment). See Notes for details.
      method : str
          If 'relative', the minimum variance estimate will be sigma * max(var),
          if 'absolute' the minimum variance estimate will be sigma.
  
      Returns
      -------
      t : array
          T-values, potentially adjusted using the hat method.
  
      Notes
      -----
      To use the "hat" adjustment method :footcite:`RidgwayEtAl2012`, a value
      of ``sigma=1e-3`` may be a reasonable choice.
  
      References
      ----------
      .. footbibliography::
      """
      _check_option("method", method, ["absolute", "relative"])
      var = np.var(X, axis=0, ddof=1)
      if sigma > 0:
          limit = sigma * np.max(var) if method == "relative" else sigma
          var += limit
      return np.mean(X, axis=0) / np.sqrt(var / X.shape[0])
  
file_path: mne-python/mne/stats/parametric.py
imports: from functools import reduce
  from string import ascii_uppercase
  import numpy
  from scipy import stats
  from scipy.signal import detrend
  from ..utils import _check_option
label_desc: Use image node_id 1 for calling a global function with example usage: ttest_1samp_no_p(X, sigma, method) and returns: unknown