#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Options

# Wavelet

Created page Wavelet.

This is a huge topic, of course...I think one could explain some elementary facts and provide a list to further material, instead of writing a new encyclopedia :-)

@John: If you plan to hire some applied mathematicians over at UCR and create some applied math courses, wavelets are a good candidate for some advanced stuff: This is both very applied (image/signal processing, data compression, statistical estimation, numerical solutions and approximation theory etc.) and very interesting from a pure mathematical point of view (turbulence, fractals, harmonic analysis...).

• Options
1.

Of course I don't get to hire anyone at UCR, especially when I'm over here in Riverside. I also find it very dull to serve on hiring committees, given that my choices rarely get hired. (I'm just not a good enough politician for that.)

If I were able to influence the hiring of applied mathematicians at UCR, I would push for people working on climate change or energy issues. I'm sure they exist...

Comment Source:Of course _I_ don't get to hire anyone at UCR, especially when I'm over here in Riverside. I also find it very dull to serve on hiring committees, given that my choices rarely get hired. (I'm just not a good enough politician for that.) If I were able to influence the hiring of applied mathematicians at UCR, I would push for people working on climate change or energy issues. I'm sure they exist...
• Options
2.

By the way, here's what a committee of people in the UCR math department came up with:

Report of the Applied Mathematics Committee

October 29, 2010

The two charges to the committee were to come up with new courses in applied mathematics, mainly at the graduate level, and to make some tentative suggestions for replacing the Mathematics Department’s current, moribund applied mathematics program in the University Catalog with one which will foster growth in that area.

Recommendations for new courses. The current recommendations are for one new course in mathematical modeling at the upper undergraduate level, one new course on more advanced topics in linear algebra at the beginning graduate level, and a sequence of three new courses on differential equations for applications at the beginning graduate level. In some cases, adoption of these courses might generate rearrangements of material in some of the Department’s eleven core graduate courses, most notably in the 209 sequence. Other adjustments will probably be necessary for the Department’s current 211 and 212 courses and sequences. Several elements of formal course proposals are given below; the goal is to have these approved at all levels in time for adoption in the 2011 – 2012 academic year.

In addition to these suggestions, the Committee strongly recommends that steps be taken to develop and adopt a pair of additional courses at the beginning graduate level on numerical solutions of differential equations, one for ordinary differential equations and another for partial differential equations. The main reason for not submitting specific proposals is that the Department currently does not have personnel with sufficiently deep backgrounds in these areas, and the committee views the hiring of such faculty in the immediate future as a critically high priority. In particular, there was considerable sentiment that the establishment of new degree programs in applied mathematics may have to wait until the Department has faculty members in these areas.

Here are the specific course recommendations. Each course should carry four credit hours, with three hours of lectures and the other hour for discussion or research as usual:

MATH 168. Introduction to Mathematical Modeling. Detailed studies of how mathematical methods are applied to specific, important problems in the sciences and engineering, with examples taken from the theories of mechanical vibrations, population dynamics and flow phenomena. — Prerequisites: 146AB and either 150A or 151A.

MATH 202. Numerical Linear Algebra. Standard decompositions of matrices and their computational uses, conditioning data, stability of solutions, effective numerical methods for computing eigenvalues. — Prerequisites: 132 or equivalent. Text: Trefethen and Bau, Numerical Linear Algebra. Coverage: Most of the material from the first five units, with very light review coverage of topics from the prerequisite(s) and omission of later topics in these chapters as appropriate to fit the time constraints of the course.

MATH 207ABC. Differential Equations for Applications. The first course is on basic topics in ordinary differential equations which go beyond standard undergraduate material, the second is on the derivation of solutions to important examples partial differential equations from the sciences and engineering, and the third is on linear partial differential equations. Here are more detailed descriptions of the parts: 207A — Existence, uniqueness, and stability of solutions to ordinary differential equations, important examples, dynamical flows associated to solutions, periodic orbits and Poincaré maps, stable and unstable manifold phenomena, boundary value problems. 207B — This course studies various commonly used methods, including energy estimates, characteristics, similarity solutions, numerical methods, fundamental solutions and distributional solutions. It focuses on concrete examples of partial differential equations such as the transport equation, conservation laws, the heat equation, the porous media equation, the Navier – Stokes equation, the Laplace equation and the wave equation. 207C — This course treats the classical theory of linear partial differential equations, including the existence, uniqueness and regularity of solutions using the methods of functional analysis. Prerequisites: Math 146AB and 151A for the first course; Math 10AB, Math 150AB, and Math 207AB for the second; Math 207AB and 209AB for the third. Texts: 207A — F. Brauer and J. A. Nohel, Qualitative Theory of Ordinary Differential Equations. 207BC — L. C. Evans, Partial Differential Equations (2nd Ed.).

Etcetera. The 200-level courses are graduate courses.

Comment Source:By the way, here's what a committee of people in the UCR math department came up with: > Report of the Applied Mathematics Committee > October 29, 2010 > The two charges to the committee were to come up with new courses in applied mathematics, mainly at the graduate level, and to make some tentative suggestions for replacing the Mathematics Department’s current, moribund applied mathematics program in the University Catalog with one which will foster growth in that area. > **Recommendations for new courses**. The current recommendations are for one new course in mathematical modeling at the upper undergraduate level, one new course on more advanced topics in linear algebra at the beginning graduate level, and a sequence of three new courses on differential equations for applications at the beginning graduate level. In some cases, adoption of these courses might generate rearrangements of material in some of the Department’s eleven core graduate courses, most notably in the 209 sequence. Other adjustments will probably be necessary for the Department’s current 211 and 212 courses and sequences. Several elements of formal course proposals are given below; the goal is to have these approved at all levels in time for adoption in the 2011 – 2012 academic year. > In addition to these suggestions, the Committee strongly recommends that steps be taken to develop and adopt a pair of additional courses at the beginning graduate level on numerical solutions of differential equations, one for ordinary differential equations and another for partial differential equations. The main reason for not submitting specific proposals is that the Department currently does not have personnel with sufficiently deep backgrounds in these areas, and the committee views the hiring of such faculty in the immediate future as a critically high priority. In particular, there was considerable sentiment that the establishment of new degree programs in applied mathematics may have to wait until the Department has faculty members in these areas. > Here are the specific course recommendations. Each course should carry four credit hours, with three hours of lectures and the other hour for discussion or research as usual: > **MATH 168. Introduction to Mathematical Modeling**. Detailed studies of how mathematical methods are applied to specific, important problems in the sciences and engineering, with examples taken from the theories of mechanical vibrations, population dynamics and flow phenomena. — Prerequisites: 146AB and either 150A or 151A. > **MATH 202. Numerical Linear Algebra**. Standard decompositions of matrices and their computational uses, conditioning data, stability of solutions, effective numerical methods for computing eigenvalues. — Prerequisites: 132 or equivalent. Text: Trefethen and Bau, _Numerical Linear Algebra_. Coverage: Most of the material from the first five units, with very light review coverage of topics from the prerequisite(s) and omission of later topics in these chapters as appropriate to fit the time constraints of the course. > **MATH 207ABC. Differential Equations for Applications**. The first course is on basic topics in ordinary differential equations which go beyond standard undergraduate material, the second is on the derivation of solutions to important examples partial differential equations from the sciences and engineering, and the third is on linear partial differential equations. Here are more detailed descriptions of the parts: **207A** — Existence, uniqueness, and stability of solutions to ordinary differential equations, important examples, dynamical flows associated to solutions, periodic orbits and Poincaré maps, stable and unstable manifold phenomena, boundary value problems. **207B** — This course studies various commonly used methods, including energy estimates, characteristics, similarity solutions, numerical methods, fundamental solutions and distributional solutions. It focuses on concrete examples of partial differential equations such as the transport equation, conservation laws, the heat equation, the porous media equation, the Navier – Stokes equation, the Laplace equation and the wave equation. **207C** — This course treats the classical theory of linear partial differential equations, including the existence, uniqueness and regularity of solutions using the methods of functional analysis. **Prerequisites:** Math 146AB and 151A for the first course; Math 10AB, Math 150AB, and Math 207AB for the second; Math 207AB and 209AB for the third. **Texts:** 207A — F. Brauer and J. A. Nohel, _Qualitative Theory of Ordinary Differential Equations_. 207BC — L. C. Evans, _Partial Differential Equations_ (2nd Ed.). Etcetera. The 200-level courses are graduate courses.
• Options
3.
edited November 2010

If I were able to influence the hiring of applied mathematicians at UCR, I would push for people working on climate change or energy issues.

A necessary step to aquire influence is to learn to speak the language of the people one would like to influence :-)

Of course applied mathematicians should be involved in projects outside of academia to get experience in handling "real world problems and projects". That makes a huge difference - and could be a advantage of people working on climate change etc. instead of simply working on numerical algorithms "on their own in the ivory tower" :-) So that's an important aspect that supports your POV.

