|
24 | 24 |
|
25 | 25 |
|
26 | 26 | def test_agg_data():
|
27 |
| - """ |
28 |
| - Aggregate GIFTI data arrays into an ndarray or tuple of ndarray |
29 |
| -
|
30 |
| - Examples |
31 |
| - -------- |
32 |
| -
|
33 |
| - Load two kinds of Gifti files: a surface file containing two types of intent code; |
34 |
| - a functional file storing time series data only. |
35 |
| -
|
36 |
| - >>> import nibabel as nib |
37 |
| - >>> from nibabel.testing import test_data |
38 |
| - >>> surf_gii_fname = test_data('gifti', 'ascii.gii') |
39 |
| - >>> surf_gii_img = nib.load(surf_gii_fname) |
40 |
| - >>> func_gii_fname = test_data('gifti', 'task.func.gii') |
41 |
| - >>> func_gii_img = nib.load(func_gii_fname) |
42 |
| -
|
43 |
| - When not passing anything to ``intent_code`` |
44 |
| -
|
45 |
| - >>> surf_gii_img.agg_data() # surface file |
46 |
| - >>> func_gii_img.agg_data() # functional file |
47 |
| -
|
48 |
| - When passig matching intend codes ``intent_code`` |
49 |
| -
|
50 |
| - >>> surf_gii_img.agg_data('pointset') # surface pointset |
51 |
| - >>> surf_gii_img.agg_data('triangle') # surface triangle |
52 |
| - >>> func_gii_img.agg_data('time series') # functional file |
53 |
| -
|
54 |
| - When passing mismatching ``intent_code``, the function return a empty ``tuple`` |
55 |
| -
|
56 |
| - >>> surf_gii_img.agg_data('time series') |
57 |
| - >>> func_gii_img.agg_data('triangle') |
58 |
| -
|
59 |
| - When passing tuple ``intent_code``, the output will follow |
60 |
| - the order of ``intent_code`` in the tuple |
61 |
| -
|
62 |
| - >>> surf_gii_img.agg_data(('pointset', 'triangle')) |
63 |
| - >>> surf_gii_img.agg_data(('triangle', 'pointset')) |
64 |
| - """ |
65 |
| - |
66 | 27 | surf_gii_fname = test_data('gifti', 'ascii.gii')
|
67 | 28 | surf_gii_img = nib.load(surf_gii_fname)
|
68 | 29 | func_gii_fname = test_data('gifti', 'task.func.gii')
|
|
0 commit comments