Hi All,

I guess last time I posted this question the image file did not attach 
correctly. I apologize for re-posting so late. I have not see a response, so I 
am re-posting the question.  I am working on reproducing the waviness 
calculated in the ISO function of Gwyddion. I am looking to calculate the 
wavelength parameters for the entire surface via matlab. However, I am hitting 
a wall correctly reproducing the waviness calculated in Gwyddion. I have spent 
several
days looking at the source code and am still missing something. Anyone have any 
luck doing this? I am wondering if perhaps Matlab and C++ have different 
libraries for calculating the FFT? The texture line is 512 elements long so 
their shouldn't be any interpolation.

The bulk of the source code related to the waviness calculation is in the 
roughness.c file (modules/tools/roughness.c) and runs from approximately lines 
1449 - 1576, however there are a few functions called from other files. I don't 
know how much detail to get into here, but some help would be great. Of course 
I will share the matlab code to calculate the wavelength features for the 
entire surface with the list once this problem is solved.

Below is a comparison of the waviness calculated from Matlab and Gwyddion for a 
texture line with cutoff 0.004. The cut-off value was set so only the FFT of 
the first and second frequencies are not set to zero. The first frequency 
corresponds to the mean and therefore after inverting the fft back, only the 
second frequency should result in the waviness. What is interesting is that 
Gwyddion is showing a smaller frequency than matlab, but I don't understand how 
this is possible. Any suggestions? Maybe the x trace used to calculate the fft 
for the texture line is different internally than what can be exported through 
the gwyddion gui?

--
Casey LaMarche
Postdoctoral Researcher
Hrenya and Weimer Research Groups
UCB 596
D1B28/D1B50

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to