Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy .asd file support from topofileformats #22

Open
SylviaWhittle opened this issue Sep 28, 2023 · 3 comments
Open

Copy .asd file support from topofileformats #22

SylviaWhittle opened this issue Sep 28, 2023 · 3 comments

Comments

@SylviaWhittle
Copy link

Hi 😄
I am Sylvia Whittle, a developer of the TopoStats package for automated AFM image processing / analysis.

TLDR: I made a basic .asd file reader and I welcome you to steal the code and use it in this project 😄

We have had requests from users to support the .asd file format, and I have written a pure Python package (TopoFileFormats) to load images from .asd files. I am planning on also adding .gwy format support. It is inspired by the libasd package, and the only reason we don't use it is that libasd is C++ based and we couldn't get the OS/Architecture specific builds to play nice with PyPI.

I had planned on trying to contribute directly to this project, however I do not currently have time to learn a new codebase (I tried but got confused, sorry!) and also we needed .asd loading support on PyPI ASAP.

Please do use my project to add .asd support here if anybody has time. I will attempt to do so if I gain some free time.

TopoStats also has a very basic & buggy .gwy file loader too, which you could also copy into this project if it helps since I see that there is an issue out for that #6 .

I hope there is something useful to you in this! ❤️ (If this is not useful then please feel free to delete this issue, I won't be offended)

@paulmueller
Copy link
Member

If I deleted this issue, you should be offended.

The libasd package seems very mature, supporting all major OSes and Python versions. You should not have to worry about building it - have you contacted its developers regarding this?

Currently I am under load, but I will report back here when I have time to implement it.

General question: Wouldn't it make sense to support afmformats in TopoStats as well? Uniting this way would greatly simplify code maintenance and reduce workloads.

@SylviaWhittle
Copy link
Author

We tried to get libasd to work for several months, but they didn't have builds on their PyPI for ARM (many of our users use Apple-Silicon). After @ns-rse made a PR for libasd to fix this we then had issues in getting the builds to work (I am unsure of details). We have been trying to help the developers of libasd fix this however the they are very busy and so it's difficult to get things fixed. I even tried forking the repo and building it myself but all releases to test-PyPI failed to install for reasons I couldn't comprehend.

In the end I thought it might be easier to have the functionality in Python since speed isn't an issue, which works and is easier than trying to manage builds (at least for me).

I am very inexperienced in this so all the issues encountered could be of my own making though.

@ns-rse knows more about the specifics as to the difficulties and is the person who has made suggestions / PRs in libasd. He may have something to say here.

I will try to make a PR here if I have time to learn your codebase, though you might wish to see if you can contribute with the libasd devs instead as they are immeasurably more knowledgable about the .asd format than I.

We would definitely like to support afmformats in TopoStats. I am not trying to compete with this project with the topofileformats package (sorry if that's what it seems like), I just needed something up and running ASAP for collaborators to be able to use in TopoStats. Plus I didn't want to annoy you with a bad & hastily written PR. It would be great to consolidate all our file IO into your package (if you would be okay with that).

Let me know if I haven't answered your questions or if you have any suggestions. Thank you!

@paulmueller
Copy link
Member

didn't have builds on their PyPI for ARM

That is an entirely different story. Thanks for elaborating.

I am not trying to compete with this project with the topofileformats package

I see no competition here as well and also didn't mean to convey that message. I was just thinking out loud (in written form).

In any event, I will get back to you here once I have freed up some time to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants