I already use the function as it is meant to be used and the sample data is fine, since the gwyddion fft-module displays everything correctly. But when getting data points via:
gwy_selection_get_object(selection, ID, pos) the center of my fft output is non-zero even after applying gwy_data_field_fft_postprocess(data_field_fft_r,TRUE). However, the peak coordinates are fine when subtracting the fft center. This puzzles me. Somehow my (x,y) offsets are not corrected after having them postprocessed. I apply it right after gwy_data_field_2dfft as you do in prof_psdf. On 0, "David Nečas (Yeti)" <[email protected]> wrote: > On Mon, Sep 15, 2014 at 11:55:11AM +0200, Mathias Müller wrote: > > Ok, I got it work. I do not know why, but compiling against gwyddion > > stable [0] works fine but for the nightly > > snaptshot it doesn't. Moving to array position [1] works flawless with > > the desired image output. > > This looks like you are overwriting the stack somewhere. Running under > valgrind may not help in this case but still it is worth trying. > > > But this leads to problem #2. I am applying the > > gwy_data_field_fft_postprocess(data_field_fft_r,TRUE) ; to my > > fft data obtained via: > > > > 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) > > ; > > > > results in the same data display, but with way larger x and y values. > > > > (0,0) is something like [2,57677e+09,2,56559e+09] (1/m I guess) > > It should not be ‘I guess’. It should actually invert the xy unit of > the field. Does your field have correct lateral units to begin with? > > > and an example fft peak [1,7607e+09,2,57677e+09] which is in the > > gwyddion fft-module (-0.82/nm,0)... > > 1/nm = 10⁹ 1/m > > So you seem to be off but the overall magnitude is right. > > > However,correcting the coorcdinates > > with the zero position it fits quit well. But the corrected fft-output > > is not centered at (0,0). > > > > Shouldn't this be done by the fft_postprocess() ? > > Yes, it should. The simplest use is probably in > modules/process/fft_profile.c. See prof_psdf(). If it didn't set the > origin right, the profile selection in the GUI would be wrong because > one endpoint of the line is at (0,0) by definition. But it works for > me. > > 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
