<jupyter_start><jupyter_text>How to read a fid fileTo read a fid file, just simply pass its path to a constructor of the `Dataset` class.The aim of `Dataset` class is to wrap around all the complexity of data and meta data storage. It takes the **fid** specified by user, the **method** and **acqp** files located in the same folder and provides unified access both to the data array and parameters.  Data for this example is downloaded from:https://gitlab.com/naveau/bruker2nifti_qa<jupyter_code>from brukerapi.dataset import Dataset
from pathlib import Path

# path to data cloned from
data_path = Path('C:/data/bruker2nifti_qa')

# both constructors are possible
dataset = Dataset(data_path / Path('raw/Cyceron_DWI/20170719_075627_Lego_1_1/2/fid'))
# dataset = Dataset(data_path / 'raw/Cyceron_DWI/20170719_075627_Lego_1_1/2')<jupyter_output><empty_output><jupyter_text>Once dataset is created, it is possible to access the data array.<jupyter_code>data = dataset.data
print(data.shape)<jupyter_output>(128, 80, 5, 9, 4)<jupyter_text>The `dim_type` property of `Dataset` class can be used in order to make sense out of individual dimensions of the data array.<jupyter_code>print(dataset.dim_type)<jupyter_output>['kspace_encode_step_0', 'kspace_encode_step_1', 'slice', 'repetition', 'channel']<jupyter_text>Several most wanted properties of MR measurement, such as the echo time, the flip angle, etc. are implemented as dataset properties.<jupyter_code>print(dataset.TE)
print(dataset.TR)
print(dataset.flip_angle)
print(dataset.sw)
print(dataset.transmitter_freq)<jupyter_output>34
2000
90
208333.333333333
300.343848550623<jupyter_text>Other parameters can be accessed using the dot notation. It is only possible to access parameters stored in jcamp-dx files related to given data set type. A **fid** data set only allows to access parameters from the **method** and **acqp** files.<jupyter_code># get parameter object
print(dataset.PVM_EncSteps1)<jupyter_output>[-16 -12  -8  -4   0   4   8  12  16  20  24  28  32  36  40  44  48  52
  56  60 -15 -11  -7  -3   1   5   9  13  17  21  25  29  33  37  41  45
  49  53  57  61 -14 -10  -6  -2   2   6  10  14  18  22  26  30  34  38
  42  46  50  54  58  62 -13  -9  -5  -1   3   7  11  15  19  23  27  31
  35  39  43  47  51  55  59  63]<jupyter_text>It is possible to augment `Dataset` by other parameter files, but only files in the same reco, or respective scan folders are allowed. Please bear in mind, that this augmentation might lead to a loss of uniqueness in the parameter space.You can use it for instance to access reconstruction parameters, or the shape of excitation pulse.<jupyter_code>dataset.add_parameters('reco')
print(dataset.RECO_inp_size)
dataset.add_parameters('spnam40')
print(dataset.XYPOINTS)<jupyter_output>[ 0 80]
[[  1.036651   0.         1.074475 ...   0.       100.         0.      ]
 [100.         0.       100.       ...   0.         1.036651   0.      ]]
StarcoderdataJupyterStructuredCleanDedup