Hello,
I'm working on a project for penn state and I've been trying to automate some 
basic tasks with this python script. However, everytime it runs I get:

** (python.exe:12912): WARNING **: Trying to register gtype 'GMountMountFlags' 
as enum when in fact it is of type 'GFlags'

** (python.exe:12912): WARNING **: Trying to register gtype 'GDriveStartFlags' 
as enum when in fact it is of type 'GFlags'

** (python.exe:12912): WARNING **: Trying to register gtype 'GSocketMsgFlags' 
as enum when in fact it is of type 'GFlags'

(python.exe:12912): Module-CRITICAL **: level_func: assertion 'dfield && quark' 
failed

(python.exe:12912): Module-CRITICAL **: linematch: assertion 'dfield && quark' 
failed

(python.exe:12912): Module-CRITICAL **: grain_mark: assertion 'dfield && 
mquark' failed

(python.exe:12912): GwyModule-CRITICAL **: gwy_process_func_run: assertion 
'func_info' failed

Based on other messages on the forum it seems like I need to use container 
functions rather than the gwy functions, but I do not know how to find and use 
these functions. Any help would be appreciated. Here is my code:

settings["/modules/grain_mark/isslope"] = False
settings["/modules/grain_mark/lap"] = 50
settings["/modules/grain_mark/merge_type"] = 0
settings["/modules/grain_mark/slope"] = 50
settings["/modules/grain_mark/update"] = True

#Defining sesttings for gaussian filter function
settings["/modules/filter/height"] = 348
settings["/modules/filter/width"] = 281
settings["/modules/filter/filter_type"] = 7
settings["/modules/filter/masking"] = 0
settings["/modules/filter/size"] = 5

#loads gwyddion file
container = gwy.gwy_file_load("test.spm", gwy.RUN_NONINTERACTIVE)

#adds the file to gwyddion browser for processing
gwy.gwy_app_data_browser_add(container)

#getting all the keys from each data field
"""
fields = gwyutils.get_data_fields_dir(container)
for key in fields.keys():
    print(key)
"""

#running basic data processing functions on the gwyddion file
gwy.gwy_process_func_run('level', container, gwy.RUN_IMMEDIATE)
gwy.gwy_process_func_run('align_rows', container, gwy.RUN_IMMEDIATE)
gwy.gwy_process_func_run('grain_mark', container, gwy.RUN_IMMEDIATE)

#Doing a gaussian blur on image contents
gwy.gwy_process_func_run('GwyToolFilter', container, gwy.RUN_IMMEDIATE)

#saving the processed file
gwy.gwy_file_save(container, "processed.gwy", gwy.RUN_NONINTERACTIVE)

#removing the gwyddion file from memory
gwy.gwy_app_data_browser_remove(container)
_______________________________________________
Gwyddion-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gwyddion-users

Reply via email to