spyrit.core.prep.SplitPoissonRaw.sigma_from_image

SplitPoissonRaw.sigma_from_image(x: tensor, meas_op: LinearSplit | HadamSplit) tensor

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 images

meas_op: Measurement operator

Shape:

x: \((*,N)\)

meas_op: An operator such that meas_op.N \(=N\) and meas_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])