Recently, I gave a mini-lecture on wavelet analysis for my colleagues. This is a 30-min compact lecture for introduction and the application.

Enjoy! and feel free to leave comments if you have questions.

an adventure in Nuclear Physics!

May 18, 2017

Recently, I gave a mini-lecture on wavelet analysis for my colleagues. This is a 30-min compact lecture for introduction and the application.

Enjoy! and feel free to leave comments if you have questions.

April 29, 2017

Basic Daubechies, MRA, Wavelet Leave a comment

Many wavelet does not have functional form, but defined by the MRA coefficient.

The visualization of wavelet can be done by using wavelet construction.

For scaling function, we can define and .

Similarly, the wavelet can be started with and .

Then build by iteration,

From last post on the scaling coefficient, i calculated and plot the wavelet for .

we can see the wavelet becomes the Haar wavelet as the free parameter goes to 1. In fact, it becomes a shifted Haar wavelet when the free parameter goes to 0, as we can imagine.

When the free parameter is 0.683013, it is the Daubechies-2 wavelet. Notes that some people will absorbed a factor $latex 1/ \sqrt{2} $ into the coefficient, so that their free parameter is .

April 28, 2017

Basic MRA, scaling coefficient, Wavelet Leave a comment

A multi-resolution analysis is defined by scaling function and the corresponding wavelet. From the scaling relations

the scaling function and wavelet can be defined from the scaling coefficient

The coefficients are constrained due to the properties of wavelet and scaling function.

These properties lead to

The 3rd and 4th constrains requires the numbers of non-zero element in are even.

One of the solution is setting

so that we don’t need to worry and the 4th constrain becomes the 3rd constrain, and the 5th constrain is always satisfied. Now, only the 1st, 2nd, and 3rd constrains are needed. This is equivalent to equations with number of non-zero elements in is .

Degree of Freedom | ||
---|---|---|

2 | 2 | 0 |

4 | 3 | 1 |

6 | 4 | 2 |

8 | 5 | 3 |

For size of 4, the solution is

In fact, the coefficient for can be grouped as even and odd, so that

and the constrain 3rd can lead to,

,

which is automatically fulfill.

April 14, 2017

experimental analyzing power, asymmetry, Cross section, elastic scattering, NMR, polarization, spin-orbital, spin-spin Leave a comment

The magnitude of proton polarization can be measured by NMR technique with a reference. Because the NMR gives the free-induction decay signal, which is a voltage or current. For Boltzmann polarization using strong magnetic field and low temperature, the polarization can be calculated. However, when a reference point is not available, the **absolute** magnitude of proton polarization can be measured using proton-proton elastic scattering. The principle is the nuclear spin-orbital coupling. That creates left-right asymmetry on the scattering cross section.

Because of spin-orbital interaction:

where is the distance function, is the relative angular momentum, is the spin of the incident proton. In the following picture, the spin of the incident proton can be either out of the plane ( ) or into the plan (). When the proton coming above, the angular momentum is into the plane (). The 4 possible sign of the spin-orbital interaction is shown. We can see, when the spin is up, the spin-orbital force repulses the proton above and attracts the proton below. That creates an asymmetry in the scattering cross section.

The cross section is distorted and characterized using analysing power . Analyzing power is proportional to the difference between left-right cross-section. By symmetry (parity, time-reversal) consideration, (why?), in center of mass frame. In past post, the transformation between difference Lorentz frame. The angle in the has to be expressed in lab angle. The cross section and can be obtained from http://gwdac.phys.gwu.edu/ .

In scattering experiment, the number of proton (yield) is counted in left and right detectors. The yield should be difference when either proton is polarized. The yield is

where is the luminosity, is the detector efficiency, is the integrated cross-section of un-polarized beam and target of the detector, is the polarization of either the target or beam. When both target and the beam are polarized, the cross section is

where is spin-spin correlation due to spin-spin interaction of nuclear force.

Using the left-right yield difference, the absolute polarization of the target or the beam can be found using,

where and .

April 13, 2017

Basic denoising, FDWT, FFT, fourier transform, threshold, tran, Wavelet Leave a comment

