Calibration#
- class pyxem.utils.calibration.Calibration(signal)[source]#
Bases:
object
This is a class to hold the calibration parameters for some dataset and the methods for calibrating the dataset.
It is designed to hold information about the affine transformation and the mask to apply to the data for something like a beam stop.
There are 2 ways to set the calibration: 1. You can set the calibration with a known reciprocal space pixel size. This will assume
a flat ewald sphere.
You can set the calibration directly with a known real pixel size, beam energy/wavelength, and detector distance. This is the most accurate method but requires detailed calibration information that is not trivial to acquire. In most cases option 1 is sufficient.
If you set the pixel size with hyperSpy.axes_manager.signal_axes[0].scale = 0.1 it will default to the first method. The underlying data will be stored in the metadata of the signal to be used later.
Attributes
Set the affine transformation to apply to the data.
The beam energy in kV.
The camera length in meters.
Return the center in pixels
The convergence angle of the beam in mrad.
If the ewald sphere is flat return True
Set the mask to apply to the data.
The physical pixel size of the detector in m
Return an array with axes [x/y, left/right, pixel_extent], as follows:
Return the scale in units of the axes.
The electron wavelength in A^-1.
Methods
Calibration.convert_signal_units
(new_unit)Change the units of the signal axes.
Calibration.detector
(pixel_size, ...[, ...])Calibrate the signal with a known pixel size, detector distance, and beam energy/wavelength.
Calibration.get_slices1d
(npt[, radial_range])Get the slices and factors for some image that can be used to slice the image for 1d integration.
Calibration.get_slices2d
(npt, npt_azim[, ...])Get the slices and factors for some image that can be used to slice the image for 2d integration.
Sets the camera length from the calibration parameters.
Set the mrad scale from the calibration parameters.