<jupyter_start><jupyter_text>auto_respense<jupyter_code>#auto_response with roi_radius=10
response_a1, ratio_a1, nvoxel_a1 = auto_response(gtab, data, 
                                    roi_radius=10, 
                                    fa_thr=0.7, 
                                    roi_center=None, 
                                    return_number_of_voxels=True)

print('the response function is\n{}\n'.format(response_a1)
      +'the ratio is {}\n'.format(ratio_a1)
      +'the number of voxel is {}'.format(nvoxel_a1))
#auto_response with roi_radius=20
response_a2, ratio_a2, nvoxel_a2 = auto_response(gtab, data, 
                                    roi_radius=20, 
                                    fa_thr=0.7, 
                                    roi_center=None, 
                                    return_number_of_voxels=True)

print('the response function is\n{}\n'.format(response_a2)
      +'the ratio is {}\n'.format(ratio_a2)
      +'the number of voxel is {}'.format(nvoxel_a2))
#auto_response with roi_radius=30
response_a3, ratio_a3, nvoxel_a3 = auto_response(gtab, data, 
                                    roi_radius=30, 
                                    fa_thr=0.7, 
                                    roi_center=None, 
                                    return_number_of_voxels=True)

print('the response function is\n{}\n'.format(response_a3)
      +'the ratio is {}\n'.format(ratio_a3)
      +'the number of voxel is {}'.format(nvoxel_a3))<jupyter_output>the response function is
(array([0.00041355, 0.00010038, 0.00010038]), 5833.895)
the ratio is 0.242722902717
the number of voxel is 3584<jupyter_text>recursive_response<jupyter_code>response_r = recursive_response(gtab, data, mask=wm, sh_order=8,
                              peak_thr=0.001, init_fa=0.08,
                              init_trace=0.0021, iter=8, convergence=0.001,
                              parallel=True)
print('the recursive response function is\n{}\n'.format(response_r))
response_r.dwi_response<jupyter_output><empty_output><jupyter_text>response_function from mask<jupyter_code>#response function from white matter mask
from dipy.reconst.csdeconv import response_from_mask
response_m, ratio_m = response_from_mask(gtab, data, mask=wm)
print('the response function from wm is\n{}\n'.format(response_m)
      +'the ratio is {}\n'.format(ratio_m))
#response function from each region in white matter mask
from dipy.reconst.csdeconv import response_from_mask
for i in range(118, 148):
    response_m, ratio_m = response_from_mask(gtab, data, mask=labels==i)
    print('the response function from region-{} is\n{}\n'.format(i, response_m)
          +'the ratio is {}\n'.format(ratio_m))<jupyter_output>the response function from region-118 is
(array([0.00043809, 0.00016432, 0.00016432]), 6270.5786)
the ratio is 0.375081383311

the response function from region-119 is
(array([0.00051548, 0.00019263, 0.00019263]), 6123.75)
the ratio is 0.373694683897

the response function from region-120 is
(array([0.00039085, 0.00017255, 0.00017255]), 7134.4673)
the ratio is 0.441480587862

the response function from region-121 is
(array([0.00037472, 0.000203  , 0.000203  ]), 6693.799)
the ratio is 0.541756183235

the response function from region-122 is
(array([0.00036748, 0.00018449, 0.00018449]), 6789.478)
the ratio is 0.502029965602

the response function from region-123 is
(array([0.00038209, 0.00015495, 0.00015495]), 6984.9365)
the ratio is 0.405524398228

the response function from region-124 is
(array([0.00035595, 0.00021202, 0.00021202]), 6458.5215)
the ratio is 0.595650616025

the response function from region-125 is
(array([0.00042735, 0.00023138, 0.00023138]), 6133.1313)
the ratio is 0.54[...]
{'fraction_non_alphanumeric': 0.10791946308724833, 'fraction_numerical': 0.134496644295302, 'mean_word_length': 2.7409638554216866, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '326034', 'license': 'Apache-2.0', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1256, 'n_words': 282, 'path': 'Response_Function_Selection_results.ipynb', 'repo_name': 'portokalh/cpipe', 'size': '3725'}