示例#1
0
 def _zip_colors(self):
     """ Create a list of alternating colors and zip them to the
     burst sequence, keep as a list of burst lists.
     """
     nsym = len(self.burst_sequence)
     self._colors = map(self._positional_color, xrange(nsym))
     zipped = zip(self.burst_sequence, self._colors)
     self[:] = zipped
     self.bursts = slices(zipped, self._burst_len)
示例#2
0
 def _create_burst_sequence(self):
     """ Insert redundant symbols into the character sequence. """
     make_burst = lambda b: self._new_redundance + b
     bursts = map(make_burst, slices(self._sequence, self._burst_signi_len))
     self.burst_sequence = list(chain(*bursts))