Closed SylviaWhittle closed 6 months ago
It seems that the aspect ratio is a float and not a pair of int.
Which picture has the correct aspect ratio? A or B?
A)
B)
Thank you for your attention
B is correct.
I have been told that we have successfully used pySPM on these images before which is strange... It seems that it shouldn't have ever worked if the code assumed a pair of integers.
What is the real size of your image? 300μm horizontally? but for the vertical axis Gwyddion tells me about 210μm while the aspect ratio of 0.51216 of 300μm is 153μm which is strange...
Could you try this branch: https://github.com/scholi/pySPM/tree/Bruker_non_square Please test it with Bruker file having various aspect ratio. If you see that this work then we can merge it to master and create a new release. I have myself no more access to a Bruken instrument and thus cannot perform the tests myself....
The real size of the image as reported by Nanoscope, are 300nm x 210nm (0.7 aspect ratio)
I also held a tape measure up to my screen and confirmed an aspect ratio of 0.7.
We have no idea where the 0.51216 aspect ratio could come from. It is very strange. It is also strange that these files loaded perfectly fine before about December 22nd 2023. Perhaps there is some user error in there somewhere...
Your branch works on both the files that were not previously able to be loaded. I cannot share the second one as it is a collaborator's data and we don't have permission to share it.
Here is a screenshot of it working:
Thank you for your time, it is very much appreciated by our team 😄
Ok good to hear that it works :). So I will merge this branch to master.
Describe the bug Hi there 😄
We have been using pySPM for a while now to open Bruker .spm files, and it has been going seamlessly. Today we have noticed that on files that previously definitely loaded properly, it now throws this error. The files are non-square in their aspect ratio.
The issue appears to be the handling of floating point values in the
get_channel()
method of theBruker
class.What is weird is that this error happens on both version
0.2.23
and0.5.1
and manually setting the versions to previous versions does not fix it.To Reproduce file used: not_working_file.spm.zip
I had to compress it since GitHub won't allow
.spm
uploads. I hope this doesn't corrupt it.Expected behavior Loading the height channel data as usual.
Screenshots![image](https://github.com/scholi/pySPM/assets/86117496/90ca7de4-91cd-4fbe-bf4f-d670f6166093)
Information:
Please run the following and attach the result to your issue