File:The Colors of Noise.svg
From testwiki
Jump to navigation
Jump to search
Original file (SVG file, nominally 576 × 432 pixels, file size: 1.41 MB)
Contents
This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.
Summary
| DescriptionThe Colors of Noise.svg |
English: The colors noise as generated by the colorednoise Python package. The figure shows the color coded relative power spectral density (PSD) for Brown, pink, white, blue, and violet noise normalized at 1kHz. Note the slopes of the PSD are -20, -10, 0, 10, 20 (dB/dec) for each noise spectum respectively. |
| Date | |
| Source | Own work |
| Author | AkanoToE |
| Other versions |
Own work based on: The Colors of Noise.png |
Source Code
import colorednoise as cn
import matplotlib.pyplot as plt
from matplotlib import mlab
betas = [-2, -1, 0, 1, 2]
colors = ['violet', 'blue', 'gray', 'pink', 'darkred']
samples = 100*44100
plt.style.use('default')
plt.rc('font', family='serif', size=14)
plt.rc('text', usetex=True)
fig = plt.figure(dpi=300)
plt.annotate(r'\textit{The Colors of Noise}', (1300, 42), fontsize=16)
nfft=2**21
for beta, color in zip(betas, colors):
y = cn.powerlaw_psd_gaussian(beta, samples)
s, f = mlab.psd(y, NFFT=nfft)
plt.semilogx(2e5*f, 4 + 10*np.log10(s/s[4100:4200].mean())
, color=color, lw=0.5)
plt.xlabel('Frequency (Hz)')
plt.ylabel('Power Spectral Density (dB)')
plt.xlim([1e3, 2e5])
plt.ylim([-70, 56])
plt.tight_layout()
if fig.dpi >= 300:
plt.savefig('../fig/The_Colors_of_Noise.svg')
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International 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.
Captions
Power Spectral Density plot for different colors of noises
Items portrayed in this file
depicts
26 July 2022
1,476,823 byte
image/svg+xml
4266222685f169b363b20ea16401c5439dbeddfb
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 22:41, 26 July 2022 | 576 × 432 (1.41 MB) | wikimediacommons>AkanoToE | Uploaded own work with UploadWizard |
File usage
There are no pages that use this file.