Name

TwoDTestFunc- Create a 2D test function or quantities related to it, where these quantities

Usage

output = TwoDTestFunc(Size, p, q, a, b, flag=0, alpha=0)

Input

Size
Is the size of the image. MUST be odd.
p
the x-frequency
q
the y-frequency
a
the x-falloff
b
the y-falloff
flag
takes on one of 5 possible values. (0) 2D function, (1) 2D FT , (2) projection , (3) FT of projection , (4) FH
alpha
the projection angle (when needed)

Output

output
depends on flag=0,1,2,3 or 4

Description

Purpose: Create a nicely bounded function from which one can calculate projections analytically. The Function (flag=0) is

cos(px) cos(qy) exp(-x2 /a2 /2) exp(-y2/b2 /2)

There is an additional normalization, such that the total integral is unity. The normalization constant is

(1/ 2/ $\pi$) exp(a2 p2 /2) exp(b2 q2 /2)

The Fourier transform (flag=1) is

The projection in Fourier space (flag=3) is (Fourier variable is v)

with

P = p cos(alpha) a2 /D Q = q sin(alpha) b2 /D

The projection (flag=2) is (parametrized by x)

with X=x/D

The Fourier Harmonic (flag=4) is (parametrized by k,m) when a=b

with X=x/D

Author / Maintainer

P. R. Baldwin

Keywords

category 1
UTILITIES
category 2
SPATIAL.

Files

See also

Maturity

Bugs

Only works with odd size image. flag=4 not yet implimented

twoDTestFunc (last edited 2013-07-01 13:13:02 by localhost)