nifty7.operators.operator_adapter module

class OperatorAdapter(op, op_transform)[source]

Bases: nifty7.operators.linear_operator.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

__repr__()[source]

Return repr(self).

apply(x, mode)[source]

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

Parameters
  • x (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

Field

draw_sample(from_inverse=False)[source]
draw_sample_with_dtype(dtype, from_inverse=False)[source]