xrheed.plotting
Submodule plotting provides functions to visualize RHEED images and intensity profiles. It includes utilities for plotting single images, multiple images overviews, and extracted intensity profiles with optional annotations.
- plot_image(rheed_image, ax=None, auto_levels=0.0, show_center_lines=True, show_specular_spot=False, **kwargs)[source]
Plot a RHEED image using matplotlib.
- Parameters:
rheed_image (xr.DataArray) – The RHEED image to plot.
ax (matplotlib.axes.Axes or None, optional) – The axes to plot on. If None, a new figure and axes are created.
auto_levels (float, optional) – If > 0, automatically set vmin/vmax for contrast enhancement.
show_center_lines (bool, optional) – If True, show center lines at x=0 and y=0.
show_specular_spot (bool, optional) – If True, overlay the specularly reflected spot on the image.
**kwargs – Additional keyword arguments passed to xarray plot.
- Returns:
The axes with the plotted image.
- Return type:
matplotlib.axes.Axes
- plot_images(rheed_data, ncols=3, fig_w=3, auto_levels=0.0, show_center_lines=False, show_specular_spot=False, **kwargs)[source]
Plot multiple RHEED images in a grid layout.
- Parameters:
rheed_data (xr.DataArray or list[xr.DataArray]) –
- Either:
A 3D stack (DataArray with one leading dimension, e.g. ‘alpha’),
A list of 2D RHEED images.
Must contain more than one image.
ncols (int, optional) – Number of columns in the grid layout (default: 3).
fig_w (float, optional) – Width of single RHEED image (in)
auto_levels (float, optional) – If > 0, automatically set vmin/vmax for contrast enhancement (default: 0.0).
show_center_lines (bool, optional) – If True, show center lines at x=0 and y=0 (default: False).
show_specular_spot (bool, optional) – If True, show specular spot (default: False).
**kwargs – Additional keyword arguments passed to plot_image().
- Returns:
The figure containing the plotted images.
- Return type:
matplotlib.figure.Figure
- plot_profile(rheed_profile, ax=None, transform_to_k=True, normalize=True, **kwargs)[source]
Plot a RHEED intensity profile, optionally normalizing and transforming to kx.
- Parameters:
rheed_profile (xr.DataArray) – The RHEED intensity profile to plot.
ax (matplotlib.axes.Axes or None, optional) – The axes to plot on. If None, a new figure and axes are created.
transform_to_k (bool, optional) – If True, transform the sx-axis to ky using experimental geometry.
normalize (bool, optional) – If True, normalize the intensity profile.
**kwargs – Additional keyword arguments passed to matplotlib plot.
- Returns:
The axes with the plotted profile.
- Return type:
matplotlib.axes.Axes
Modules