File:Wellenpakete Summe.svg

Summary

Description
Deutsch: Einzelne Wellenpakete gleicher Frequenz und unterschiedlicher Phase. Das Summensignal ergibt eine Kohärenzzeit in der Größenordnung, die der Dauer der einzelnen Wellenpakete entspricht.
Date
Source Own work
Author Christian Schirm
SVG development
InfoField
Source code
InfoField

Python code

#This source code is public domain 
#Author: Christian Schirm
import numpy, pylab
from matplotlib.font_manager import FontProperties
import matplotlib.pyplot as plt
 
pos=4,1.5,6,9
phase=0.2,0.0,0.6,0.3
x=numpy.linspace(0, 10, num=500)

ys=[numpy.cos(4*x*2*numpy.pi + f*2*numpy.pi)*numpy.exp(-((x-p)/1.5)**2) for p,f in zip(pos,phase)]
Y=numpy.sum(ys,axis=0)
for i in range(len(ys)): ys[i]+=i*2

plt.clf()
for y in ys: plt.plot(x,y,'-')
plt.plot(x,Y-3,'-')
for i in range(40): plt.plot([i*.25,i*.25],[-5,10],'0.8')

x=numpy.linspace(0, 10, num=41)
ys=[numpy.cos(4*x*2*numpy.pi + f*2*numpy.pi)*numpy.exp(-((x-p)/1.5)**2) for p,f in zip(pos,phase)]
Y=numpy.sum(ys,axis=0)
for i in range(len(ys)): ys[i]+=i*2
for y in ys: plt.plot(x,y,'bo', markersize=3)
plt.plot(x,Y-3,'bo', markersize=3)

plt.show()


Quell-code

Erstellt mit Python und anschließend bearbeitet mit Inkscape.

Benötigte Open-Source-Software:

Nach der Installation von Python den Quelltext in eine Datei plot.py kopieren und starten durch Doppelklicken oder in der Konsole durch Eingabe von python plot.py

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Category:CC-Zero#Wellenpakete%20Summe.svgCategory:Self-published work
Category:Coherence Category:NumPy
Category:CC-Zero Category:Coherence Category:NumPy Category:Self-published work Category:Valid SVG created with Matplotlib code