proxtoolbox.utils.visualization package¶
Submodules¶
proxtoolbox.utils.visualization.complex_field_visualization module¶
-
proxtoolbox.utils.visualization.complex_field_visualization.
complex_to_hsv
(arr: numpy.ndarray, background: str = 'dark')[source]¶ Transforms a 2d complex-valued field to an HSV image, with hue being related to phase and saturation or value with the amplitude of the field
- Args:
- arr: numpy array with complex dtype background: ‘dark’ or ‘light’
Returns:
-
proxtoolbox.utils.visualization.complex_field_visualization.
complex_to_rgb
(arr, background='dark')[source]¶ Transforms a 2d complex-valued field to an RGB image, with color being related to phase and brightness with the amplitude of the field
- Args:
- arr: numpy array with complex dtype background: ‘dark’ or ‘light’
Returns:
proxtoolbox.utils.visualization.stack_viewer module¶
-
class
proxtoolbox.utils.visualization.stack_viewer.
SingleStackViewer
(volume)[source]¶ Bases:
object
Create window showing a slice of the 3d data, allows to scan the slice position using j, k keys. Note that k will also change the x-axis if the mouse is hovering over the window.
Parameters: volume – real-valued np.ndarray (3D)
-
class
proxtoolbox.utils.visualization.stack_viewer.
XYZStackViewer
(volume, limit_sliders=(0, 0, 0), cmap: str = None, clim: tuple = (None, None), data_transform: callable = None, name: str = None)[source]¶ Bases:
object
Dynamic matplotlib plot showing slices out of a 3d dataset
Parameters: - volume – 3d numpy array
- limit_sliders – sliders allow range given by [limit, N-limit], where N is the maximal length
- cmap – color map to use (e.g. ‘seismic’ or ‘viridis’). For ‘seismic’, will center on 0
- clim – tuple with the min-max values of the colorscale
- data_transform – simple transformation function to apply to data before plot. defaults to abs() for complex data
- name – Set the name of the figure to a string.