hyperspy / hyperspyUI

A user interface for the hyperspy package. https://hyperspy.org/hyperspyUI
GNU General Public License v3.0
25 stars 15 forks source link

Calibration tool #103

Open magnunor opened 7 years ago

magnunor commented 7 years ago

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.

vidartf commented 7 years ago

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?).