class_docstr: Object for Epoch/Evoked filtering.
docstr: Filter a subset of channels.
  
  Parameters
  ----------
  %(l_freq)s
  %(h_freq)s
  %(picks_all_data)s
  %(filter_length)s
  %(l_trans_bandwidth)s
  %(h_trans_bandwidth)s
  %(n_jobs_fir)s
  %(method_fir)s
  %(iir_params)s
  %(phase)s
  %(fir_window)s
  %(fir_design)s
  %(skip_by_annotation)s
  
      .. versionadded:: 0.16.
  %(pad_fir)s
  %(verbose)s
  
  Returns
  -------
  inst : instance of Epochs, Evoked, or Raw
      The filtered data.
  
  See Also
  --------
  mne.filter.create_filter
  mne.Evoked.savgol_filter
  mne.io.Raw.notch_filter
  mne.io.Raw.resample
  mne.filter.create_filter
  mne.filter.filter_data
  mne.filter.construct_iir_filter
  
  Notes
  -----
  Applies a zero-phase low-pass, high-pass, band-pass, or band-stop
  filter to the channels selected by ``picks``.
  The data are modified inplace.
  
  The object has to have the data loaded e.g. with ``preload=True``
  or ``self.load_data()``.
  
  ``l_freq`` and ``h_freq`` are the frequencies below which and above
  which, respectively, to filter out of the data. Thus the uses are:
  
      * ``l_freq < h_freq``: band-pass filter
      * ``l_freq > h_freq``: band-stop filter
      * ``l_freq is not None and h_freq is None``: high-pass filter
      * ``l_freq is None and h_freq is not None``: low-pass filter
  
  ``self.info['lowpass']`` and ``self.info['highpass']`` are only
  updated with picks=None.
  
  .. note:: If n_jobs > 1, more memory is required as
            ``len(picks) * n_times`` additional time points need to
            be temporarily stored in memory.
  
  For more information, see the tutorials
  :ref:`disc-filtering` and :ref:`tut-filter-resample` and
  :func:`mne.filter.create_filter`.
  
  .. versionadded:: 0.15