In usual Fourier transform (FT), the filter is cut-off certain frequency.

This trick is also suitable for wavelet transform (WT). However, there could be some “features” located in high frequency scale (or octave) , a simply cut-off would remove these features.

If the signal to noise level is large, that means the noise has smaller amplitude than that the signal, we can use hard or soft thresholding, which zero any coefficient, which is after the FT or WT, less then a threshold.

Lets be the coefficient. The hard thresholding is

The soft thresholding is

A popular function

or

April 5, 2017

computer f77, ubuntu Leave a comment

Fortran-77 is a very old code, who lives in 32-bit computer.

In Ubuntu-16, the compiler g++, gcc, or gfortran are “basically the same” (as far as I understand, correct me if I am wrong.) that they only support fortran-95.

In order to compile Fortran-77 code, I tried many way, but the only way is install g77 from external source, and add -m32 for the compiling flag.

The g77 compiler can be downloaded in here (I download from the web, If I violated some copy right, please let me know):

https://drive.google.com/file/d/0BycN9tiDv9kmR1dhUjZKS0tzTk0/view?usp=sharing

or, people can search in google by

` g77_x64_debian_and_ubuntu.tar.gz`

people need to extract, change the mod of install.sh to be executable.

tar -xzvf g77_x64_debian_and_ubuntu.tar.gz cd g77_x64_debian_and_ubuntu chmod +x ./install.sh ./install.sh

Hope it help. :)

March 24, 2017

computer, Math, theory DWT, FDWT, Qt, transform, Wavelet Leave a comment

There are many kind of wavelet transform, and I think the names are quite confusing.

For instance, there are continuous and discrete wavelet transforms, in which, the “continuous” and “discrete” are for the wavelet parameters, not for the “data” itself. Therefore, for discrete data, there are “continuous” and “discrete” wavelet transforms, and for function, there are also “continuous” and “discrete” wavelet transforms.

In here, we will focus on discrete wavelet transform for function first. This discrete wavelet transform is also called as wavelet series, which express a compact support function into series of wavelet.

For simplicity, we also focus on orthonormal wavelet.

As the wavelet span the entire space, any compact function can be expressed as

where are integer.

Now, we move to discrete data discrete wavelet transform. The data is discrete, we can imagine only points are known with finite .

the integration becomes a finite sum.

Without loss of generality, we can set , and then the time axis becomes an integer number axis. We found that as the wavelet can only be expand, not shrink. Because there are finite number of data point, i.e. , .

However, this double summation for each is very time consuming. There is a Fast Discrete Wavelet Transform. Before we continuous, we must study the wavelet.

From the last post, we know that the scaling function that generate a MRA must be:

, where are integer. The set of shifted scaling function span a space . For the wavelet,

The set of shifted wavelet span a space , so that , so that

Since the wavelet is generated from the scaling function, we expect the coefficient of and are related. In fact, the relationship for orthonormal scaling function and wavelet is

For discrete data , it can be decomposed into the MRA space. We start by the largest space, where the wavelet is most shrunken.

to decompose to the and space. We can use the nested property of the MRA space, can be decomposed into and ,

where (given that and $\latex \psi(t)$ are orthonormal ),

Therefore, using the coefficient of and , the wavelet coefficient can be decomposed to

in graphic representation

This is a fast discrete wavelet transform.

Due to the nested space of MRA, we also expect that the coefficient and are related to . For orthonormal wavelet,

Since the is finite, the are all finite. That greatly reduce the computation cost of the discrete wavelet transform.

To reconstruct the discrete data , we don’t need to use

using the nested space of MRA, ,

in graphical representation,

I attached the wavelet transfrom class for **Qt**, feel free to modify.

https://drive.google.com/file/d/0BycN9tiDv9kmMVRfcVFMbDFWS0k/view?usp=sharing

https://drive.google.com/file/d/0BycN9tiDv9kmUmlmNk1kaVJCbEU/view?usp=sharing

in the code, the data did not transform to MRA space. The code treats the data already in the MRA space. Some people said this is a “crime”. But for the seek of “speed”, it is no need to map the original discrete data into MRA space. But i agree, for continuous function, we must map to MRA space.