spyrit.core.noise.NoNoise

class spyrit.core.noise.NoNoise(meas_op: Linear | LinearSplit | HadamSplit)[source]

Bases: Module

Simulates measurements not corrupted by noise.

Assuming incoming images \(x\) in the range [-1;1], measurements are first simulated from images in the range [0;1] by computing \(y = \frac{1}{2} H(1+x)\).

Note

Assumes that the incoming images \(x\) are in the range [-1;1]

The class is constructed from a measurement operator (see the meas submodule)

Args:

meas_op : Measurement operator (see the meas submodule)

Example 1: Using a Linear measurement operator
>>> H = torch.rand([400,32*32])
>>> linear_op = Linear(H)
>>> linear_acq = NoNoise(linear_op)
Example 2: Using a HadamSplit measurement operator
>>> H = torch.rand([400,32*32])
>>> Perm = torch.rand([32*32,32*32])
>>> split_op = HadamSplit(H, Perm, 32, 32)
>>> split_acq = NoNoise(split_op)

Methods

forward(x)

Simulates measurements

reindex(x[, axis, inverse_permutation])

Sorts a tensor along a specified axis using the indices tensor.