Oh thanks for the hint, Yeti.

I guess this fft_postprocess() can be applied without any modification. Could 
you add this function to the gwyddion API?
It might be useful for others as well. 


Cheers,

/M


On  0, "David Nečas (Yeti)" <[email protected]> wrote:
> On Fri, Sep 12, 2014 at 03:32:04PM +0200, Mathias Müller wrote:
> > in my C-code I want to apply the gwyddion fft-transformation to SPM data. 
> > 
> > the code sniplet is:
> > 
> > data_field_fft_r = gwy_data_field_new_alike(data_field, TRUE);
> > data_field_fft_i = gwy_data_field_new_alike(data_field, TRUE);
> > gwy_data_field_2dfft(data_field,NULL,data_field_fft_r,data_field_fft_i,GWY_WINDOWING_NONE,GWY_TRANSFORM_DIRECTION_FORWARD,GWY_INTERPOLATION_ROUND,TRUE,1)
> >  ;
> > gwy_data_field_2dfft_humanize(data_field_fft_r) ;
> > 
> > where data_field is obtained from real space data.
> > 
> > When displaying the artifical data, it looks pretty good, e.g. like a 
> > hexagonal structure. Comparing the coordinates within the differently 
> > obtained FFT images, it looks 
> > like all the x and y values are way larger in the c-code 2d-FFT (no window) 
> > then the one from the gwyddion module. I.e. the very center of the 
> > gwyddion-performed fft-image
> > is nearly at (0.002,0.004) nm^-1. But the data reasulting from 
> > gwy_data_field_2dfft_humanize(data_field_fft_r) show a center at approx. 
> > (3.43886e-08,5.05459e-08)...I guess m^-1. 
> 
> Functions such as gwy_data_field_2dfft() only perform the transforms.
> They do not set units nor real fiels dimensions.  This is somewhat
> unfortunate, but backward compatible.  See for instance
> fft_prosptocess() in the FFT module:
> 
>     
> https://sourceforge.net/p/gwyddion/code/HEAD/tree/trunk/gwyddion/modules/process/fft.c#l182
> 
> Regards,
> 
> Yeti

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to