Skip to content

Scale of images is wrong for Bruker KPFM data #66

Description

@ADBPhD

For KPFM data, the "scale" factor is wrong

To Reproduce
Take any Bruker KPFM data and you'll see the factor is wrong by multiple orders of magnitude (and not just from the physical unit factor)

The issue comes from line 193 in Bruker.py :

scale = float(result[1]) / 256**bpp

This works for topography data but not for Potential data, the fix is to take the value in parentheses from metadata :
@2:Z scale: V [Sens. Potential] (0.0003051758 V/LSB) 20.00000 V
Here for example it would be 0.0003051758
The good thing is that this value also works for topography, as it results in the same value as float([result[1])/256**bpp in my tests :
scale from code : 5.7220458984375e-09
scale from .spm metadata : 5.72205e-09

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions