pymoto.PlotDomain
- class pymoto.PlotDomain(domain: VoxelDomain, *args, clim=None, cmap='gray_r', **kwargs)
Plots the densities of a domain (2D or 3D)
- Input Signal:
x(np.ndarray): The field to be shown of size(domain.nel)
- __init__(domain: VoxelDomain, *args, clim=None, cmap='gray_r', **kwargs)
Initialize domain plot module
- Parameters:
domain (
pymoto.VoxelDomain) – The domain layout*args – Additional arguments for
pymoto.FigModuleclim ([float, float] or float, optional) – In 2D
[cmin, cmax]: the values of minimum and maximum color. In 3Dclipval: the value below which elements are clipped.cmap (str, optional) – Colormap (only for 2D). Defaults to “gray_r”.
**kwargs – Additional keyword arguments for
pymoto.FigModule
Methods
__init__(domain, *args[, clim, cmap])Initialize domain plot module
connect(sig_in[, sig_out])Connect without automatic adding to a function network
get_input_sensitivities([as_list])get_input_states([as_list])get_output_sensitivities([as_list])get_output_states([as_list])reset()Reset the state of the sensitivities (they are set to zero or to None)
response()Calculate the response from sig_in and output this to sig_out
Calculate sensitivities using backpropagation
Attributes
Get the number of input signals
Get the number of output signals
- connect(sig_in: Signal | Iterable[Signal], sig_out: Signal | Iterable[Signal] = None)
Connect without automatic adding to a function network
- get_input_sensitivities(as_list=False)
- get_input_states(as_list=False)
- get_output_sensitivities(as_list=False)
- get_output_states(as_list=False)
- property n_in: int
Get the number of input signals
- property n_out: int
Get the number of output signals
Note: Cannot be used in the initial __call__()
- reset()
Reset the state of the sensitivities (they are set to zero or to None)
- response()
Calculate the response from sig_in and output this to sig_out
- sensitivity()
Calculate sensitivities using backpropagation
Based on the sensitivity we get from sig_out, reverse the process and output the new sensitivities to sig_in
- sig_in: List = None
- sig_out: List = None