<jupyter_start><jupyter_text>Split FG_ISA dimension of 2dseq data set into multiple data setsThis example demonstrates the **split functionality** implemented on the 2dseq dataset. It allows to **divide a single 2dseq data set into several data sets, each containing one subset of data and metadata.** All the resulting data sets, are consistent, they can be written do drive and/or further worked with, for instance, converted to NIfTI.Data for this example will be available soon.   Setup<jupyter_code>from brukerapi.dataset import Dataset

dataset = Dataset('path_to_data')<jupyter_output><empty_output><jupyter_text>The **2dseq** data set has the following parameters:<jupyter_code>print(dataset.shape)
print(dataset.dim_type)
print(dataset.VisuFGOrderDesc)
print(dataset.VisuFGElemComment)
print(dataset.VisuCoreDataUnits)<jupyter_output>(128, 128, 5, 5)
['spatial', 'spatial', 'FG_ISA', 'FG_SLICE']
[[5, '<FG_ISA>', '<T2 relaxation: y=A+C*exp(-t/T2)>', 0, 2], [5, '<FG_SLICE>', '<>', 2, 2]]
['<signal intensity>' '<std dev of signal intensity>'
 '<T2 relaxation time>' '<std dev of T2 relaxation time>'
 '<std dev of the fit>']
['<>' '<>' '<ms>' '<ms>' '<>']<jupyter_text>SplitThe **FG_ISA** dimension contains results of T2 quantification. It is convenient these into 5 separate **2dseq** data sets. If we then convert the individual data sets into NIFTI, we can, for instance overlay the `<std dev of T2 relaxation time>` image over the `` image to see, which areas of the T2 map are not to be trusted.<jupyter_code>from brukerapi.splitters import FrameGroupSplitter

datasets = FrameGroupSplitter('FG_ISA').split(dataset)<jupyter_output><empty_output><jupyter_text>Each of the splitted data sets now contains data from the individual frame packages:<jupyter_code>print("ORIGINAL DATASET")
print(dataset.shape)
print(dataset.dim_type)
print(dataset.VisuFGOrderDesc)
print(dataset.VisuFGElemComment)
print(dataset.VisuCoreDataUnits)
print("FG_ISA_0")
print(datasets[0].shape)
print(datasets[0].dim_type)
print(datasets[0].VisuFGOrderDesc)
print(datasets[0].VisuFGElemComment)
print(datasets[0].VisuCoreDataUnits)
print("FG_ISA_1")
print(datasets[1].shape)
print(datasets[1].dim_type)
print(datasets[1].VisuFGOrderDesc)
print(datasets[1].VisuFGElemComment)
print(datasets[1].VisuCoreDataUnits)
print("FG_ISA_2")
print(datasets[2].shape)
print(datasets[2].dim_type)
print(datasets[2].VisuFGOrderDesc)
print(datasets[2].VisuFGElemComment)
print(datasets[2].VisuCoreDataUnits)
print("FG_ISA_3")
print(datasets[3].shape)
print(datasets[3].dim_type)
print(datasets[3].VisuFGOrderDesc)
print(datasets[3].VisuFGElemComment)
print(datasets[3].VisuCoreDataUnits)
print("FG_ISA_4")
print(datasets[4].shape)
print(datasets[4].dim_type)
print(datasets[4].VisuFGOrderDesc)
print(datasets[4].VisuFGElemComment)
print(datasets[4].VisuCoreDataUnits)<jupyter_output>ORIGINAL DATASET
(128, 128, 5, 5)
['spatial', 'spatial', 'FG_ISA', 'FG_SLICE']
[[5, '<FG_ISA>', '<T2 relaxation: y=A+C*exp(-t/T2)>', 0, 2], [5, '<FG_SLICE>', '<>', 2, 2]]
['<signal intensity>' '<std dev of signal intensity>'
 '<T2 relaxation time>' '<std dev of T2 relaxation time>'
 '<std dev of the fit>']
['<>' '<>' '<ms>' '<ms>' '<>']
FG_ISA_0
(128, 128, 5)
['spatial', 'spatial', 'FG_SLICE']
[5, '<FG_SLICE>', '<>', 2, 2]
<signal intensity>
<>
FG_ISA_1
(128, 128, 5)
['spatial', 'spatial', 'FG_SLICE']
[5, '<FG_SLICE>', '<>', 2, 2]
<std dev of signal intensity>
<>
FG_ISA_2
(128, 128, 5)
['spatial', 'spatial', 'FG_SLICE']
[5, '<FG_SLICE>', '<>', 2, 2]
<T2 relaxation time>
<ms>
FG_ISA_3
(128, 128, 5)
['spatial', 'spatial', 'FG_SLICE']
[5, '<FG_SLICE>', '<>', 2, 2]
<std dev of T2 relaxation time>
<ms>
FG_ISA_4
(128, 128, 5)
['spatial', 'spatial', 'FG_SLICE']
[5, '<FG_SLICE>', '<>', 2, 2]
<std dev of the fit>
<>
{'fraction_non_alphanumeric': 0.16688741721854305, 'fraction_numerical': 0.034966887417218546, 'mean_word_length': 7.640732265446224, 'pattern_counts': {'":': 0, '<': 64, '<?xml version=': 0, '>': 64, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '644952', 'license': 'MIT', 'n_tokens_mistral': 1529, 'n_tokens_neox': 1412, 'n_words': 361, 'path': 'examples/split_fg_isa_demo.ipynb', 'repo_name': 'MIRCen/brukerapi-python', 'size': '3775'}