nifty8.operators.operator_adapter module#

class OperatorAdapter(op, op_transform, domain_dtype=<class 'float'>)[source]#

Bases: LinearOperator

Class representing the inverse and/or adjoint of another operator.

Objects of this class are created internally by LinearOperator whenever the inverse and/or adjoint of an already existing operator object is requested via the LinearOperator attributes inverse, adjoint or _flip_modes().

Users should never have to create instances of this class directly.

Parameters:
  • op (LinearOperator) – The operator on which the adapter will act

  • op_transform (int) –

    1. adjoint

    2. inverse

    3. adjoint inverse

__init__(op, op_transform, domain_dtype=<class 'float'>)[source]#
__repr__()[source]#

Return repr(self).

apply(x, mode)[source]#

Applies the Operator to a given x, in a specified mode.

Parameters:
  • x (nifty8.field.Field) – The input Field, defined on the Operator’s domain or target, depending on mode.

  • mode (int) –

    • TIMES: normal application

    • ADJOINT_TIMES: adjoint application

    • INVERSE_TIMES: inverse application

    • ADJOINT_INVERSE_TIMES or INVERSE_ADJOINT_TIMES: adjoint inverse application

Returns:

The processed Field defined on the Operator’s target or domain, depending on mode.

Return type:

nifty8.field.Field

draw_sample(from_inverse=False)[source]#