pyextal.potentialMap.viz¶
Figures for MapResult maps.
Functions¶
|
|
|
Draws a 2D map; oblique axes are drawn at their true angle. |
|
|
|
Refined, reference and difference maps of a 2D result, with a line profile. |
|
Reference and refined 2D maps with paired peaks marked. |
|
|
|
Isosurface of a 3D map (marching cubes). |
Module Contents¶
- pyextal.potentialMap.viz._oblique(result)¶
- pyextal.potentialMap.viz._show(ax, result, data, **kw)¶
Draws a 2D map; oblique axes are drawn at their true angle.
- pyextal.potentialMap.viz._save(fig, save_dir, name)¶
- pyextal.potentialMap.viz.plot_map_comparison(result, line_center=None, label=None, save_dir=None)¶
Refined, reference and difference maps of a 2D result, with a line profile.
- Parameters:
result (MapResult) – A 2D map.
line_center (int, optional) – Column of the vertical line profile; defaults to the middle.
label (str, optional) – Title suffix and file-name stem; defaults to
layer<N>.save_dir (path-like, optional) – Writes
map_comparison_<label>.png.
- Returns:
(fig, axes)- Return type:
tuple
- pyextal.potentialMap.viz.plot_peak_shifts(result, peaks, label=None, save_dir=None)¶
Reference and refined 2D maps with paired peaks marked.
- pyextal.potentialMap.viz.plot_slices(volume, axis=0, n=4, clim=None, cmap='inferno')¶
nevenly spaced 2D slices of a 3D map.- Parameters:
volume (np.ndarray) – 3D map.
axis (int) – Axis the slices are taken along.
n (int) – Number of slices.
clim (tuple, optional) – (vmin, vmax).
cmap (str) – Colormap.
- Returns:
(fig, axes)- Return type:
tuple
- pyextal.potentialMap.viz.plot_isosurface(volume, level, steps=None)¶
Isosurface of a 3D map (marching cubes).
- Parameters:
volume (np.ndarray) – 3D map.
level (float) – Isosurface value.
steps (np.ndarray, optional) – (3, 3) Cartesian grid steps (MapResult.steps) to draw the cell at its true shape; grid indices otherwise.
- Returns:
(fig, ax)- Return type:
tuple