Comments (3)
import numpy as np
from sigpy.prox import L2Reg
import unittest
def g_in(r_in_minus, gamma_in_minus):
eta_in_plus = (1 + gamma_in_minus)
xhat_in_plus = r_in_minus * gamma_in_minus / eta_in_plus
return xhat_in_plus, eta_in_plus
class TestingDenoisers(unittest.TestCase):
def test_g_in(self):
N=10
operator = L2Reg((N,1), 1.)
r = np.random.randn(N,1)
gamma = abs(np.random.randn())
xhat, eta = g_in(r, gamma)
C = np.cov(r, xhat, rowvar=False)
eta_check = gamma/(C[1,0]/C[0,0])
self.assertAlmostEqual(eta_check, eta)
self.assertAlmostEqual(np.linalg.norm(xhat-operator(1/gamma, r)),0.)
if __name__ == '__main__':
unittest.main()
from sigpy.
Hello! Thanks for the report. Are you open to making a pull request for your requested document changes? In particular, if you're able to change the documentation for all the "basic proxs" listed in https://sigpy.readthedocs.io/en/latest/core_prox.html to be of the format "prox_{alpha g)(y) = argmin...", that would be much appreciated.
from sigpy.
I created a pull request
from sigpy.
Related Issues (20)
- A method for validating adjoint implementation of a linear operation HOT 2
- sigpy.mri.poisson fails for specific calibration sizes HOT 1
- sigpy.mri.poisson hangs when used to generate 1d undersampling trajectories
- cunumeric? HOT 1
- BART vs sigpy, which should I choose? HOT 1
- sp.linop.ConvolveData fails on GPU, works with numpy on CPU
- sigpy on conda-forge / support for newest python versions HOT 8
- nlinv / jsense HOT 5
- sigpy 0.1.25 is incompatible with newer numpy versions HOT 4
- numpy>1.24 transitioned to generic data types (e.g. np.float -> float) HOT 1
- Sigpy won't build with `pip install .` HOT 2
- Install sigpy under Ubuntu 22.04 (np.float and co) HOT 2
- module 'numpy' has no attribute issues HOT 2
- The NUFFTadjoint result is very different from that of irt by jeff fessler in scale
- adjoint of wavelet transform
- Sigpy conda packaging
- Segfault in 1x1 conv2d backward pass when both Pytorch and sigpy are installed (cudnn version mismatch)
- sigpy.mri.util.tseg_off_res_b_ct() for a 3D image and 3D coordinates HOT 1
- Help: 3D non-cartesian k-space gridding HOT 4
- Sigpy incompatible with scipy 1.14.0 and numpy 2.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sigpy.