ImagPart

class odl.operator.default_ops.ImagPart(*args, **kwargs)[source]

Bases: odl.operator.operator.Operator

Operator that extracts the imaginary part of a vector.

Implements:

ImagPart(x) == x.imag
Attributes
adjoint

Return the (left) adjoint.

domain

Set of objects on which this operator can be evaluated.

inverse

Return the pseudoinverse.

is_functional

True if this operator’s range is a Field.

is_linear

True if this operator is linear.

range

Set in which the result of an evaluation of this operator lies.

Methods

_call(self, x)

Return self(x).

derivative(self, x)

Return the derivative operator in the “C = R^2” sense.

norm(self[, estimate])

Return the operator norm of this operator.

__init__(self, space)[source]

Initialize a new instance.

Parameters
spaceTensorSpace

Space in which the imaginary part should be taken, needs to implement space.real_space.

Examples

Take the imaginary part of complex vector:

>>> c3 = odl.cn(3)
>>> op = ImagPart(c3)
>>> op([1 + 2j, 2, 3 - 1j])
rn(3).element([ 2.,  0., -1.])

The operator is the zero operator on real spaces:

>>> r3 = odl.rn(3)
>>> op = ImagPart(r3)
>>> op([1, 2, 3])
rn(3).element([ 0.,  0.,  0.])