docstr_tok: ["Filter","a","subset","of","channels",".","Parameters","--","--","--","--","--","%","(","l_freq",")","s","%","(","h_freq",")","s","%","(","picks_all_data",")","s","%","(","filter_length",")","s","%","(","l_trans_bandwidth",")","s","%","(","h_trans_bandwidth",")","s","%","(","n_jobs_fir",")","s","%","(","method_fir",")","s","%","(","iir_params",")","s","%","(","phase",")","s","%","(","fir_window",")","s","%","(","fir_design",")","s","%","(","skip_by_annotation",")","s","..","versionadded",":",":","0.16",".","%","(","pad_fir",")","s","%","(","verbose",")","s","Returns","--","--","--","-","inst",":","instance","of","Epochs",",","Evoked",",","or","Raw","The","filtered","data",".","See","Also","--","--","--","--","mne.filter.create_filter","mne.Evoked.savgol_filter","mne.io.Raw.notch_filter","mne.io.Raw.resample","mne.filter.create_filter","mne.filter.filter_data","mne.filter.construct_iir_filter","Notes","--","--","-","Applies","a","zero-phase","low-pass",",","high-pass",",","band-pass",",","or","band-stop","filter","to","the","channels","selected","by","``","picks","``",".","The","data","are","modified","inplace",".","The","object","has","to","have","the","data","loaded","e.g",".","with","``","preload=True","``","or","``","self.load_data","(",")","``",".","``","l_freq","``","and","``","h_freq","``","are","the","frequencies","below","which","and","above","which",",","respectively",",","to","filter","out","of","the","data",".","Thus","the","uses","are",":","*","``","l_freq","<","h_freq","``",":","band-pass","filter","*","``","l_freq",">","h_freq","``",":","band-stop","filter","*","``","l_freq","is","not","None","and","h_freq","is","None","``",":","high-pass","filter","*","``","l_freq","is","None","and","h_freq","is","not","None","``",":","low-pass","filter","``","self.info","[","'lowpass","'","]","``","and","``","self.info","[","'highpass","'","]","``","are","only","updated","with","picks=None",".","..","note",":",":","If","n_jobs",">","1",",","more","memory","is","required","as","``","len","(","picks",")","*","n_times","``","additional","time","points","need","to","be","temporarily","stored","in","memory",".","For","more","information",",","see","the","tutorials",":","ref",":","`","disc-filtering","`","and",":","ref",":","`","tut-filter-resample","`","and",":","func",":","`","mne.filter.create_filter","`",".","..","versionadded",":",":","0.15"]
code: def filter(
      self,
      l_freq,
      h_freq,
      picks=None,
      filter_length="auto",
      l_trans_bandwidth="auto",
      h_trans_bandwidth="auto",
      n_jobs=None,
      method="fir",
      iir_params=None,
      phase="zero",
      fir_window="hamming",
      fir_design="firwin",
      skip_by_annotation=("edge", "bad_acq_skip"),
      pad="edge",
      *,
      verbose=None,
  ):
      """Filter a subset of channels.
  
      Parameters
      ----------
      %(l_freq)s
      %(h_freq)s
      %(picks_all_data)s
      %(filter_length)s
      %(l_trans_bandwidth)s
      %(h_trans_bandwidth)s
      %(n_jobs_fir)s
      %(method_fir)s
      %(iir_params)s
      %(phase)s
      %(fir_window)s
      %(fir_design)s
      %(skip_by_annotation)s
  
          .. versionadded:: 0.16.
      %(pad_fir)s
      %(verbose)s
  
      Returns
      -------
      inst : instance of Epochs, Evoked, or Raw
          The filtered data.
  
      See Also
      --------
      mne.filter.create_filter
      mne.Evoked.savgol_filter
      mne.io.Raw.notch_filter
      mne.io.Raw.resample
      mne.filter.create_filter
      mne.filter.filter_data
      mne.filter.construct_iir_filter
  
      Notes
      -----
      Applies a zero-phase low-pass, high-pass, band-pass, or band-stop
      filter to the channels selected by ``picks``.
      The data are modified inplace.
  
      The object has to have the data loaded e.g. with ``preload=True``
      or ``self.load_data()``.
  
      ``l_freq`` and ``h_freq`` are the frequencies below which and above
      which, respectively, to filter out of the data. Thus the uses are:
  
          * ``l_freq < h_freq``: band-pass filter
          * ``l_freq > h_freq``: band-stop filter
          * ``l_freq is not None and h_freq is None``: high-pass filter
          * ``l_freq is None and h_freq is not None``: low-pass filter
  
      ``self.info['lowpass']`` and ``self.info['highpass']`` are only
      updated with picks=None.
  
      .. note:: If n_jobs > 1, more memory is required as
                ``len(picks) * n_times`` additional time points need to
                be temporarily stored in memory.
  
      For more information, see the tutorials
      :ref:`disc-filtering` and :ref:`tut-filter-resample` and
      :func:`mne.filter.create_filter`.
  
      .. versionadded:: 0.15
      """
      from .annotations import _annotations_starts_stops
      from .io import BaseRaw
  
      _check_preload(self, "inst.filter")
      if pad is None and method != "iir":
          pad = "edge"
      update_info, picks = _filt_check_picks(
          self.info, picks, l_freq, h_freq
      )
      if isinstance(self, BaseRaw):
          # Deal with annotations
          onsets, ends = _annotations_starts_stops(
              self, skip_by_annotation, invert=True
          )
          logger.info(
              "Filtering raw data in %d contiguous segment%s"
              % (len(onsets), _pl(onsets))
          )
      else:
          onsets, ends = np.array([0]), np.array([self._data.shape[1]])
      max_idx = (ends - onsets).argmax()
      for si, (start, stop) in enumerate(zip(onsets, ends)):
          # Only output filter params once (for info level), and only warn
          # once about the length criterion (longest segment is too short)
          use_verbose = verbose if si == max_idx else "error"
          filter_data(
              self._data[:, start:stop],
              self.info["sfreq"],
              l_freq,
              h_freq,
              picks,
              filter_length,
              l_trans_bandwidth,
              h_trans_bandwidth,
              n_jobs,
              method,
              iir_params,
              copy=False,
              phase=phase,
              fir_window=fir_window,
              fir_design=fir_design,
              pad=pad,
              verbose=use_verbose,
          )
      # update info if filter is applied to all data channels,
      # and it's not a band-stop filter
      _filt_update_info(self.info, update_info, l_freq, h_freq)
      return self
  
imports: from collections import Counter
  from copy import deepcopy
  from functools import partial
  from math import gcd
  import numpy
  from scipy import fft, signal
  from scipy.stats import f
  from ._fiff.pick import _picks_to_idx
  from ._ola import _COLA
  from .cuda import _fft_multiply_repeated, _fft_resample, _setup_cuda_fft_multiply_repeated, _setup_cuda_fft_resample, _smart_pad
  from .parallel import parallel_func
  from .utils import _check_option, _check_preload, _ensure_int, _pl, _validate_type, logger, sum_squared, verbose, warn
label_desc: Use image node_id 2 for calling the FilterMixin obj's underlying member method code with example usage: obj.filter(l_freq, h_freq, picks, filter_length, l_trans_bandwidth, h_trans_bandwidth, n_jobs, method, iir_params, phase, fir_window, fir_design, skip_by_annotation, pad) and returns: self