nifty7.operators.operator_adapter module#

class OperatorAdapter(op, op_transform)[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.

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

  • op_transform (int) –

    1. adjoint

    2. inverse

    3. adjoint inverse


Return repr(self).

apply(x, mode)[source]#

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

  • 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


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

Return type:


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