Closed chaithyagr closed 3 years ago
:exclamation: No coverage uploaded for pull request base (
master@3e8ae77
). Click here to learn what that means. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #127 +/- ##
=========================================
Coverage ? 76.99%
=========================================
Files ? 33
Lines ? 1765
Branches ? 0
=========================================
Hits ? 1359
Misses ? 406
Partials ? 0
Flag | Coverage Δ | |
---|---|---|
unittests | 76.99% <0.00%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3e8ae77...249ea43. Read the comment docs.
Opening for review now! The tests are passing.. Will remove the checks of CI from travis. @zaccharieramzi I feel we should move running of examples in another PR, so that we have a working pipeline to merge all the othyer PRs.
The failing test has something to do with the queue implementation of the linear_op :
=================================== FAILURES ===================================
___________ TestAdjointOperatorWaveletTransform.test_Wavelet2D_PyWt ____________
self = <test_wavelet_adjoint.TestAdjointOperatorWaveletTransform testMethod=test_Wavelet2D_PyWt>
def test_Wavelet2D_PyWt(self):
"""Test the adjoint operator for the 2D Wavelet transform
"""
for ch in self.num_channels:
print("Testing with Num Channels : " + str(ch))
for i in range(self.max_iter):
print("Process Wavelet2D PyWt test '{0}'...", i)
wavelet_op_adj = WaveletN(
wavelet_name="sym8",
nb_scale=4,
n_coils=ch,
n_jobs=2
)
Img = np.squeeze(
np.random.randn(ch, self.N, self.N) +
1j * np.random.randn(ch, self.N, self.N)
)
f_p = wavelet_op_adj.op(Img)
f = (np.random.randn(*f_p.shape) +
1j * np.random.randn(*f_p.shape))
> I_p = wavelet_op_adj.adj_op(f)
mri/tests/test_wavelet_adjoint.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pysap.extensions.transform.sym8 object at 0x7f7d42a5d940>
analysis_data = [array([[-0.71789798+0.40494647j, 0.92025523+1.58272514j,
-0.35646498-1.20388159j, 0.32289798-1.23285284j,
... -1.55343428e+00-1.37115525e+00j, 4.49025948e-01+5.69065856e-01j,
-9.15547881e-01-1.51666483e+00j]]), ...]
def _set_analysis_data(self, analysis_data):
""" Set the decomposition coefficients array.
Parameters
----------
analysis_data: lsit of nd-array
decomposition coefficients array.
"""
if self.verbose > 0 and self._analysis_data is not None:
print("[info] Replacing existing decomposition coefficients "
"array.")
> if len(analysis_data) != sum(self.nb_band_per_scale):
E TypeError: 'NoneType' object is not iterable
/usr/share/miniconda/envs/test/lib/python3.6/site-packages/pysap/base/transform.py:266: TypeError
This TypeError
is spawned from bad pop from the queue implementation and its poping and pushing here:
This resolves #124 and #119
This is still a draft PR.
Steps left: