- #1
Hypochondriac
- 35
- 0
Im writing a program in python to simulate the propagation of a gaussian beam through a thick lens and to the focussing point using Fourier optics.
Due to the strength of the focussing I need a lot of data points so that I have a decent resolution at the focus. To speed things up and to reduce the number of data points I need, I rescaled my axis so that instead of the points being linear in space, (i.e. each data point is the same delta x from the next) I scaled it so that it was more cubic than linear. This gives me many more points in the centre of my axis (where I need them) and a lot less for the outer regions where not a lot is happening.
Thats the best I can explain it sorry.
However the fft function in scipy.fft (I assume) requires a linear distribution of points.
Because when I start multiplying my E-field and angular distribution by phase factors to focus it, the results are not what I expect. (If it doesn't require linear spacing, how can I put tell it my real space values as well as the E-field values at them points?)
Either I'm wrong and my code is wrong, or it cannot be done because I've been ripping my code to pieces for days now trying to solve this.
So, can I do a FFT with a non-linear scaling? and should I persevere with my code to make it work?
Or should I give up and try another method of increasing the precision in the centre?
Due to the strength of the focussing I need a lot of data points so that I have a decent resolution at the focus. To speed things up and to reduce the number of data points I need, I rescaled my axis so that instead of the points being linear in space, (i.e. each data point is the same delta x from the next) I scaled it so that it was more cubic than linear. This gives me many more points in the centre of my axis (where I need them) and a lot less for the outer regions where not a lot is happening.
Thats the best I can explain it sorry.
However the fft function in scipy.fft (I assume) requires a linear distribution of points.
Because when I start multiplying my E-field and angular distribution by phase factors to focus it, the results are not what I expect. (If it doesn't require linear spacing, how can I put tell it my real space values as well as the E-field values at them points?)
Either I'm wrong and my code is wrong, or it cannot be done because I've been ripping my code to pieces for days now trying to solve this.
So, can I do a FFT with a non-linear scaling? and should I persevere with my code to make it work?
Or should I give up and try another method of increasing the precision in the centre?