bartorch.linop.Convolve#
- class bartorch.linop.Convolve(kernel, shape, axes, mode='same', direction=None)#
Convolution with a fixed kernel, BART’s
linop_conv.- Parameters:
kernel (tensor) – What to convolve with, with one axis per axis of
shape; an axis it has only one of is left alone.shape (tuple of int) – The domain, C order.
axes (int or tuple of int) – Which axes to convolve along.
mode (str) – How the ends are treated, under numpy’s names:
"wrap"(circular),"same"(the input’s size, truncated),"valid"(only where the kernel fits) or"full"(extended).direction (str, optional) –
"symmetric","causal"or"anticausal". BART only plans a"valid"or"full"convolution as a causal one, so leaving this out picks causal for those two and symmetric for the others rather than failing inside BART’s planner.
- __init__(kernel, shape, axes, mode='same', direction=None)#
Methods
A(x, **kwargs)A x, underdeepinv's name.A_adjoint(y, **kwargs)A^H y, underdeepinv's name, recorded for autograd.A_adjoint_A(x, **kwargs)A^H A x, underdeepinv's name, recorded for autograd.A_dagger(y, **kwargs)The pseudo-inverse, under
deepinv's name.__init__(kernel, shape, axes[, mode, direction])adjoint(y[, out])A^H y, without recording for autograd.cogram()A A^Has an operator.conj()conj(A): conjugate the input, apply, conjugate the output.forward(x[, out])A x, without recording for autograd.gram()A^H Aas an operator.normal(x[, out])A^H A x.opnorm()The spectral norm, by BART's power iteration on
A^H A.pinv(y[, damp])(A^H A + damp I)^-1 A^H y, the damped least-squares solution.to_nonlinear()The same operator as a
NonlinearOperator.Attributes
HA^H, from BART's own adjoint constructor.TA^T, the adjoint without the conjugation, asconj(A).H.codim_rankHow many axes the codomain has.
codim_shapeThe codomain, under pyxu's name for it; the same as
oshape.codim_sizeHow many elements the codomain holds.
devicedim_rankHow many axes the domain has.
dim_shapeThe domain, under pyxu's name for it; the same as
ishape.dim_sizeHow many elements the domain holds.
ishapeoshape