def _set_stimchannels(self, info, stim, stim_code):
    "Specify how the trigger channel is synthesized from analog channels.\n\n        Has to be done before loading data. For a RawKIT instance that has been\n        created with preload=True, this method will raise a\n        NotImplementedError.\n\n        Parameters\n        ----------\n        info : instance of MeasInfo\n            The measurement info.\n        stim : list of int | '<' | '>'\n            Can be submitted as list of trigger channels.\n            If a list is not specified, the default triggers extracted from\n            misc channels will be used with specified directionality.\n            '<' means that largest values assigned to the first channel\n            in sequence.\n            '>' means the largest trigger assigned to the last channel\n            in sequence.\n        stim_code : 'binary' | 'channel'\n            How to decode trigger values from stim channels. 'binary' read stim\n            channel events as binary code, 'channel' encodes channel number.\n        "
    if self.preload:
        raise NotImplementedError("Can't change stim channel after loading data")
    _check_option('stim_code', stim_code, ['binary', 'channel'])
    if (stim is not None):
        if isinstance(stim, str):
            picks = _default_stim_chs(info)
            if (stim == '<'):
                stim = picks[::(- 1)]
            elif (stim == '>'):
                stim = picks
            else:
                raise ValueError(("stim needs to be list of int, '>' or '<', not %r" % str(stim)))
        else:
            stim = np.asarray(stim, int)
            if (stim.max() >= self._raw_extras[0]['nchan']):
                raise ValueError(('Got stim=%s, but sqd file only has %i channels' % (stim, self._raw_extras[0]['nchan'])))
        nchan = (self._raw_extras[0]['nchan'] + 1)
        info['chs'].append(dict(cal=KIT.CALIB_FACTOR, logno=nchan, scanno=nchan, range=1.0, unit=FIFF.FIFF_UNIT_NONE, unit_mul=FIFF.FIFF_UNITM_NONE, ch_name='STI 014', coil_type=FIFF.FIFFV_COIL_NONE, loc=np.full(12, np.nan), kind=FIFF.FIFFV_STIM_CH, coord_frame=FIFF.FIFFV_COORD_UNKNOWN))
        info._update_redundant()
    self._raw_extras[0]['stim'] = stim
    self._raw_extras[0]['stim_code'] = stim_code
Specify how the trigger channel is synthesized from analog channels.

Has to be done before loading data. For a RawKIT instance that has been
created with preload=True, this method will raise a
NotImplementedError.

Parameters
----------
info : instance of MeasInfo
    The measurement info.
stim : list of int | '<' | '>'
    Can be submitted as list of trigger channels.
    If a list is not specified, the default triggers extracted from
    misc channels will be used with specified directionality.
    '<' means that largest values assigned to the first channel
    in sequence.
    '>' means the largest trigger assigned to the last channel
    in sequence.
stim_code : 'binary' | 'channel'
    How to decode trigger values from stim channels. 'binary' read stim
    channel events as binary code, 'channel' encodes channel number.
def _set_stimchannels(self, info, stim, stim_code):
    "Specify how the trigger channel is synthesized from analog channels.\n\n        Has to be done before loading data. For a RawKIT instance that has been\n        created with preload=True, this method will raise a\n        NotImplementedError.\n\n        Parameters\n        ----------\n        info : instance of MeasInfo\n            The measurement info.\n        stim : list of int | '<' | '>'\n            Can be submitted as list of trigger channels.\n            If a list is not specified, the default triggers extracted from\n            misc channels will be used with specified directionality.\n            '<' means that largest values assigned to the first channel\n            in sequence.\n            '>' means the largest trigger assigned to the last channel\n            in sequence.\n        stim_code : 'binary' | 'channel'\n            How to decode trigger values from stim channels. 'binary' read stim\n            channel events as binary code, 'channel' encodes channel number.\n        "
    if self.preload:
        raise NotImplementedError("Can't change stim channel after loading data")
    _check_option('stim_code', stim_code, ['binary', 'channel'])
    if (stim is not None):
        if isinstance(stim, str):
            picks = _default_stim_chs(info)
            if (stim == '<'):
                stim = picks[::(- 1)]
            elif (stim == '>'):
                stim = picks
            else:
                raise ValueError(("stim needs to be list of int, '>' or '<', not %r" % str(stim)))
        else:
            stim = np.asarray(stim, int)
            if (stim.max() >= self._raw_extras[0]['nchan']):
                raise ValueError(('Got stim=%s, but sqd file only has %i channels' % (stim, self._raw_extras[0]['nchan'])))
        nchan = (self._raw_extras[0]['nchan'] + 1)
        info['chs'].append(dict(cal=KIT.CALIB_FACTOR, logno=nchan, scanno=nchan, range=1.0, unit=FIFF.FIFF_UNIT_NONE, unit_mul=FIFF.FIFF_UNITM_NONE, ch_name='STI 014', coil_type=FIFF.FIFFV_COIL_NONE, loc=np.full(12, np.nan), kind=FIFF.FIFFV_STIM_CH, coord_frame=FIFF.FIFFV_COORD_UNKNOWN))
        info._update_redundant()
    self._raw_extras[0]['stim'] = stim
    self._raw_extras[0]['stim_code'] = stim_code