hyperspy/hyperspyUI

Calibration tool

magnunor opened this issue · 1 comments

Since calibrating images from some feature with know size is a common task in microscopy, it would be nice to have such a tool in HyperSpyUI as well.

This can be done manually using the Line tool and manually calculating the units/pixel, but having a dedicated tool for this would be really nice.

It might be an idea to implement it in HyperSpy directly, as it is a fairly common operation people want to do.

I agree this would be nice. How would a function that could go into hspy look?

def calibrate_axes(axes, start_coords, end_coords, expected_scale, expected_unit):

It would at least have to assume that the image have the same units in both directions. Should it check the existing units first (fail if not the same, warn, or silently overwrite units?).