On Tue, Sep 16, 2014 at 11:42:19AM +0200, Mathias Müller wrote:
> Honestly, I am kind of distressed. I do exactly the same. The image is
> of cause centered, but when extracting coordinates of the image center
> or the edges than it simple does not fit to what I get in the
> fft-module.
>
> when reading the data point from selection, could there be some wrong usage? 

I'm sorry, I didn't work with this part of Gwyddion code for some
time...  Selections are *NOT* offset.  They have origin in the top-left
corner, like pixel coordinates, just scaled to the physical scale.  You
have to add the offsets yourself:

    sel[0] += gwy_data_field_get_xoffset(data_field);
    sel[1] += gwy_data_field_get_yoffset(data_field);

This is, again, for compatibility reasons because offsets were a kind of
afterthought.

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