d77d4a471a1ad924ed94275c00d96544f70a5889,dipy/sims/tests/test_phantom.py,,test_snr,#,73

Before Change


                                    snr=snr)

        noise = vol - vol_w_noise
        rms_noise = np.sqrt(np.mean(noise**2))
        snr_est = mean_sig/rms_noise
        assert_array_almost_equal(snr_est, snr, decimal=3)

After Change


        
        noise = vol - vol_w_noise

        s = np.mean(vol, -1)
        n = np.std(noise, -1)
        snr_est = s/n        
        assert_array_almost_equal(np.mean(snr_est[np.isfinite(snr_est)]),
                                  snr, decimal=0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: nipy/dipy
Commit Name: d77d4a471a1ad924ed94275c00d96544f70a5889
Time: 2012-11-09
Author: arokem@gmail.com
File Name: dipy/sims/tests/test_phantom.py
Class Name:
Method Name: test_snr


Project Name: nilearn/nilearn
Commit Name: 48282d57a0f11094d71c7310898ab347e6b847b3
Time: 2019-03-25
Author: gilles.de.hollander@gmail.com
File Name: nilearn/signal.py
Class Name:
Method Name: clean


Project Name: nl8590687/ASRT_SpeechRecognition
Commit Name: 179225cd81199996d724f3333834baef850cbb33
Time: 2017-08-29
Author: 3210346136@qq.com
File Name: general_function/file_wav.py
Class Name:
Method Name: wav_scale