code: def test_gibbs_subfunction():
      # This complementary test is to make sure that Gibbs suppression
      # sub-functions are properly implemented
  
      # Testing correction along axis 0
      image_a0 = _gibbs_removal_1d(image_gibbs, axis=0)
      # After this step tv along axis 0 should provide lower values than along
      # axis 1
      tv0_a0_r, tv0_a0_l = _image_tv(image_a0, axis=0)
      tv0_a0 = np.minimum(tv0_a0_r, tv0_a0_l)
      tv1_a0_r, tv1_a0_l = _image_tv(image_a0, axis=1)
      tv1_a0 = np.minimum(tv1_a0_r, tv1_a0_l)
      # Let's check that
      mean_tv0 = np.mean(abs(tv0_a0))
      mean_tv1 = np.mean(abs(tv1_a0))
      assert_(mean_tv0 < mean_tv1)
  
      # Testing correction along axis 1
      image_a1 = _gibbs_removal_1d(image_gibbs, axis=1)
      # After this step tv along axis 1 should provide higher values than along
      # axis 0
      tv0_a1_r, tv0_a1_l = _image_tv(image_a1, axis=0)
      tv0_a1 = np.minimum(tv0_a1_r, tv0_a1_l)
      tv1_a1_r, tv1_a1_l = _image_tv(image_a1, axis=1)
      tv1_a1 = np.minimum(tv1_a1_r, tv1_a1_l)
      # Let's check that
      mean_tv0 = np.mean(abs(tv0_a1))
      mean_tv1 = np.mean(abs(tv1_a1))
      assert_(mean_tv0 > mean_tv1)
  
file_path: dipy/dipy/denoise/tests/test_gibbs.py
imports: import numpy
  from dipy.denoise.gibbs import _gibbs_removal_1d, _gibbs_removal_2d, gibbs_removal, _image_tv
  from numpy.testing import assert_, assert_array_almost_equal, assert_raises
label_desc: Use image node_id 11 for calling a global function with example usage: test_gibbs_subfunction() without return types