27
Fourier Transform and the Convolution Theorem

Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

  • Upload
    others

  • View
    32

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Fourier Transform and theConvolution Theorem

Page 2: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

• Taylor expansion

• Maclaurin expansion (x0 = 0)

f (x) = f (x0) +f '(x0)(x - x0)

1!+

f ' '(x0)(x - x0)2

2!+K

f (x) = f (0) +f '(0)x

1!+

f ' '(0)x 2

2!+K

Taylor expansion

Page 3: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

ex =1+ x +x 2

2!+

x 3

3!+K

e(ix ) =1+ ix +(ix)2

2!+

(ix)3

3!+K

=1+ ix -x 2

2!-

ix 3

3!+K

= cos(x) + isin(x)

sin(x) = x -x 3

3!+

x 5

5!-K

cos(x) =1-x 2

2!+

x 4

4!-K

eix = cos(x) + i sin(x)

Page 4: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Fourier transform

F(s) = f (x)e- i2pxsdx-•

Ú

f (x) = F(s)ei2pxsds-•

Ú†

F(s) = f (x)e- ixsdx-•

Ú

f (x) =1

2pF(s)eixsds

-•

Ú

F(s) =12p

f (x)e-ixsdx-•

Ú

f (x) =12p

F(s)eixsds-•

Ú

Page 5: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Transform of top hat

f (x) = 0, x < x0

=1, - x0 £ x £ x0

= 0, x0 < x

F(s) =12p

f (x)e-isxdx-•

Ú

=12p

e- isxdx-x0

x0Ú

=-12p

e-isx

isÈ

Î Í

˘

˚ ˙

-x0

x0

=eisx0 - e-isx0

is 2p

=2x0 sin(sx0)

sx0 2p

-2 -1 1 2

0.25

0.5

0.75

1

1.25

1.5

1.75

2

Page 6: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Transforms of Top hat functions

-100 -50 50 100

0.1

0.2

0.3

0.4

-2 -1 1 2

0.25

0.5

0.75

1

1.25

1.5

1.75

2

-2 -1 1 2

0.25

0.5

0.75

1

1.25

1.5

1.75

2

-100 -50 50 100

0.02

0.04

0.06

0.08

Page 7: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Dirac Delta function

d(x) = 0,x ≠ 0

d(x)dx =1-•

Úf (x)d(x - x0)dx = f (x0)

-•

Ú

-4 -3 -2 -1 1 2 3 4

0.2

0.4

0.6

0.8

1

Page 8: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

One Delta Function

F(s) =12p

d(x - x0)e-ixsdx-•

Ú

=eix0s

2p

-4 -3 -2 -1 1 2 3 4

0.2

0.4

0.6

0.8

1

-30 -20 -10 10 20 30

0.2

0.4

0.6

0.8

Page 9: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Two Delta Functions

-30 -20 -10 10 20 30

-0.75

-0.5

-0.25

0.25

0.5

0.75

-4 -3 -2 -1 1 2 3 4

0.2

0.4

0.6

0.8

1

F(s) =12p

[d(x + x0) + d(x - x0)]e-ixs-•

Ú dx

=12p

[e-isx0 + eisx0 ]

=2cos(sx0)

2p

Page 10: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Tranforms of Delta Functions

-30 -20 -10 10 20 30-0.25

0.25

0.5

0.75

1

-4 -3 -2 -1 1 2 3 4

0.2

0.4

0.6

0.8

1-4 -3 -2 -1 1 2 3 4

0.2

0.4

0.6

0.8

1

-30 -20 -10 10 20 30

0.2

0.4

0.6

0.8

-4 -2 2 4

0.2

0.4

0.6

0.8

1

-30 -20 -10 10 20 30

1

2

3

-4 -2 2 4

0.2

0.4

0.6

0.8

1

-8 p -6 p -4 p -2 p 2 p 4p 6p 8p

0.2

0.4

0.6

0.8

1

L

L

L

L

Page 11: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Transform of a Gaussian

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Page 12: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Convolution

-40 -20 20 40

0.2

0.4

0.6

0.8

1

-40 -20 20 40

0.250.5

0.751

1.251.5

1.752

f

g

f ƒ g

c(u) = f (x) ƒ g(x) = f (x)g(u - x)dx-•

Ú

-40 -20 20 40

0.25

0.5

0.75

1

1.25

1.5

1.75

2

Page 13: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Convolution of a Gaussian with aBimodal function

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

1.2

f

g

f ƒ g

Page 14: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Multiplication

-4 -2 2 4

0.2

0.4

0.6

0.8

1

-4 -2 2 4

0.2

0.4

0.6

0.8

1

-4 -2 2 4

0.2

0.4

0.6

0.8

1

f

g

f ⋅ g

Page 15: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Multiplication of a Gaussian witha Bimodal function

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

f

g

-3 -2 -1 1 2 3

0.1

0.2

0.3

0.4

0.5

0.6

f ⋅ g

