def return_markers(self, state='MicromedCode'):
        """Return all the markers (also called triggers or events).

        Returns
        -------
        list of dict
            where each dict contains 'name' as str, 'start' and 'end' as float
            in seconds from the start of the recordings, and 'chan' as list of
            str with the channels involved (if not of relevance, it's None).

        Raises
        ------
        FileNotFoundError
            when it cannot read the events for some reason (don't use other
            exceptions).
        """
        markers = []
        try:
            all_states = self._read_states()
        except ValueError:  # cryptic error when reading states
            return markers

        try:
            x = all_states[state]
        except KeyError:
            return markers

        markers = []
        i_mrk = hstack((0, where(diff(x))[0] + 1, len(x)))
        for i0, i1 in zip(i_mrk[:-1], i_mrk[1:]):
            marker = {'name': str(x[i0]),
                      'start': (i0) / self.s_freq,
                      'end': i1 / self.s_freq,
                     }
            markers.append(marker)

        return markers