Dear all,

I have a (hopefully) straightforward question. I have all of my AFM 
image and meta data in python (numpy array and dictionary) and want to 
simply write to a Gwyddion native file. I have imported the gwy module, 
created a new container and DataField object (initialise to the correct 
size/number of pixels), set the meta data and channel title etc. 
However, I can't find an easy way to populate the contents of the data 
itself...

DataField.get_data() works fine, and returns the initialised zero 
values. There is a function DataField.set_data() on inspecting the 
object, but this is not listed in the API and I can't get it to work.

There was a similar question on the list a while back, which was solved 
by using gwyutils. But I guess this only works inside of Gwyddion, and I 
need something that will run standalone...

Calling DataField.set_val() in a loop works fine - is this the preferred 
python option? The docs talk about using get_data() and referencing the 
returned buffer, but I guess this comes directly from the underlying C 
docs and is not relevant here..

Thanks for your help!

Mark

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to