Numerical Linear Algebra

This is a must have and is usually part of the second year in Germany, of a mandatory course "Numerical Mathematics I". Well, it's not really mandatory in the strict sense, but almost all people attend it. If you can't solve linear equations, you can't solve differential equations, because most numerical approximations approximate using linear equations :-)

BTW: A simple test question to find out if a pure mathematician knows anything about numerics is "how do you find out if a given real matrix is singular?" If she says "compute the determinant" she is unmasked :-)

Differential Equations for Applications

That is useful background knowledge for applications, but from the description I'd say that is pure mathematics, in the sense that "real world applications" always use numerical solvers, and the stuff mentioned here will help you sometimes to understand the limits of numerical solvers, and of course the equations they try to solve. Concerning practical problems it is almost always impossible to gain any insight by a stability analysis, or by trying to figure out the qualitative behaviour of a system of ODE to check the numerical solution. But it is useful to know this stuff.

Introduction to Mathematical Modeling.

I'm not sure if you can teach anything of this stuff without the other two as prerequisites. But now we finally get somewhere where wavelets come in again: See e.g. Karsten Urban: "Wavelets in Numerical Simulation" to learn about numerical approximations to incompressible Navier-Stokes equations and Maxwell's equations!

Where is probability theory and statistics?

Comment Source:<blockquote> <p> If I were able to influence the hiring of applied mathematicians at UCR, I would push for people working on climate change or energy issues. </p> </blockquote> A necessary step to aquire influence is to learn to speak the language of the people one would like to influence :-) Of course applied mathematicians should be involved in projects outside of academia to get experience in handling "real world problems and projects". That makes a huge difference - and could be a advantage of people working on climate change etc. instead of simply working on numerical algorithms "on their own in the ivory tower" :-) So that's an important aspect that supports your POV. <blockquote> <p> Numerical Linear Algebra </p> </blockquote> This is a must have and is usually part of the second year in Germany, of a mandatory course "Numerical Mathematics I". Well, it's not really mandatory in the strict sense, but almost all people attend it. If you can't solve linear equations, you can't solve differential equations, because most numerical approximations approximate using linear equations :-) BTW: A simple test question to find out if a pure mathematician knows anything about numerics is "how do you find out if a given real matrix is singular?" If she says "compute the determinant" she is unmasked :-) <blockquote> <p> Differential Equations for Applications </p> </blockquote> That is useful background knowledge for applications, but from the description I'd say that is pure mathematics, in the sense that "real world applications" always use numerical solvers, and the stuff mentioned here will help you sometimes to understand the limits of numerical solvers, and of course the equations they try to solve. Concerning practical problems it is almost always impossible to gain any insight by a stability analysis, or by trying to figure out the qualitative behaviour of a system of ODE to check the numerical solution. But it is useful to know this stuff. <blockquote> <p> Introduction to Mathematical Modeling. </p> </blockquote> I'm not sure if you can teach anything of this stuff without the other two as prerequisites. But now we finally get somewhere where wavelets come in again: See e.g. Karsten Urban: "Wavelets in Numerical Simulation" to learn about numerical approximations to incompressible Navier-Stokes equations and Maxwell's equations! Where is probability theory and statistics?
• Options
4.

