nifty7.operators.sum_operator module

class SumOperator(ops, neg, dom, tgt, _callingfrommake=False)[source]

Bases: nifty7.operators.linear_operator.LinearOperator

Class representing sums of operators.

Notes

This operator has to be called using the make method.

__repr__()[source]

Return repr(self).

property adjoint

the adjoint of self

Returns a LinearOperator object which behaves as if it were the adjoint of this operator.

Type

LinearOperator

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]
static make(ops, neg)[source]

Build a SumOperator (or something simpler if possible)

Parameters
  • ops (list of LinearOperator) – Individual operators of the sum.

  • neg (list of bool) – Same length as ops. If True then the equivalent operator gets a minus in the sum.

static simplify(ops, neg)[source]