spyrit.core.prep.SplitPoisson.sigma_from_image
- SplitPoisson.sigma_from_image(x: tensor, meas_op: LinearSplit | HadamSplit) tensor[source]
Estimates the variance of the preprocessed measurements corresponding to images through a measurement operator
The variance is estimated as \(\frac{4}{\alpha} \{(Px)[0::2] + (Px)[1::2]\}\)
- Args:
x: Batch of imagesmeas_op: Measurement operator- Shape:
x: \((*,N)\)meas_op: An operator such thatmeas_op.N\(=N\) andmeas_op.M\(=M\)Output: \((*, M)\)
- Example:
>>> x = torch.rand([10,2*400], dtype=torch.float) >>> Perm = torch.rand([32,32]) >>> meas_op = HadamSplit(400, 32, Perm) >>> split_op = SplitPoisson(10, meas_op) >>> v = split_op.sigma_from_image(x, meas_op) >>> print(v.shape) torch.Size([10, 400])