spyrit.core.meas.Linear.build_H_pinv

Linear.build_H_pinv(reg: str = 'rcond', eta: float = 0.001) None[source]

Used to set the pseudo inverse of the measurement matrix \(H\) using torch.linalg.pinv. The result is stored in the attribute H_pinv.

Args:

reg (str, optional): Regularization method to use. Available options are ‘rcond’, ‘L2’ and ‘H1’. ‘rcond’ uses the rcond parameter found in torch.linalg.lstsq(). This parameter must be specified if the pseudo inverse has not been computed. Defaults to None.

eta (float, optional): Regularization parameter (cutoff for small singular values, see torch.linalg.pinv). Defaults to None, in which case the default value of torch.linalg.pinv is used.

Returns:

None. The pseudo inverse is stored in the attribute H_pinv.