ImagPart
- class odl.ImagPart(*args, **kwargs)
Bases:
OperatorOperator that extracts the imaginary part of a vector.
Implements:
ImagPart(x) == x.imag
- __init__(space)[source]
Initialize a new instance.
Parameters
- space
TensorSpace 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.])
- space