scholi / pySPM

Python library to handle Scanning Probe Microscopy Images. Can read nanoscan .xml data, Bruker AFM images, Nanonis SXM files as well as iontof images(ITA, ITM and ITS).
Apache License 2.0
62 stars 33 forks source link

Wired z axis values #16

Closed Thoronfin closed 3 years ago

Thoronfin commented 3 years ago

Hi,

the z scale (height) values from my code seems a bit wired.

filename="CaptureFile.0_00019.spm"
ScanB = pySPM.Bruker(filename)
Height = ScanB.get_channel("Height")
Height2 = Height.correct_plane(inline=False)
fig, ax = plt.subplots(1,1, figsize=(5,5))
p=Height2.zero_min().show(ax=ax, cmap="inferno", title="")
cbar=plt.colorbar(p,fraction=0.046)
cbar.set_label(label=Height2.zscale,rotation=270, labelpad=10)
plt.tight_layout()

This is the result from the code: Python Code Output

This is the same picture opened through Gwyddion:

Gwyddion Output

This is the source file: CaptureFile.0_00019.zip

I plotted the same graphs using a file from an other issue (see below). In that file there is a

[ZSensor] "Height Sensor"

and the python plot is identical to the Gwyddion graph.

e17089.0_00001.zip

Cheers

scholi commented 3 years ago

Hi, Yes there is some issue with the Bruker files.Bruker changed there file format with time and have some encoding issue. I don't have access to an instrument, so I cannot do any testing. If someone can find and correct the problem he can send a push request and I'll merge it to the library

scholi commented 3 years ago

This issue a a duplicata of https://github.com/scholi/pySPM/issues/7 ⇒ closing this one

scholi commented 3 years ago

I have fixed the library. Please update and test image

Thoronfin commented 3 years ago

Thanks, it seems work