get_magnitude_phase_signal#

BeamShift.get_magnitude_phase_signal(rotation=None, autolim=True, autolim_sigma=4, magnitude_limits=None, add_color_wheel_marker=True)[source]#

Get beam shift image visualized using continuous color scale.

Converts the x and y beam shifts into an RGB array, showing the magnitude and phase (direction) of the beam shifts.

Useful for visualizing magnetic domain structures.

Parameters:
  • rotation (float, optional) – In degrees. Useful for correcting the mismatch between scan direction and diffraction pattern rotation.

  • autolim (bool, default True)

  • autolim_sigma (float, default 4)

  • magnitude_limits (tuple of floats, default None) – Manually sets the value limits for the color signal. For this, autolim needs to be False.

Returns:

color_signal

Return type:

HyperSpy 2D RGB signal

Examples

>>> s = pxm.data.dummy_data.get_simple_beam_shift_signal()
>>> s_magnitude_phase = s.get_magnitude_phase_signal()
>>> s_magnitude_phase.plot()

Rotate the beam shift by 30 degrees

>>> s_magnitude_phase = s.get_magnitude_phase_signal(rotation=30)

See also

get_magnitude_signal

Signal showing the magnitude

get_phase_signal

Signal showing the phase