nifty8.operators.chain_operator module#

class ChainOperator(ops, _callingfrommake=False)[source]#

Bases: LinearOperator

Class representing chains of operators.

Notes

This operator has to be called using the make method.

__init__(ops, _callingfrommake=False)[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

static make(ops)[source]#

Build a ChainOperator (or something simpler if possible), a sequence of concatenated LinearOperators.

Parameters:

ops (list of LinearOperator) – Individual operators of the chain.

static simplify(ops)[source]#