Mynd:White-noise-zoom-animation.gif

Frá SignWiki
Jump to navigation Jump to search

White-noise-zoom-animation.gif(416 × 272 pixel, stødd fílu: 1.12 MB, MIME-slag: image/gif, looped, 40 rammur, 2.0 s)

Henda fíla er frá Wikimedia Commons og kann verða brúka í øðrum verkætlanum. Frágreiðingin á fílu frágreiðingar síðu er víst her niðanfyri.

Samandráttur

Frágreiðing
English: Animation of a white noise plot with continuous zoom towards zero. The signal is self-similar, so the basic properties remain constant during the zoom. The animation repeats at a scaling factor of 2. The plot uses a finite number of sampling points, which are continuously added during the zoom, to keep the density constant.
Dagur
Kelda Egið verk
Høvundur Geek3
GIF genesis
InfoField
 
This plot was created with Matplotlib.
Source code
InfoField

Matplotlib source code

The plot was generated with Matplotlib
#! /usr/bin/env python3
# -*- coding:utf8 -*-

import matplotlib.pyplot as plt
from matplotlib import ticker
from matplotlib import animation
import numpy as np
from math import *

plt.rcParams['font.sans-serif'] = 'DejaVu Sans'
np.random.seed(58)

fname = "White-noise-zoom-animation"
nframes = 40
fx = 0.5
nsamples = int(320 / fx)

# create pseudo-random sequence for continous adding of time points
golden = (sqrt(5) - 1) / 2
t_unsorted = (golden * np.arange(nsamples)) % 1
sort_idx = np.argsort(t_unsorted)
t = t_unsorted[sort_idx]
randnorm = np.random.normal(0, 1, nsamples)
X = randnorm

# use self-similar signal for small t-values
mask0 = sort_idx < nsamples * fx**(1 - 1 / nframes)
t0, X0 = t[mask0], X[mask0]
for i in range(int(fx * nsamples) - 1, 0, -1):
    tfx = t[i] / fx
    i2 = np.searchsorted(t0, tfx)
    i1 = i2 - 1
    if tfx - t0[i1] < t0[i2] - tfx:
        X2 = X0[i1]
    else:
        X2 = X0[i2]
    X[i] = X2
    X0 = X[mask0] # update masked X0 from X (a bit inefficient)

ylim = -2.5, 2.5
def animate(nframe):
    plt.cla()
    xscale = fx**(nframe / nframes)
    mask = sort_idx < nsamples * fx / xscale
    plt.plot(t[mask], X[mask], '-')
    plt.xlim(0, xscale)
    plt.ylim(ylim[0], ylim[1])
    plt.grid(True)
    plt.xlabel('t')
    plt.ylabel('X')
    plt.gca().axes.xaxis.set_ticklabels([])
    plt.gca().axes.yaxis.set_ticklabels([])
    

fig = plt.figure(figsize=(520 / 90.0, 340 / 90.0), dpi=72)
plt.xlim(0, 1)
plt.ylim(ylim[0], ylim[1])
plt.grid(True)
plt.xlabel('t')
plt.ylabel('X')
plt.gca().axes.xaxis.set_ticklabels([])
plt.gca().axes.yaxis.set_ticklabels([])
plt.tight_layout()
anim = animation.FuncAnimation(fig, animate, frames=nframes)
anim.save(fname + '.gif', writer='imagemagick', fps=20)

Lisensur

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
ognan deil undir somu treytum
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Tú ert vælkomin til:
  • at deila – at avrita, breiða út og senda verkið
  • at remiksa – at tillaga ella broyta verkið
Undir hesum treytum:
  • ognan – Tú mást ognarskrivað verkið á ein slíkan hátt sum er útgreinaður av høvundanum ella lisenseigaranum (men ikki á nakran hátt ið kundi bent á at hesin hevur góðkent teg ella tína nýtslu av verkinum).
  • deil undir somu treytum – Um tú broytir, evnar til ella byggir víðari á hetta verk, so kanst tú bert útgeva verkið undir somu ella líkandi lisensi sum hesin.

Captions

Add a one-line explanation of what this file represents
Animation of infinite zoom into Gaussian white noise

Items portrayed in this file

depicts enskt

10. des 2022

media type enskt

image/gif

Søgan hjá fíluni

Trýst á dato/tíð fyri at síggja fíluna, sum hon sá út tá.

Dagur/TíðLítil myndDimensjónirBrúkariViðmerking
streymur10. des 2022 kl. 17:08Lítil mynd av versjónini frá 10. des 2022 kl. 17:08416 × 272 (1.12 MB)Geek3Uploaded own work with UploadWizard

Fylgjandi síða slóðar til hesa fílu: