Looking for the latest version? Download noisychannel.py (2.9 kB)
Name Modified Size Downloads / Week Status
Totals: 4 Items   39.6 kB 3
examples 2012-02-06 22 weekly downloads
noisychannel.py 2012-02-06 2.9 kB 11 weekly downloads
COPYING 2012-02-06 35.1 kB 11 weekly downloads
README 2012-02-06 1.5 kB 11 weekly downloads
Written by Charles Knight, charles@rabidaudio.com Released under GPLv3, see COPYING for details. This program was written to demonstrate errors in transmission for a presentation on Claude Shannon's Noisy Channel Coding Theorem. (It was written in Python because I couldn't get it to work in C!) It takes an input file, the probability of a bit being flipped, and if specified, the size of the header of the file. The program was intended to take monochrome bitmap files as input, so that each bit refers to a pixel in the image; however, it will work on any input file. Thus, it would be easy to see errors in the output file, as some of the pixels would be flipped. The header skip portion is intended to keep the header of the image intact, so that the image can still be opened in an image viewing program. However, if you wish to simulate noise over the header as well, simply set HEAD to 0. This can also be used to seek ahead through the input before applying the noise function. There is some clean-up work that is necessary for this program to be usable by the general public. For example, having it use stdin and stout if a file is not specified would be a useful feature. Also, confirmation before overwriting a file is missing, so USE AT YOUR OWN RISK. I'm sure there are some bugs I haven't found as well. It is unlikely that I will continue support with this, as it fits my needs, but if you have questions about it, feel free to ask. Just don't expect me to be very helpful; I am a terrible programmer!
Source: README, updated 2012-02-06