Skip to content

Commit

Permalink
Finishedgit add .
Browse files Browse the repository at this point in the history
  • Loading branch information
saravia committed Nov 27, 2015
1 parent b41e8e5 commit a8bb1a5
Show file tree
Hide file tree
Showing 16 changed files with 161 additions and 48 deletions.
Binary file added Baudin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MRA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added coffee_is_essential.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions fft_example.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
N <- 1024*128
w1 <- 200
w2 <- 543
N <- 1024
w1 <- 1
w2 <- 1
a1 <- 1
a2 <- 2
a2 <- 0
noise <- 0
x <- seq(from=0, to=5,length.out = N)
x <- seq(from=0, to=5.5,length.out = N)
Dt <- (max(x) - min(x)) / N
Dw <- 1 / (N * Dt)
y <- a1*sin(w1*x*2*pi) + a2*cos(w2*x*2*pi) + rnorm(N, 0, noise)
plot(x,y,type="l")
Y <- fft(y)/N
MY <- 2*Mod(Y)
freqs <- seq(from=0, to=N-1) * Dw
plot(freqs,MY^2, type="l", xlim=c(0,1000))

par(mfrow = c(2,1))
plot(x,y,type="l")
plot(freqs,MY^2, type="b", xlim=c(0,10))
par(mfrow = c(1,1))
Binary file added kprl-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-1-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-12-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-5-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-6-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main-figure/unnamed-chunk-9-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 79 additions & 24 deletions main.Rpres
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ $$f(x) = a_0 + a_1 e^{i w_1 x} + a_2 e^{i w_2 x} + \cdots$$

Fourier representations
========================================================
incremental: true

The Fourier representation looks different depending on the domain of the function $f:A\rightarrow\mathbb{C}$, with $A$ being:
<br/><br/>

$\mathbb{R}$: Real numbers

$\mathbb{Z}$: Integer numbers

$\mathbb{T}_p$: Circle of length $p$

$\mathbb{Z}$: Integer numbers

$\mathbb{P}_N$: Polygon of $N$ sides

Continuous Fourier Transform (CFT)
Expand All @@ -55,32 +56,32 @@ $$
\end{aligned}
$$

Discrete Time Fourier Transform (DTFT)
Fourier Series
========================================================

For functions defined on the integers $\mathbb{Z}$.
For functions defined on the integers on an interval $\mathbb{T}_p=[0,p)$.

$\phi:\mathbb{Z}\rightarrow\mathbb{C}$
$g:\mathbb{T}_p\rightarrow\mathbb{C}$ with $g(p) = g(0)$

$$
\begin{aligned}
\phi(n) &= \int_{0}^p \Phi(s) e^{2\pi isn/p} ds \\
\Phi(s) &= \frac{1}{p}\sum_{n=-\infty}^\infty \phi(n) e^{-2\pi isn/p} \\
g(x) &= \sum_{k=-\infty}^\infty G(k) e^{2\pi ikx/p} \\
G(k) &= \frac{1}{p}\int_{0}^p g(x) e^{-2\pi ikx/p} dx \\
\end{aligned}
$$


Fourier Series
Discrete Time Fourier Transform (DTFT)
========================================================

For functions defined on the integers on an interval $\mathbb{T}_p=[0,p)$.
For functions defined on the integers $\mathbb{Z}$.

$g:\mathbb{T}_p\rightarrow\mathbb{C}$ with $g(p) = g(0)$
$\phi:\mathbb{Z}\rightarrow\mathbb{C}$

$$
\begin{aligned}
g(x) &= \sum_{k=-\infty}^\infty G(k) e^{2\pi ikx/p} \\
G(k) &= \frac{1}{p}\int_{0}^p g(x) e^{-2\pi ikx/p} dx \\
\phi(n) &= \int_{0}^p \Phi(s) e^{2\pi isn/p} ds \\
\Phi(s) &= \frac{1}{p}\sum_{n=-\infty}^\infty \phi(n) e^{-2\pi isn/p} \\
\end{aligned}
$$

Expand All @@ -106,15 +107,16 @@ $$
\begin{aligned}
\int_{-\infty}^\infty f(x)\overline{g(x)}dx
&= \int_{-\infty}^\infty F(s)\overline{G(x)}ds,\ \ \mathbb{R} \\
\sum_{n=-\infty}^\infty f(n)\overline{g(n)}
&= p \int_{0}^p F(s)\overline{G(x)}ds,\ \ \mathbb{Z} \\
\int_{0}^p f(x)\overline{g(x)}dx
&= p \sum_{k=-\infty}^\infty F(k)\overline{G(k)},\ \ \mathbb{T}_p \\
\sum_{n=-\infty}^\infty f(n)\overline{g(n)}
&= p \int_{0}^p F(s)\overline{G(x)}ds,\ \ \mathbb{Z} \\
\sum_{n=0}^{N-1} f(n)\overline{g(n)}
&= N \sum_{k=0}^{N-1} F(k)\overline{G(k)},\ \ \mathbb{P}_N
\end{aligned}
$$


Discretization and periodization
========================================================

Expand All @@ -126,6 +128,7 @@ From a function $f$, under some conditions, we can construct a periodic functio

$$g(x) = \sum_{m=-\infty}^\infty f(x-mp) $$


