sampling 2-dimensional surface: how many sample points along X & Y axes?

143 views Asked by At

I have a set of first 25 Zernike polynomials. Below are shown few in Cartesin co-ordinate system.

z2 = 2*x

z3 = 2*y

z4 = sqrt(3)*(2*x^2+2*y^2-1)

:

:

z24 = sqrt(14)*(15*(x^2+y^2)^2-20*(x^2+y^2)+6)*(x^2-y^2)

I am not using 1st since it is piston; so I have these 24 two-dim ANALYTICAL functions expressed in X-Y Cartesian co-ordinate system. All are defined over unit circle, as they are orthogonal over unit circle. The problem which I am describing here is relevant to other 2D surfaces also apart from Zernike Polynomials.

Suppose that origin (0,0) of the XY co-ordinate system and the centre of the unit circle are same.

Next, I take linear combination of these 24 polynomials to build a 2D wavefront shape. I use 24 random input coefficients in this combination.

w(x,y) = sum_over_i   a_i*z_i         (i=2,3,4,....24)

a_i = random coefficients
z_i = zernike polynomials

Upto this point, everything is analytical part which can be done on paper.

Now comes the discretization!

I know that when you want to re-construct a signal (1Dim/2Dim), your sampling frequency should be at least twice the maximum frequency present in the signal (Nyquist-Shanon principle).

Here signal is w(x,y) as mentioned above which is nothing but a simple 2Dim function of x & y. I want to represent it on computer now. Obviously I can not take all infinite points from -1 to +1 along x axis and same for y axis. I have to take finite no. of data points (which are called sample points or just samples) on this analytical 2Dim surface w(x,y)

I am measuring x & y in metres, and -1 <= x <= +1; -1 <= y <= +1.

e.g. If I divide my x-axis from -1 to 1, in 50 sample points then dx = 2/50= 0.04 metre. Same for y axis. Now my sampling frequency is 1/dx i.e. 25 samples per metre. Same for y axis.

But I took 50 samples arbitrarily; I could have taken 10 samples or 1000 samples. That is the crux of the matter here: how many samples points?How will I determine this number?

There is one theorem (Nyquist-Shanon theorem) mentioned above which says that if I want to re-construct w(x,y) faithfully, I must sample it on both axes so that my sampling frequency (i.e. no. of samples per metre) is at least twice the maximum frequency present in the w(x,y). This is nothing but finding power spectrum of w(x,y). Idea is that any function in space domain can be represented in spatial-frequency domain also, which is nothing but taking Fourier transform of the function! This tells us how many (spatial) frequencies are present in your function w(x,y) and what is the maximum frequency out of these many frequencies.

Now my question is first how to find out this maximum sampling frequency in my case. I can not use MATLAB fft2() or any other tool since it means already I have samples taken across the wavefront!! Obviously remaining option is find it analytically ! But that is time consuming and difficult since I have 24 polynomials & I will have to use then continuous Fourier transform i.e. I will have to go for pen and paper.

Any help will be appreciated.

Thanks

1

There are 1 answers

0
Alexander McFarlane On BEST ANSWER

Key Assumptions

  • You want to use the "Nyquist-Shanon" theorem to determine sampling frequency

Obviously remaining option is find it analytically ! But that is time consuming and difficult since I have 21 polynomials & I have to use continuous Fourier transform i.e. done by analytically.

Given the assumption I have made (and noting that consideration of other mathematical techniques is out of scope for StackOverflow), you have no option but to calculate the continuous Fourier Transform.

However, I believe you haven't considered all the options for calculating the transform other than a laborious paper exercise e.g.

  • Numerical approximation of the continuous F.T. using code
  • Symbolic Integration e.g. Wolfram Alpha

Surely a numerical approximation of the Fourier Transform will be adequate for your solution?

I am assuming this is for coursework or research rather, so all you really care about as a physicist is a solution that is the quickest solution that is accurate within the scope of your problem.

So to conclude, IMHO, don't waste time searching for a more mathematically elegant solution or trick and just solve the problem with one of the above methods