After a quick look at the catalog, pages 332ff, I'd say I miss a graduate course on stochastic processes, stochastic calculus with applications to time series, signal analysis, system theory and mathematical finance - and maybe statistical mechanics (connection of diffusion processes and diffusion differential equations, Fokker-Planck and Langevin equations, Feynman-Kac formula etc).

Just a suggestion :-)

Comment Source:After a quick look at the <a href="http://catalog.ucr.edu/catalog.html">catalog</a>, pages 332ff, I'd say I miss a graduate course on stochastic processes, stochastic calculus with applications to time series, signal analysis, system theory and mathematical finance - and maybe statistical mechanics (connection of diffusion processes and diffusion differential equations, Fokker-Planck and Langevin equations, Feynman-Kac formula etc). Just a suggestion :-)
• Options
5.

The paper Bayesian prediction of the next glacial inception has a nice multi resolution wavelet analysis picture. I've been looking for code to reproduce it, and a nice exposition of the mathematical background. I found a very nice treatment in Mallat's book, 3rd edition, but the code I found was rather disappointing: Bad documentation, no clear interfaces etc.

I like the implementation in the GSL the most, but if anyone has a tip where I could look, I'd be grateful.

Maybe there is a nice mathlab package that runs with no problems under octave?

Comment Source:The paper [[Bayesian prediction of the next glacial inception]] has a nice multi resolution wavelet analysis picture. I've been looking for code to reproduce it, and a nice exposition of the mathematical background. I found a very nice treatment in Mallat's book, 3rd edition, but the code I found was rather disappointing: Bad documentation, no clear interfaces etc. I like the implementation in the <a href="http://www.gnu.org/software/gsl">GSL</a> the most, but if anyone has a tip where I could look, I'd be grateful. Maybe there is a nice mathlab package that runs with no problems under octave?
• Options
6.

