ComponentProjectionAdjoint

class odl.ComponentProjectionAdjoint(*args, **kwargs)

Bases: Operator

Adjoint operator to ComponentProjection.

As a special case of the adjoint of a ProductSpaceOperator, this operator is given as a column vector of identity operators and zero operators, with the identities placed in the positions defined by ComponentProjectionAdjoint.index.

In weighted product spaces, the adjoint needs to take the weightings into account. This is currently not supported.

__init__(space, index)[source]

Initialize a new instance

Parameters

spaceProductSpace

Space to project to.

indexint, slice, or list

Indexes to project from.

Examples

>>> r1 = odl.rn(1)
>>> r2 = odl.rn(2)
>>> r3 = odl.rn(3)
>>> pspace = odl.ProductSpace(r1, r2, r3)
>>> x = pspace.element([[1],
...                     [2, 3],
...                     [4, 5, 6]])

Projection on the 0-th component:

>>> proj_adj = odl.ComponentProjectionAdjoint(pspace, 0)
>>> proj_adj(x[0])
ProductSpace(rn(1), rn(2), rn(3)).element([
    [ 1.],
    [ 0.,  0.],
    [ 0.,  0.,  0.]
])

Projection on a sub-space corresponding to indices 0 and 2:

>>> proj_adj = odl.ComponentProjectionAdjoint(pspace, [0, 2])
>>> proj_adj(x[[0, 2]])
ProductSpace(rn(1), rn(2), rn(3)).element([
    [ 1.],
    [ 0.,  0.],
    [ 4.,  5.,  6.]
])