sp.gold

Module providing the functionality to generate Gold Codes / Sequences

Example Usage

gold

import numpy
import pylab
from sp import mls
from sp import filter
nbits = 9
m = mls.mls(nbits)
pylab.figure()
pylab.title('%d bit M-Sequence Periodic Autocorrelation' % nbits)
m = numpy.where(m, 1.0, -1.0)
pylab.plot((numpy.roll(filter.ccorr(m, m).real, 2**nbits/2 - 1)))
pylab.xlim(0, len(m))
pylab.show()

(Source code, png, hires.png, pdf)

_images/gold-1.png

See the individual methods below for further details.

Functions

sp.gold.gold(n)[source]

Generate a set of 2^n +1 Gold Codes

sp.gold.gen_gold(seq1, seq2)[source]

Function to produce a gold sequence based on two input preferred pair Maximal Length Sequences

Table Of Contents

Previous topic

sp.gauss

Next topic

sp.mls

This Page