On Thu, Feb 21, 2013 at 11:27:22AM -0800, Kiarash Zamani Aghaie wrote:
> I am quite new to Gwyddion. I have some questions about the way that
> Gwyddion calculates the 1-D PSD (roughness along the fast scan axis).
This is a FAQ. See
http://gwyddion.net/faq.php#faq015
> I want to understand exactly that how it works. I tried to dig in, and
> find the source code, but I could not find it.
https://sourceforge.net/p/gwyddion/code/HEAD/tree/trunk/gwyddion/libprocess/stats.c
and look for psdf. But following all the transforms is not trivial.
It is further complicated by the possible use of different FFT backends.
> I believe that the x axis in the PSD graph (spatial frequency Kx) that
> Gwyddion generates has the unit of rad/m and NOT 1/m.
This is correct. Radians are a sort of strange unitless unit and they
are treated as unitless. But yes the spatial frequency K is circular,
angular or whatever you call it.
> If we accept this, the unit of W1, which the PSD that I need, should
> be m^3 (I just used the integration definition in the manual to deduce
> this), as correctly shown on the PSD graph by Gwyddion. It would be
> great you can confirm this as well. I just want to make sure that it
> is not m^3/rad.
Since it is required that
∞
∫ W₁(k) dk = σ²
0
and k is angular then units of W₁ are [value units]²×[lateral units]/rad
if you insist on the radians. Note this holds also for any other k
coordinate (non-circular, whatever) because PSDF is a density and
transforms as a density:
W(a) da = W(b) db
Well, at least in Gwyddion.
> 2) According to the manual, W1 can be calculated using two different
> approaches. One is integrating the 2-D PSD. The other is using the FFT
> on scan lines. Can you tell me exactly which one is implemented in
> Gwyddion?
By scan lines. The difference is in windowing and levelling which is
one-dimensional in this case. Otherwise the projection-slice theorem
implies it does not matter.
> 3) When I inspected the generated PSD graph, I realized that the
> length of x vector (spatial frequencies Kx) is half of my window size,
> i.e., 512 and NOT 1024.
Of course. The upper half of discrete Fourier transform is reflected
lower half (with some phase, depeding also on even/odd data size)
because the measured surface is real. Considering the nature of data,
if you have N data points it makes much more sense to interpret
exp(2πi(N-k)j) as exp(-2πikj), i.e. as negative low-frequency component
than some insanely high frequency.
> 4) On the PSD options, there is an option called "Fixed res." Can you
> explain me that what this does? I realized that changing the number
> almost radically changes the calculated PSD.
It forces the resulting curve to have the given number of points (by
interpolating it if necessary). Not very useful for PSDF, but it can
simply be applied to all the distributions. Unless you enforce a very
odd number of points or your distributions are very odd they should look
more or less the same with any number of points.
Regards,
Yeti
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users