File:AliasingSines.svg

Summary

Description
English: A graph showing aliasing of an f=0.9 sine wave by an f=0.1 sine wave by sampling at a period of T=1.0, based on the raster image File:AliasingSines.png.
Français : Une graphique qui démontre le crénelage d'un signal sinusoïdal de fréquence f=0.9, confondu avec un signal de fréquence f=0.1 lors d'un échantillonnage de période T=1.0, basée sur l'image matricielle File:AliasingSines.png.
Date
Source Own work
Author Moxfyre
Other versions File:AliasingSines.png
SVG development
InfoField
Source code
InfoField

Python code

#!/usr/bin/python2.5

from pylab import *
from numpy import *

# create a figure
figure(figsize=(7.5,2.5))
rcParams.update({"figure.subplot.left":0.05, "figure.subplot.right":0.95,
                 "figure.subplot.bottom":0.1, "figure.subplot.top":0.9,
                 "svg.embed_char_paths":False})

# x coords from -1 to 11
x_fine = linspace(-0.4, 10.4, 1000)
x_coarse = linspace(0, 10, 11)

# sinewave w/ freq=0.9
y1 = sin(2*pi * 0.9 * (x_fine-0.5))
plot( x_fine, y1, "-", color="red")

# sinewave w/ freq=0.1
y2 = sin(2*pi * 0.1 * (x_fine-0.5))
plot(x_fine, y2, "-", color="blue")

# show aliasing
y3 = sin(2*pi * 0.1 * (x_coarse-0.5))
plot( x_coarse, y3, "o", color="black" )
vlines( x_coarse, 0, y3, color="black" ) # add the "lollipop" points

# set window and tick labels
axis([-0.5, 10.5, -1.1, 1.1])
yticks((-1.0,0,1.0), ('',0,''))
xticks(linspace(0,10,11))

# save it
savefig("AliasingSines.svg", transparent=True)

Licensing

Category:License migration redundant#AliasingSines.svg
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License. Subject to disclaimers.
Category:GFDL-en
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-3.0#AliasingSines.svg Category:Aliasing Category:Images with Python source code
Category:Aliasing Category:CC-BY-SA-3.0 Category:GFDL-en Category:Images with Python source code Category:License migration redundant Category:Valid SVG created with Matplotlib code