code: def compute_proj_ecg(
      raw,
      raw_event=None,
      tmin=-0.2,
      tmax=0.4,
      n_grad=2,
      n_mag=2,
      n_eeg=2,
      l_freq=1.0,
      h_freq=35.0,
      average=True,
      filter_length="10s",
      n_jobs=None,
      ch_name=None,
      reject=dict(grad=2000e-13, mag=3000e-15, eeg=50e-6, eog=250e-6),
      flat=None,
      bads=[],
      avg_ref=False,
      no_proj=False,
      event_id=999,
      ecg_l_freq=5,
      ecg_h_freq=35,
      tstart=0.0,
      qrs_threshold="auto",
      filter_method="fir",
      iir_params=None,
      copy=True,
      return_drop_log=False,
      meg="separate",
      verbose=None,
  ):
      """Compute SSP (signal-space projection) vectors for ECG artifacts.
  
      %(compute_proj_ecg)s
  
      .. note:: Raw data will be loaded if it hasn't been preloaded already.
  
      Parameters
      ----------
      raw : mne.io.Raw
          Raw input file.
      raw_event : mne.io.Raw or None
          Raw file to use for event detection (if None, raw is used).
      tmin : float
          Time before event in seconds.
      tmax : float
          Time after event in seconds.
      n_grad : int
          Number of SSP vectors for gradiometers.
      n_mag : int
          Number of SSP vectors for magnetometers.
      n_eeg : int
          Number of SSP vectors for EEG.
      l_freq : float | None
          Filter low cut-off frequency for the data channels in Hz.
      h_freq : float | None
          Filter high cut-off frequency for the data channels in Hz.
      average : bool
          Compute SSP after averaging. Default is True.
      filter_length : str | int | None
          Number of taps to use for filtering.
      %(n_jobs)s
      ch_name : str | None
          Channel to use for ECG detection (Required if no ECG found).
      reject : dict | None
          Epoch rejection configuration (see Epochs).
      flat : dict | None
          Epoch flat configuration (see Epochs).
      bads : list
          List with (additional) bad channels.
      avg_ref : bool
          Add EEG average reference proj.
      no_proj : bool
          Exclude the SSP projectors currently in the fiff file.
      event_id : int
          ID to use for events.
      ecg_l_freq : float
          Low pass frequency applied to the ECG channel for event detection.
      ecg_h_freq : float
          High pass frequency applied to the ECG channel for event detection.
      tstart : float
          Start artifact detection after tstart seconds.
      qrs_threshold : float | str
          Between 0 and 1. qrs detection threshold. Can also be "auto" to
          automatically choose the threshold that generates a reasonable
          number of heartbeats (40-160 beats / min).
      filter_method : str
          Method for filtering ('iir' or 'fir').
      iir_params : dict | None
          Dictionary of parameters to use for IIR filtering.
          See mne.filter.construct_iir_filter for details. If iir_params
          is None and method="iir", 4th order Butterworth will be used.
      copy : bool
          If False, filtering raw data is done in place. Defaults to True.
      return_drop_log : bool
          If True, return the drop log.
  
          .. versionadded:: 0.15
      meg : str
          Can be ``'separate'`` (default) or ``'combined'`` to compute projectors
          for magnetometers and gradiometers separately or jointly.
          If ``'combined'``, ``n_mag == n_grad`` is required and the number of
          projectors computed for MEG will be ``n_mag``.
  
          .. versionadded:: 0.18
      %(verbose)s
  
      Returns
      -------
      %(projs)s
      ecg_events : ndarray
          Detected ECG events.
      drop_log : list
          The drop log, if requested.
  
      See Also
      --------
      find_ecg_events
      create_ecg_epochs
  
      Notes
      -----
      Filtering is applied to the ECG channel while finding events using
      ``ecg_l_freq`` and ``ecg_h_freq``, and then to the ``raw`` instance
      using ``l_freq`` and ``h_freq`` before creation of the epochs used to
      create the projectors.
      """
      return _compute_exg_proj(
          "ECG",
          raw,
          raw_event,
          tmin,
          tmax,
          n_grad,
          n_mag,
          n_eeg,
          l_freq,
          h_freq,
          average,
          filter_length,
          n_jobs,
          ch_name,
          reject,
          flat,
          bads,
          avg_ref,
          no_proj,
          event_id,
          ecg_l_freq,
          ecg_h_freq,
          tstart,
          qrs_threshold,
          filter_method,
          iir_params,
          return_drop_log,
          copy,
          meg,
          verbose,
      )
  
file_path: mne-python/mne/preprocessing/ssp.py
imports: import copy
  import numpy
  from .._fiff.pick import pick_types
  from .._fiff.reference import make_eeg_average_ref_proj
  from ..epochs import Epochs
  from ..proj import compute_proj_epochs, compute_proj_evoked
  from ..utils import logger, verbose, warn
  from .ecg import find_ecg_events
  from .eog import find_eog_events
label_desc: Use image node_id 3 for calling a global function with example usage: compute_proj_ecg(raw, raw_event, tmin, tmax, n_grad, n_mag, n_eeg, l_freq, h_freq, average, filter_length, n_jobs, ch_name, reject, flat, bads, avg_ref, no_proj, event_id, ecg_l_freq, ecg_h_freq, tstart, qrs_threshold, filter_method, iir_params, copy, return_drop_log, meg, verbose) and returns: _compute_exg_proj