I'm going to guess that the wavelet transform figure in that paper was generated in R, given the style of graphics and what I know of the authors. I'm going to further guess that they just used some canned R package to do this. Look in the CRAN library. I'm going to guess that they used the dlpR package, based on the Torrence & Compo paper they cite. (But the wavelet.plot function output doesn't look like their figure ... either they massaged it or used something else.) Other package possibilities include RWave, wavelets, wmtsa. I haven't checked to see whether they implement the cited algorithm.

Comment Source:I'm going to guess that the wavelet transform figure in that paper was generated in R, given the style of graphics and what I know of the authors. I'm going to further guess that they just used some canned R package to do this. Look in the [CRAN](http://cran.r-project.org/web/packages/) library. I'm going to guess that they used the [dlpR](http://cran.r-project.org/web/packages/dplR/index.html) package, based on the [Torrence & Compo paper](http://shadow.eas.gatech.edu/~kcobb/seminar/torrence&compo98.pdf) they cite. (But the wavelet.plot function output doesn't look like their figure ... either they massaged it or used something else.) Other package possibilities include RWave, wavelets, wmtsa. I haven't checked to see whether they implement the cited algorithm.
• Options
7.
edited December 2010

Ok, I looked at wavetresh only (of all the R-wavelet-packages), and this did not seem to implement the algorithm, not to produce the graphic and the code was not documented or well structured either.

:-(

I'll look at dlpR next. I've two goals: To reproduce the graphic, where a canned package would suffice, and to have a simple and well documented implementation of - well - right now simply the pyramid algorithm with several standard wavelets, including the Daubechies wavelets.

I think I'll have to program the latter myself...

Comment Source:Ok, I looked at wavetresh only (of all the R-wavelet-packages), and this did not seem to implement the algorithm, not to produce the graphic and the code was not documented or well structured either. :-( I'll look at dlpR next. I've two goals: To reproduce the graphic, where a canned package would suffice, and to have a simple and well documented implementation of - well - right now simply the pyramid algorithm with several standard wavelets, including the Daubechies wavelets. I think I'll have to program the latter myself...
• Options
8.
edited December 2010

I tried a quick-and-dirty replication of their figure using the dlpR package, but didn't succeed. I couldn't determine how to specify the nondimensional frequency $\omega_0$, and I didn't understand their remarks about normalization. I uploaded the figure I produced and the R code: figure and code

Comment Source:I tried a quick-and-dirty replication of their figure using the dlpR package, but didn't succeed. I couldn't determine how to specify the nondimensional frequency $\omega_0$, and I didn't understand their remarks about normalization. I uploaded the figure I produced and the R code: [figure](http://www.princeton.edu/~nurban/dl/glacial_wavelet_spectrum.pdf) and [code](http://www.princeton.edu/~nurban/dl/glacial_cycle_lr04_wavelet_spectrum.R)
• Options
9.

Nathan,

I downloaded your code, and have got closer to replicating the figure in C+R. The times are unevenly spaced in the data, and that is messing up the image. I don't know if morlet() is supposed to cope with unequal spacing or not. Its still not quite the same: the C+R figure boosts the shorter time periods, presumably their normalisation.

library(dplR)

par(mfrow=c(2,1), mar=c(4.5,4.5,3,1))

idxs.3My <- (lr04$Time < 3000) orig.d18O <- rev(lr04$d18O[idxs.3My])
orig.times <- -rev(lr04$Time[idxs.3My]) times <- -2999:0 d18O <- rep(0,3000) for (i in 1:length(times)) { d18O[i] <- orig.d18O[ which.min(abs(orig.times - times[i])) ] } plot(times, d18O, type="l", xlim=c(-3000,0), ylim=c(5.0,2.5), frame=FALSE, xlab="Time (kyr)", ylab=expression(paste(delta^18 * O[c])), main="Benthic foraminifera stack (LR04)", xaxt="n", yaxt="n") axis(1, pos=5) axis(2, pos=-3000) wavelet.transform = morlet(y1=d18O, x1=times, dj=0.05) wave = wavelet.transform$wave
for(i in 1:length(wavelet.transform$x)) for(j in 1:length(wavelet.transform$period))
if(wavelet.transform$period[j] > wavelet.transform$coi[i])
wave[i,j] = 0

tidx = wavelet.transform$x > -3001 pidx = wavelet.transform$period > 10 & wavelet.transform$period < 201 image(wavelet.transform$x[tidx], log(wavelet.transform$period[pidx],base=10), abs(wave[tidx,pidx]), col=rev(gray(0:255/255)), frame=FALSE, xlab="Time (kyr)", ylab="Period (kyr)", main="Continuous Morlet wavelet transform (amplitude)", yaxt="n") axis(2, at=log(c(seq(10,100,by=10),200),10), labels=NA) axis(2, at=log(c(10,40,100),10), labels=c("10","40","100")) abline(h=log(40,10), lty="dashed")  Comment Source:Nathan, I downloaded your code, and have got closer to replicating the figure in C+R. The times are unevenly spaced in the data, and that is messing up the image. I don't know if morlet() is supposed to cope with unequal spacing or not. Its still not quite the same: the C+R figure boosts the shorter time periods, presumably their normalisation. ~~~~ library(dplR) lr04 = read.table(url("http://www.lorraine-lisiecki.com/LR04stack.txt"), skip=5, col.names=c("Time","d18O","d18O.err")) par(mfrow=c(2,1), mar=c(4.5,4.5,3,1)) idxs.3My <- (lr04$Time < 3000) orig.d18O <- rev(lr04$d18O[idxs.3My]) orig.times <- -rev(lr04$Time[idxs.3My]) times <- -2999:0 d18O <- rep(0,3000) for (i in 1:length(times)) { d18O[i] <- orig.d18O[ which.min(abs(orig.times - times[i])) ] } plot(times, d18O, type="l", xlim=c(-3000,0), ylim=c(5.0,2.5), frame=FALSE, xlab="Time (kyr)", ylab=expression(paste(delta^18 * O[c])), main="Benthic foraminifera stack (LR04)", xaxt="n", yaxt="n") axis(1, pos=5) axis(2, pos=-3000) wavelet.transform = morlet(y1=d18O, x1=times, dj=0.05) wave = wavelet.transform$wave for(i in 1:length(wavelet.transform$x)) for(j in 1:length(wavelet.transform$period)) if(wavelet.transform$period[j] > wavelet.transform$coi[i]) wave[i,j] = 0 tidx = wavelet.transform$x > -3001 pidx = wavelet.transform$period > 10 & wavelet.transform$period < 201 image(wavelet.transform$x[tidx], log(wavelet.transform$period[pidx],base=10), abs(wave[tidx,pidx]), col=rev(gray(0:255/255)), frame=FALSE, xlab="Time (kyr)", ylab="Period (kyr)", main="Continuous Morlet wavelet transform (amplitude)", yaxt="n") axis(2, at=log(c(seq(10,100,by=10),200),10), labels=NA) axis(2, at=log(c(10,40,100),10), labels=c("10","40","100")) abline(h=log(40,10), lty="dashed") ~~~~
• Options
10.
edited December 2010

I looked at the figure Nathan uploaded, and right now the "continuous Morlet wavelet transform" looks like a dashed horizontal line to me!

Comment Source:I looked at [the figure Nathan uploaded](http://www.princeton.edu/~nurban/dl/glacial_wavelet_spectrum.pdf), and right now the "continuous Morlet wavelet transform" looks like a dashed horizontal line to me!
• Options
11.

That's weird! when I first looked at Nathan's figure a few days ago, I just saw the dashed line. When I checked yesterday, there was a grey level image behind the line. Now you say its gone again. Nathan can make magic mutating PDFs!

Comment Source:That's weird! when I first looked at Nathan's figure a few days ago, I just saw the dashed line. When I checked yesterday, there was a grey level image behind the line. Now you say its gone again. Nathan can make magic mutating PDFs!
• Options
12.

I haven't touched the PDF file since I first uploaded it. It looks fine to me! Maybe you should open it and wait a bit? Perhaps it's taking a while to render the underlying grayscale image.

Comment Source:I haven't touched the PDF file since I first uploaded it. It looks fine to me! Maybe you should open it and wait a bit? Perhaps it's taking a while to render the underlying grayscale image.
• Options
13.

It took about a minute for the dashed line to appear. I'll reopen the file and let it sit for an hour...

Comment Source:It took about a minute for the dashed line to appear. I'll reopen the file and let it sit for an hour...
• Options
14.
edited December 2010

I just looked, and the image appeared immediately in Google Chrome. But not with IE. Though if I change the scale, sometimes little vertical slivers appear.

Comment Source:I just looked, and the image appeared immediately in Google Chrome. But not with IE. Though if I change the scale, sometimes little vertical slivers appear.
• Options
15.

Interesting. It looks fine when load it with the Mac Preview application, or the PDF Browser plugin. But if I load it with Adobe Acrobat Pro, I get John's problem: pause before the dashed line shows up (though only a few seconds), and nothing behind it. If I zoom, I get Graham's problem: thin vertical slivers.

Either R isn't writing the PDFs properly to be read with non-Apple software, or Acrobat isn't reading them properly. That's troubling! If it's working in Chrome (which has its own PDF renderer, IIRC), then maybe the problem actually is with Acrobat.

Comment Source:Interesting. It looks fine when load it with the Mac Preview application, or the PDF Browser plugin. But if I load it with Adobe Acrobat Pro, I get John's problem: pause before the dashed line shows up (though only a few seconds), and nothing behind it. If I zoom, I get Graham's problem: thin vertical slivers. Either R isn't writing the PDFs properly to be read with non-Apple software, or Acrobat isn't reading them properly. That's troubling! If it's working in Chrome (which has its own PDF renderer, IIRC), then maybe the problem actually is with Acrobat.