'Notch filter a subset of channels.
Applies a zero-phase notch filter to the channels selected by
"picks". By default the data of the Raw object is modified inplace.
The Raw object has to have the data loaded e.g. with ``preload=True``
or ``self.load_data()``.
.. note:: If n_jobs > 1, more memory is required as
``len(picks) * n_times`` additional time points need to
be temporaily stored in memory.
Parameters
freqs : float | array of float | None
Specific frequencies to filter out from data, e.g.,
np.arange(60, 241, 60) in the US or np.arange(50, 251, 50) in
Europe. None can only be used with the mode \'spectrum_fit\',
where an F test is used to find sinusoidal components.
picks : array-like of int | None
Indices of channels to filter. If None only the data (MEG/EEG)
channels will be filtered.
filter_length : str | int
Length of the FIR filter to use (if applicable):
* int: specified length in samples.
* \'auto\' (default): the filter length is chosen based
on the size of the transition regions (6.6 times the
reciprocal of the shortest transition band for
fir_window=\'hamming\').
* str: a human-readable time in
units of "s" or "ms" (e.g., "10s" or "5500ms") will be
converted to that number of samples if ``phase="zero"``, or
the shortest power-of-two length at least that duration for
``phase="zero-double"``.
notch_widths : float | array of float | None
Width of each stop band (centred at each freq in freqs) in Hz.
If None, freqs / 200 is used.
trans_bandwidth : float
Width of the transition band in Hz.
Only used for ``method=\'fir\'``.
n_jobs : int | str
Number of jobs to run in parallel. Can be \'cuda\' if scikits.cuda
is installed properly, CUDA is initialized, and method=\'fir\'.
method : str
\'fir\' will use overlap-add FIR filtering, \'iir\' will use IIR
forward-backward filtering (via filtfilt). \'spectrum_fit\' will
use multi-taper estimation of sinusoidal components.
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.
mt_bandwidth : float | None
The bandwidth of the multitaper windowing function in Hz.
Only used in \'spectrum_fit\' mode.
p_value : float
p-value to use in F-test thresholding to determine significant
sinusoidal components to remove when method=\'spectrum_fit\' and
freqs=None. Note that this will be Bonferroni corrected for the
number of frequencies, so large p-values may be justified.
phase : str
Phase of the filter, only used if ``method=\'fir\'``.
By default, a symmetric linear-phase FIR filter is constructed.
If ``phase=\'zero\'`` (default), the delay of this filter
is compensated for. If ``phase==\'zero-double\'``, then this filter
is applied twice, once forward, and once backward. If \'minimum\',
then a minimum-phase, causal filter will be used.
.. versionadded:: 0.13
fir_window : str
The window to use in FIR design, can be "hamming" (default),
"hann", or "blackman".
.. versionadded:: 0.13
fir_design : str
Can be "firwin" (default in 0.16) to use
:func:`scipy.signal.firwin`, or "firwin2" (default in 0.15 and
before) to use :func:`scipy.signal.firwin2`. "firwin" uses a
time-domain design technique that generally gives improved
attenuation using fewer samples than "firwin2".
..versionadded:: 0.15
verbose : bool, str, int, or None
If not None, override default verbose level (see
:func:`mne.verbose` and :ref:`Logging documentation <tut_logging>`
for more). Defaults to self.verbose.
Returns
raw : instance of Raw
The raw instance with filtered data.
See Also
mne.io.Raw.filter
Notes
For details, see :func:`mne.filter.notch_filter`.'

@verbose
def notch_filter(self, freqs, picks=None, filter_length='auto', notch_widths=None, trans_bandwidth=1.0, n_jobs=1, method='fft', iir_params=None, mt_bandwidth=None, p_value=0.05, phase='zero', fir_window='hamming', fir_design=None, verbose=None):

    fs = float(self.info['sfreq'])
    if (picks is None):
        picks = _pick_data_or_ica(self.info)
        if (len(picks) < 1):
            raise RuntimeError('Could    not    find    any    valid    channels    for    your    Raw    object.    Please    contact    the    MNE-Python    developers.')
    _check_preload(self, 'raw.notch_filter')
    self._data = notch_filter(self._data, fs, freqs, filter_length=filter_length, notch_widths=notch_widths, trans_bandwidth=trans_bandwidth, method=method, iir_params=iir_params, mt_bandwidth=mt_bandwidth, p_value=p_value, picks=picks, n_jobs=n_jobs, copy=False, phase=phase, fir_window=fir_window, fir_design=fir_design)
    return self
