Image2D#
- class cuqi.geometry.Image2D(im_shape, order='C', visual_only=False)#
A class that represents a 2D image.
The par2fun method converts the parameter vector into an image (matrix). The fun2par method converts the image (matrix) into a parameter vector.
Plotting is handled via matplotlib.pyplot.imshow. Colormap is defaulted to grayscale.
- Parameters:
im_shape (tuple) – shape of the image (rows, columns)
order (str) – If order = ‘C’, the image is represented in row-major order. if order = ‘F’, the image is represented column-major order.
visual_only (bool, Default: False) – If visual_only = True, par2fun and fun2par will not convert parameter vector into image and vice versa. But visualization will still be in 2D image format.
- __init__(im_shape, order='C', visual_only=False)#
Methods
__init__
(im_shape[, order, visual_only])fun2par
(funvals)The function to parameter map used to map function values back to parameters, if available.
fun2vec
(funvals)Maps function values to a vector representation of the function values, if available.
par2fun
(pars)The parameter to function map used to map parameters to function values in e.g. plotting.
plot
(values[, is_par, plot_par])Plots a function over the set defined by the geometry object.
plot_envelope
(lo_values, hi_values[, ...])Plots an envelope from lower and upper bounds over the set defined by the geometry object.
vec2fun
(funvec)Maps function vector representation, if available, to function values.
Attributes
The dimension of the geometry (function space).
Flag to indicate whether the function value is an array.
The shape of the geometry (function space).
The dimension of the geometry (dimension of the vector representation of the function value).
The shape of the geometry (shape of the vector representation of the function value).
The dimension of the geometry (parameter space).
The shape of the parameter space.