2.1.6.1.4. sf_tools.signal.linear module

LINEAR OPERATORS

This module contains linear operator classes.

Author:Samuel Farrens <samuel.farrens@gmail.com>
Version:1.3
Date:19/07/2017
class sf_tools.signal.linear.Identity[source]

Bases: object

Identity operator class

This is a dummy class that can be used in the optimisation classes

op(data, **kwargs)[source]

Operator

Returns the input data unchanged

Parameters:
  • data (np.ndarray) – Input data array
  • **kwargs – Arbitrary keyword arguments
Returns:

Return type:

np.ndarray input data

adj_op(data)[source]

Adjoint operator

Returns the input data unchanged

Parameters:data (np.ndarray) – Input data array
Returns:
Return type:np.ndarray input data
class sf_tools.signal.linear.Wavelet(data, wavelet_opt=None)[source]

Bases: object

Wavelet class

This class defines the wavelet transform operators

Parameters:
  • data (np.ndarray) – Input data array, normally an array of 2D images
  • wavelet_opt (str, optional) – Additional options for mr_transform
op(data)[source]

Operator

This method returns the input data convolved with the wavelet filters

Parameters:data (np.ndarray) – Input data array, a 2D image
Returns:
Return type:np.ndarray wavelet convolved data
adj_op(data)[source]

Adjoint operator

This method returns the input data convolved with the wavelet filters rotated by 180 degrees

Parameters:data (np.ndarray) – Input data array, a 3D of wavelet coefficients
Returns:
Return type:np.ndarray wavelet convolved data
class sf_tools.signal.linear.LinearCombo(operators, weights=None)[source]

Bases: object

Linear combination class

This class defines a combination of linear transform operators

Parameters:
  • operators (list) – List of linear operator class instances
  • weights (list, optional) – List of weights for combining the linear adjoint operator results
op(data)[source]

Operator

This method returns the input data operated on by all of the operators

Parameters:data (np.ndarray) – Input data array, a 2D image
Returns:
Return type:np.ndarray linear operation results
adj_op(data)[source]

Adjoint operator

This method returns the combination of the result of all of the adjoint operators. If weights are provided the comibination is the sum of the weighted results, otherwise the combination is the mean.

Parameters:data (np.ndarray) – Input data array, an array of coefficients
Returns:
Return type:np.ndarray adjoint operation results