cr.sparse.problems.Problem

class cr.sparse.problems.Problem(name: str, Phi: cr.sparse._src.lop.lop.Operator, Psi: cr.sparse._src.lop.lop.Operator, A: cr.sparse._src.lop.lop.Operator, b: jax._src.basearray.Array, reconstruct: Callable, x: Optional[jax._src.basearray.Array] = None, y: Optional[jax._src.basearray.Array] = None, figures: List[str] = [], plot: Optional[Callable] = None, both: bool = False)[source]

A sparse signal recovery problem

The problem is given by \(\bb = \Phi \by\) where \(\by = \Psi \bx\). This can written as \(\bb = \Phi \Psi \bx\). We shorten \(\bA = \Phi \Psi\) and reformulate the problem as bb = bA bx. In the sparse reconstruction problem, we have access to \(\bb\) and \(\bA\) and we attempt to recover \(\bx\). We can reconstruct \(\by\) from \(\bx\) by using the reconstruct function provided.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__()

Initialize self.

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

A

The combined sensing matrix + sparsifying dictionary operator

Phi

A linear operator representing the sensing process

Psi

A sparsifying basis/dictionary

b

The observed signal

both

A flag to indicate if both Phi and Psi are non-trivial

figures

Titles of figures associated with the problem

name

Name of the problem

plot

A function to plot specific figures associated with the problem

reconstruct

Function handle to reconstruct a signal from coefficients in x

x

Expected sparse representation (if available for synthetic problems)

y

Original signal