CompositeOp.py π§ΒΆ
Source: LION/operators/CompositeOp.py
Warning
This file has not yet received a complete narrative and docstring audit. Its public source-level API is listed automatically below.
Composite linear operator A = Phi Psi^{-1} and its adjoint for compressed sensing.
- class CompositeOp(wavelet: Operator, phi: PhotocurrentMapOp, device: str | torch.device | None = None)
Composite linear operator \(A = \Phi \Psi^{-1}\) and its adjoint.
Parameters βββ- wavelet : Wavelet2D Wavelet transform object. phi : PhotocurrentMapOp Photocurrent mapping operator. device : str or torch.device, optional Device for computations. If None, uses wavelet.device.
References βββ- .. [Koutsourakis2021] G. Koutsourakis, A. Thompson, and J. C. Blakesley, βToward Megapixel Resolution Compressed Sensing Current Mapping of Photovoltaic Devices Using Digital Light Processingβ, Solar RRL, 5(11):2100467, 2021. doi:10.1002/solr.202100467
- CompositeOp.forward(self, w: torch.Tensor) torch.Tensor
Apply the forward projection A = Phi Psi^{-1}.
Note
Prefer calling the instance of the CompositeOp operator as
operator(w)over directly calling this method. See this PyTorch discussion.
- CompositeOp.adjoint(self, r: torch.Tensor) torch.Tensor
Apply A^T = Psi Phi^T.
Parameters βββ- r : torch.Tensor Residual in measurement space, shape (M,).
Returns ββ- g : torch.Tensor Gradient in wavelet coefficient space, shape (Nw,).
- CompositeOp.domain_shape(self) tuple[int, ...]
Return the shape of the wavelet coefficient domain.
- CompositeOp.range_shape(self) tuple[int, ...]
Return the shape of the measurement range.