darsia.PWTransformation#
- class PWTransformation(supports=None, values=None)[source]#
Bases:
objectTransformation which cuts off values below 0 and ensures monotonicity.
Methods
Evaluate the signal at the colors on the color path.
inverse(value)Compute the inverse transformation at given value(s).
Supports and values, if the transformation is their linear interpolation.
load(path)Load the transformation from file in csv format.
log(log)Plot the transformation and store to file.
save(path)Save the transformation to file in csv format.
update([supports, values, dofs])values_from_diff(values_diff)- classmethod load(path)[source]#
Load the transformation from file in csv format.
- Parameters:
- path
Path Path to the file from which the transformation should be loaded.
- path
- evaluate_on_path(t)[source]#
Evaluate the signal at the colors on the color path.
- Parameters:
- t
floatornp.ndarray Equidistant parameters along the color path.
- t
- Returns:
floatornp.ndarraySignal. For the linear evaluation it is the function of the parameter.
- linear_table()[source]#
Supports and values, if the transformation is their linear interpolation.
Compiled single-pass evaluations (signals/models/signal_kernels.py) rely on this and replace __call__. NOTE: A subclass with another interpolator gets None by the type check; a change of the interpolation of this class must be mirrored in the kernel.