Fourier Transforms and Domain analysis: Application to Solar Spectra (It’s very challenging for undergraduate students, but you can have a big extra credit. Note that it’s an extra credit. So it’s not required; it’s optional.) However, whatever you do in future, getting acquainted with Fourier Transformation is very useful in any field of science and engineering.

It’s an extremely powerful technique! How to Represent (any) (in mathematical form)?

• Option 1: Taylor series represents any using polynomials.

• Polynomials are not the best - unstable and not very physically meaningful.

• Easier to talk about “” in terms of its “” (how fast/often signals change, etc).

Credit: S. Narasimhan Jean Baptiste Joseph Fourier (1768-1830)

• Had crazy idea (1807): • Any can be rewritten as a weighted sum of Sines (sin) and Cosines (cos) of different frequencies. • Don’t believe it? – Neither did Lagrange, Laplace, Poisson and other big wigs – Not translated into English until 1878! • But it’s true! – called – Possibly the greatest tool used in Engineering

Credit: S. Narasimhan A Sum of Sinusoids

• Our building block: Asin(x 

• Add enough of them to get any signal f(x) you want!

• How many degrees of freedom?

• What does each control?

• Which one encodes the coarse vs. fine structure of the signal? Credit: S. Narasimhan

• We want to understand the frequency  of our signal. So, let’s reparametrize the signal by  instead of x:

f(x) Fourier F() Transform

• For every  from 0 to infinite, F() holds the A and  of the corresponding sine Asin(x 

– How can F hold both? trick! F()  R()  iI() I() A   R()2  I()2   tan1 R()

F() Inverse Fourier f(x) Transform Credit: S. Narasimhan Time and Frequency

• example : g(t) = sin(2πf t) + (1/3)sin(2π (3f ) t)

Credit: S. Narasimhan Time and Frequency

• example : g(t) = sin(2πf t) + (1/3)sin(2π (3f ) t)

= +

Credit: S. Narasimhan Frequency Spectra

• example : g(t) = sin(2πf t) + (1/3)sin(2π(3f ) t)

= +

Credit: S. Narasimhan Fourier Transform – more formally

Represent the signal as an infinite weighted sum of an infinite number of sinusoids  Fu  f xei2uxdx 

Note: eik  cos k  isin k i  1

Arbitrary function Single Analytic Expression Spatial Domain (x) Frequency Domain (u) (Frequency Spectrum F(u)) Inverse Fourier Transform (IFT)  f x  Fuei2uxdx  Credit: S. Narasimhan Fourier Transform

• Also, defined as:

 Fu  f xeiuxdx  Note: eik  cos k  isin k i  1

• Inverse Fourier Transform (IFT)

(Relates five most important numbers.) 1  f x  Fueiuxdx 2  Fourier Transform Pairs (Examples)

Note that these are derived using angular frequency ( e iux )

Credit: S. Narasimhan Fourier Transform Pairs (Examples)

Note that these are derived using iux Credit: S. Narasimhan angular frequency ( e ) Properties of Fourier Transform

Spatial Domain (x) Frequency Domain (u)

Linearity c1 f x c2 gx c1Fu c2Gu 1  u  Scaling f ax F  a  a 

i2ux0 Shifting f x  x0  e Fu

Symmetry Fx f u Conjugation f  x F   u Convolution f x gx FuGu

n d f x n Differentiation i2u Fu dx n Note that these are derived using frequency ( e  i 2 ux ) Convolution

(Symbols of ∗ or ⊗ often used for convolution)

As a mathematical formula:

Convolutions are commutative: Fourier Transform and Convolution

Let g  f  h

 i2ux Then Gu  gxe dx “Convolution” 

   f  hx  ei2uxddx  

   f  ei2u d hx  ei2ux dx  

   f  ei2u d  hx'ei2ux'dx'    FuHu

Convolution in spatial (e.g., ) domain  Multiplication in frequency domain Fourier Transform and Convolution

Spatial Domain (x) Frequency Domain (u) g  f  h G  FH g  fh G  F  H

So, we can find g(x) by Fourier transform g  f  h

IFT FT FT

G F  H Convolution Examples

• The Fourier transform of a convolution is the product of the Fourier transforms

• The Fourier transform of a product is the convolution of the Fourier transforms

(Symbols of ∗ or ⊗ often used for convolution) Cross Correlation

(Note: This is convolution.)

(Pay attention to differences from convolution.) Auto Correlation

Power (density) spectrum! But the are not continuous.

Discrete Fourier Transformation (DFT) Directional cosines

Directional cosines forms orthonormal basis for a vector. And inner vector product gives an amplitude for each direction (= each directional cosine vector). Discrete Fourier Transformation

[cos(2πijk/N) & i sin(2πijk/N)] are orthonormal basis functions of DFT. Note i is for the imaginary part of complex number and j determines frequency of each base. For

given spatial data (Xk), DTF finds an amplitude (xj) for each base (= different frequency). Think about DFT as inner product. Fast Fourier Transformation (FFT) belongs to DFT. Frequency Spectra

Credit: S. Narasimhan Discrete Fourier Transformation Discrete Fourier Transformation Discrete Fourier Transformation Can use Python functions

• Use scipy functions fft(), ifft(), and conj() • The FFT cross correlation will give you a lag curve, but because the offset is close to zero, you will see the correlation peak at either end of the curve – Hint: Try rolling the lag curve a small amount to properly see the correlation peak