fredericjs/surfalize

Help with OPD binary files

asuagar opened this issue · 7 comments

Hello,

Firstly, thank you for your contribution and sharing your work.

I have a collection of OPD binary files from Wyko hardware. I attempted to export them using Gwyddion software to SUR format. However, Surfalize is unable to read the resulting files. Could you recommend me a workflow to obtain a format compatible with Surfalize?

Thank you in advance.

P.S.: Is there any plan to support XYZ format?

The issue with Gwyddion is patched now with the latest commit to the develop branch and will be incorporated in the next release. In the meantime, you can install the the version from the develop branch. Still, if you want OPD to be added, send me the files :)

Also, regarding XYZ, I can also implement that. If you have a sample file, that would also be helpful, since XYZ is not always the same.

Hi fredericjs,

Thanks for the quick reply. I tried the Gwyddion nightly snapshot, but the error still happens. I've attached some OPD and XYZ files to this post. The XYZ files were created from the OPD files using Gwyddion with options "no header" and "precision = 5". Hopefully, these files can assist you in implement that.

Thank you so much for your time,
opd.zip
xyz.zip

Andrés

Hey, thanks for providing the data files, I'll try to implement XYZ and OPD in the coming days. Regarding the error, I'm think there might be a misunderstanding. Using the nightly build of Gwyddion won't help you, since I didn't change anything about the Gwyddion source code (I'm not a Gwyddion developer). What I did change is the surfalize code that reads SUR files so that it can also handle those exported from Gwyddion, which fill unused characters in strings with null bytes instead of white space. However, at this moment, the changes to surfalize are only commited to the develop branch and are not yet released. If you want to check if they work for you, you can install the newest surfalize version from the develop branch using pip install git+https://github.com/fredericjs/surfalize.git@develop. With this version, you should be able to read SUR files exported from Gwyddion without error. Please let me know if it works for you.

I have added basic support for OPD and XYZ files to the develop branch. This might still fail for different OPD files that are encoded differently. The XYZ reader currently assumes units of meters.

Thank you for your quick and detailed reply. I'll try it out as soon as possible. Unfortunately, since I'm using Windows, I need to install the "Microsoft C++ Build Tools" to build the package from the git repository. Just for the record, the hardware that generated the OPD files was a Wyko NT-1100.

P.S.: You can close the ticket.

New version is released ony pypi. You can upgrade via pip now without the need for the c compiler.