Check out the Hyperspy Workshop May 13-17, 2024 Online

get_color_signal#

DPCSignal2D.get_color_signal(rotation=None, autolim=True, autolim_sigma=4, magnitude_limits=None)[source]#

Get DPC image visualized using continuous color scale.

Converts the x and y beam shifts into an RGB array, showing the magnitude and 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_dpc_signal()
>>> s_color = s.get_color_signal()
>>> s_color.plot()

Rotate the beam shift by 30 degrees

>>> s_color = s.get_color_signal(rotation=30)

See also

get_color_signal

Signal showing both phase and magnitude

get_phase_signal

Signal showing the phase