Discussion:
[Gwyddion-users] rPSDF
Maria Joao Almeida
2017-01-31 09:42:16 UTC
Permalink
Dear all,

I am trying to get a characteristic length of a film surface by analysing
the PSDF. By comparing the values obtained from the PSDF and the radial
PSDF there seems to be a difference by a factor of 2, which I find a bit
confusing as I would expect them to be kind of consistent (in the sense
that K=Kx*cos(phi)).
If you could give a bit more detail on the exact discrete calculations of
the rPSDF would be great, at least to understand if using the rPSDF really
is appropriate i my case, provided that the change in coordinates is
somehow consistent.

Thanks in advance for the help!

Regards,
Maria
David Nečas (Yeti)
2017-01-31 10:52:02 UTC
Permalink
Post by Maria Joao Almeida
I am trying to get a characteristic length of a film surface by analysing
the PSDF. By comparing the values obtained from the PSDF and the radial
PSDF there seems to be a difference by a factor of 2, which I find a bit
confusing as I would expect them to be kind of consistent (in the sense
that K=Kx*cos(phi)).
If you could give a bit more detail on the exact discrete calculations of
the rPSDF would be great, at least to understand if using the rPSDF really
is appropriate i my case, provided that the change in coordinates is
somehow consistent.
The coordinates are consistent, in both cases it is spatial frequency K
(angular, i.e. including the 2π – like ω=2πf for temporal frequencies).

But forget about discretisation. Gwyddion calculates spectral densities
that specifically do not depend on sampling. If you have the same
real-space surface and sample it differently, by changing the scanned
area, pixel size, ..., Gwyddion will calculate exactly the same PSDF
from the different images (or, more precisely, estimates of the same
PSDF, because obviously the data change so there will be some variation).

All PSDFs are actual densities; if you integrate them you always get σ².
So for one-dimensional PSDF:

∫ W₁(Kx) dKx = σ²

radial PSDF:

∫ Wr(K) dK = σ²

two-dimensional PSDF[*]:

∫ W(Kx,Ky) dKx dKy = σ²

Hence W₁(Kx) and Wr(K) are just different projections of W(Kx,Ky):

W₁(Kx) = ∫ W(Kx,Ky) dKy
Wr(K) = K ∫ W(Kx,Ky) dφ

where φ is the polar angle φ = atan₂(Ky,Kx) and K = √(Kx²+Ky²).

Note that the factor K originating from the Jacobian is already included
in Wr(K). You may want to use Wr(K)/K instead of Wr(K) if it makes more
sense in your case, i.e. if you want angularly averaged W(Kx,Ky), not a
density that integrates to σ². You need to insert a ‘weight’ K to the
integral to get σ² then.

Also note that Gwyddion plots only a half of W₁(Kx) because it is
symmetric – but the integral above is for the complete function. If you
integrate just the curve you see plotted you will get σ²/2.

Hope it helps,

Yeti


[*] The output of the 2D FFT module does not follow this convention,
mostly for historical reasons.
Maria Joao Almeida
2017-01-31 13:28:43 UTC
Permalink
Hi Yeti,

thanks for the quick response and the further hints! Just to make sure that
I am not making a mistake: if my sample has an isotropic surface, Kx and Ky
corresponding to the maximum of the PSDF (horizontal and vertical,
respectivelly I guess) are necessarily broadly the same, and in that sense
shouldn't the respective K on the radial PSDF be the same as Kx and Ky?

Regards,
Maria
Post by Maria Joao Almeida
Post by Maria Joao Almeida
I am trying to get a characteristic length of a film surface by analysing
the PSDF. By comparing the values obtained from the PSDF and the radial
PSDF there seems to be a difference by a factor of 2, which I find a bit
confusing as I would expect them to be kind of consistent (in the sense
that K=Kx*cos(phi)).
If you could give a bit more detail on the exact discrete calculations of
the rPSDF would be great, at least to understand if using the rPSDF
really
Post by Maria Joao Almeida
is appropriate i my case, provided that the change in coordinates is
somehow consistent.
The coordinates are consistent, in both cases it is spatial frequency K
(angular, i.e. including the 2π – like ω=2πf for temporal frequencies).
But forget about discretisation. Gwyddion calculates spectral densities
that specifically do not depend on sampling. If you have the same
real-space surface and sample it differently, by changing the scanned
area, pixel size, ..., Gwyddion will calculate exactly the same PSDF
from the different images (or, more precisely, estimates of the same
PSDF, because obviously the data change so there will be some variation).
All PSDFs are actual densities; if you integrate them you always get σ².
∫ W₁(Kx) dKx = σ²
∫ Wr(K) dK = σ²
∫ W(Kx,Ky) dKx dKy = σ²
W₁(Kx) = ∫ W(Kx,Ky) dKy
Wr(K) = K ∫ W(Kx,Ky) dφ
where φ is the polar angle φ = atan₂(Ky,Kx) and K = √(Kx²+Ky²).
Note that the factor K originating from the Jacobian is already included
in Wr(K). You may want to use Wr(K)/K instead of Wr(K) if it makes more
sense in your case, i.e. if you want angularly averaged W(Kx,Ky), not a
density that integrates to σ². You need to insert a ‘weight’ K to the
integral to get σ² then.
Also note that Gwyddion plots only a half of W₁(Kx) because it is
symmetric – but the integral above is for the complete function. If you
integrate just the curve you see plotted you will get σ²/2.
Hope it helps,
Yeti
[*] The output of the 2D FFT module does not follow this convention,
mostly for historical reasons.
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gwyddion-users mailing list
https://lists.sourceforge.net/lists/listinfo/gwyddion-users
David Nečas (Yeti)
2017-01-31 14:03:59 UTC
Permalink
Just to make sure that I am not making a mistake: if my sample has an
isotropic surface, Kx and Ky corresponding to the maximum of the PSDF
(horizontal and vertical, respectivelly I guess) are necessarily
broadly the same, and in that sense shouldn't the respective K on the
radial PSDF be the same as Kx and Ky?
Well, no. Or not necessarily. You have to keep in mind that all the
one-dimensional functions are some kinds of projection.

For instance consider the 2D PSDF shown in psdf2d.png (you can use
Spectral synthesis to create an image with such PSDF).

For this you get W₁(Kx) and Wr(K) as in psdf-rpsdf.png. Wr(K) is
obviously close to a ÎŽ-function because the 2D PSDF is a thin ring. But
W₁(Kx) is a broad function because it is the distribution of Kx. And the
x-projections of the spatial frequencies contained in the image range
from zero to the maximum frequency. The maximum frequency (outer ring
diameter) is of course clearly visible on both curves.

Regards,

Yeti

Loading...