Giter Club home page Giter Club logo

rpws's Introduction

rpws

Gridded evaluation of samples from the real ensemble of Gaussian random plane waves in two and three dimensions. MATLAB code driving NUFFT library.

Alex H. Barnett, (c) 2006-2017

Dependencies

Description

These codes evaluates on a regular square (d=2) or cubical (d=3) grid of points a real-valued function u drawn at random from a certain Gaussian random field with zero mean, unit variance, and an isotropic (radially symmetric) autocorrelation function. There are two cases:

  • alpha=1: "monochromatic" random plane waves. u is the real part of the Fourier transform of Gaussian white noise living on the unit circle or sphere. This is M. V. Berry's 1977 model for chaotic eigenfunctions. In other words,

u(\mathbf{x}) = \mbox{Re } \lim_{n\to\infty} \frac{1}{\sqrt{n}} \sum_{j=1}^n a_j e^{i\mathbf{n}_j \cdot \mathbf x}~,  \qquad \mathbf{x} \in \mathbb{R}^d, \quad \mathbf{n}_j \in S^{d-1}, \quad a_j \in \mathbb{C}

where for each j, aj is iid random from a complex Gaussian (ie real and imaginary parts are iid Gaussian with zero mean and unit variance), and nj is iid uniformly randomly drawn from the unit circle or sphere with the usual Haar measure. In terms of distance r, the autocorrelation function of u is the J0(r) Bessel function in 2D, or the spherical Bessel j0(r) = sin(r)/r in 3D. For some pictures in 2D see https://math.dartmouth.edu/~ahb/rpws/

  • alpha=0: "Fubini-Study ensemble". u is the real part of the Fourier transform of Gaussian white noise uniformly filling the unit disc or ball. This is locally the same as a random homogeneous polynomial evaluated on the unit sphere Sd, in the limit of large degree (zooming in to a patch of the sphere it becomes Euclidean space). Its autocorrelation function has faster decay than for alpha=1, although it is still oscillatory.

Basic usage

From either MATLAB or octave:

  • [u x] = rpw2dnufft(M, ppw, alpha); outputs a 2D M-by-M grid of function values u at the coordinates given by x along both axes, with ppw grid points per wavelength. alpha is 0 or 1 as described above.

  • [u x] = rpw3dnufft(M, ppw, alpha); outputs a 3D M-by-M-by-M grid of function values u at the coordinates given by x along all three axes, with ppw grid points per wavelength. alpha is 0 or 1 as described above.

See the MATLAB help documentation for these two functions for more options, and timing information.

rpws's People

Contributors

ahbarnett avatar

Watchers

James Cloos avatar  avatar

Forkers

omegranate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.