Poisson relations
========================================================
incremental: true
Expand All @@ -149,6 +152,7 @@ Poisson cube

Nyquist-Shannon sampling theorem
========================================================
incremental: true

Assume that $f(t)$ is *$\sigma$-bandlimited*

Expand All @@ -166,6 +170,7 @@ $$\sigma < \frac{1}{2\Delta t} \equiv \omega_{Nyq}$$

Example: single sinusoid
========================================================
incremental:true

$$
\begin{aligned}
Expand All @@ -189,12 +194,12 @@ Example: single sinusoid
========================================================

```{r, echo=FALSE}
N <- 1024*128
w1 <- 10
N <- 1024
w1 <- 1
a1 <- 1
x <- seq(from=0, to=4/w1,length.out = N)
x <- seq(from=0, to=5.3,length.out = N)
y <- a1*sin(w1*x*2*pi)
plot(x*w1,y/a1,type="b",
plot(x*w1,y/a1,type="l",
xlab = expression(paste("w"[1],"t")),
ylab = expression("f(t)/a"[1]))
```
Expand Down Expand Up @@ -247,7 +252,7 @@ Example: Multiple sinusoids with noise
========================================================

```{r, echo=FALSE}
N <- 1024*128
N <- 1024*4
w1 <- 10
w2 <- 1
a1 <- 2
Expand Down Expand Up @@ -286,7 +291,7 @@ Example: Time-varying signal
========================================================

```{r, echo=FALSE}
N <- 1024*128
N <- 1024*4
w1 <- 5
a1 <- 1
mu <- 5
Expand Down Expand Up @@ -331,7 +336,7 @@ Example: Time-varying signal 2
========================================================

```{r, echo=FALSE}
N <- 1024*256
N <- 1024*4
w1 <- 5
w2 <- 0.7
w3 <- 1
Expand Down Expand Up @@ -427,6 +432,7 @@ text(1,0.8, labels = "a=1.2", col="blue")

Definition of wavelet transforms
========================================================
incremental: true

Given $f\in L^2(\mathbb{R})$, we define its *continuous wavelet transform* with respect to the wavelet $\psi$ as

Expand All @@ -440,6 +446,7 @@ $$ 0 < C_{\psi}\equiv\int_{-\infty}^\infty

Example: Time-varying signal CWT
========================================================
incremental: true

```{r, echo=FALSE}
N <- 1024*256
Expand Down Expand Up @@ -482,6 +489,7 @@ Mexican hat CWT

Example: Time-varying signal CWT 2
========================================================
incremental: true

Haar CWT

Expand All @@ -496,6 +504,7 @@ Morlet CWT

Example: Time-varying signal CWT 3
========================================================
incremental: true

Morlet

Expand Down Expand Up @@ -524,9 +533,16 @@ $$

Inverse of a wavelet transform
========================================================
incremental: true

$$f(t) = \frac{1}{C_\psi}\int_{-\infty}^\infty\int_{-\infty}^\infty \mathcal{W}_\psi[f](a,b) \psi_{a,b}(t) \frac{da\ db}{a^2}$$

only when

$$ 0 < C_{\psi}\equiv\int_{-\infty}^\infty
\frac{\left|\hat{\psi}(\omega)\right|^2}{\left|\omega\right|} d\omega
<\infty $$


Discrete wavelet transform
========================================================
Expand All @@ -543,20 +559,59 @@ $$\psi_{m,n}(t)=2^{-m/2} \psi \left( 2^{-m} t - n \right),\ \ \ n,m \in \mathbb{
When can we recover $f(t)$ from $\mathcal{W}_\psi[f](m,n)$ ?


Discrete wavelet transform 2
Orthonormal basis
========================================================

When $\psi_{m,n}$ is complete in and orthonormal in $L^2(\mathbb{R})$:
Find $\psi_{m,n}$ such that they form a complete and orthonormal basis in $L^2(\mathbb{R})$:

$$f(t) = \sum_{m,n=-\infty}^\infty \langle f,\psi_{m,n}\rangle\ \psi_{m,n}(t)$$


Multiresolution analysis (MRA)
========================================================
incremental: true

![](MRA.png)

> *MRA is really an effective mathematical framework for hierarchical decomposition of an image (or signal) into components of different scales (or frequencies).*


Example application
========================================================

**Time-frequency analysis of solar $p$-modes**

*F. Baudin, A. Gabriel, D. Gibert (1994)*

***

![](Baudin.png)


Example application 2
========================================================

**Wavelets: a powerful tool for studying rotation, activity, and pulsation in Kepler and CoRoT stellar light curves**

*J. P. Bravo, S. Roque, R. Estrela, I. C. Leão, and J. R. De Medeiros (2014)*

***

![](kprl-example.png)


Thank you!
========================================================

![](coffee_is_essential.jpg)

***

> MRA is really an effective mathematical framework for hierarchical decomposition of an image (or signal) into components of different scales (or frequencies).
[https://github.molgen.mpg.de/saravia/wavelets-SAGE](https://github.molgen.mpg.de/saravia/wavelets-SAGE)

saravia@mps.mpg.de

ags3006@gmail.com

Orthogonality relations
========================================================
Expand Down
Loading

0 comments on commit a8bb1a5

Please sign in to comment.