Page 16: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Convolution Theorem

FT[ f ƒ g] = FT[ f ] ⋅ FT[g]

FT[ f ⋅ g] = FT[ f ] ƒ FT[g]

f ƒ g = g ƒ fConvolution is commutative

Convolution is associative

Convolution is distributive over addition

f ƒ (g ƒ h) = ( f ƒ g) ƒ h

f ƒ (g + h) = f ƒ g + f ƒ h

Page 17: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Convolution is Commutative

g ƒ f = g(x) f (u - x)dx-•

Ú

x'= u - x

x = u - x'

dx = -dx '

= - g(u - x') f (x')dx'•

-•

Ú

= f ƒ g

= g(u - x') f (x')dx'-•

Ú

Page 18: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

The Wave equation

∂ 2y(x, t)∂x 2 =

1v 2

∂ 2y(x, t)∂t 2

Wave Equation

A solution

y(x, t) =y0 cos(kx -wt)

k 2 =w 2

v 2 ,v =wk

y = wave amplitude

x = spatial direction

t = time

v = velocity

k = wave vector

w = frequency

y(x, t) =y0 sin(kx -wt)

y(x, t) =y0ei(kx-wt )

Alternate solutions

Page 19: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Diffraction

Xray dr1

Diffraction = r(r1)ei(k⋅r1 -wt ) + r(r2)ei(k⋅r2 -wt ) +L

= r(r)ei(k⋅r-wt )drVÚ

= e-iwt r(r)eik⋅rdrVÚ

Page 20: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Crystal Diffraction

-40 -20 20 40

0.2

0.4

0.6

0.8

1

-40 -20 20 40

0.25

0.5

0.75

1

1.25

1.5

1.75

2

-40 -20 20 40

0.25

0.5

0.75

1

1.25

1.5

1.75

2

-40 -20 20 40

0.25

0.5

0.75

1

1.25

1.5

1.75

2

Infinite lattice

Infinite crystal

Physical limit of the crystal

Real crystal

Page 21: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Crystal Diffraction as a FourierTransform

Re alCrystal = CrystalLimit ⋅ (Molecule ƒ Lattice)

FT(Re alCrystal) = FT(CrystalLimit) ƒ [FT(Molecule) ⋅ FT(Lattice)]

CrystalDiffraction = Broadening ƒ [MolecularTranform ⋅ ReciprocalLattice]

Fourier transform of a real asymmetric function iscomplex and hermitian(even real, odd imaginary),->Friedel pair

-40 -20 20 40

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-40 -20 20 40

0.25

0.5

0.75

1

1.25

1.5

1.75

2

ƒ

=

⋅(

)-40 -20 20 40

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-40 -20 20 40

0.25

0.5

0.75

1

1.25

1.5

1.75

2

-40 -20 20 40

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-40 -20 20 40

0.25

0.5

0.75

1

1.25

1.5

1.75

2

-100 -50 50 100

0.02

0.04

0.06

0.08

=

ƒ[-4 -2 2 4

0.2

0.4

0.6

0.8

1

L

L

]-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-4 -2 2 4

0.2

0.4

0.6

0.8

1

-4 -2 2 4

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-3 -2 -1 1 2 3

0.2

0.4

0.6

0.8

1

-100 -50 50 100

0.02

0.04

0.06

0.08

-100 -50 50 100

0.02

0.04

0.06

0.08

Page 22: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Correlation

corr(u) = f o g = f (x)g(x + u)dx-•

Ú

c(u) = f (x) ƒ g(x) = f (x)g(u - x)dx-•

ÚCorrelation is NOT commutative

f o g ≠ g o fCorrelation Theorem

FT( f o g) = FT *( f ) ⋅ FT(g)

Page 23: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Auto-correlation

f o f = f (x) f (x + u)dx-•

Ú

FT( f o f ) = FT *( f ) ⋅ FT( f )

= F * F

= F 2

f o f = FT-1( F 2)Patterson function

Page 24: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Patterson function

-5 -4 -3 -2 -1 1 2 3 4 5

1

2

3

4

-7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7

2

4

6

8

10

12

14

f

f o f

Page 25: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Atomic scattering and B-factor

Fhkl = f je2pi(hx +ky + lz)

f j = f0 j (s)e-B j s

2

Multiplication in reciprocal space represents convolution of the transform over the atomic positions

Page 26: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

Resolution truncation

• Resolution truncation means multiplying bya top hat function

• This translates to a convolution of theelectron density by a broadening function

Page 27: Fourier Transform and the Convolution Theorem · Crystal Diffraction as a Fourier Transform † RealCrystal=CrystalLimit⋅(MoleculeƒLattice) † FT(RealCrystal)=FT(CrystalLimit)ƒ[FT(Molecule)⋅FT(Lattice)]

References

• Crystals, X-rays and Proteins– Dennis Sherwood

• The Fourier Transform and its Applications– Ronald N. Bracewell

• Mathematica