brukerapi 0.1.9__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. brukerapi-0.2.0/PKG-INFO +244 -0
  2. {brukerapi-0.1.9 → brukerapi-0.2.0}/README.rst +19 -4
  3. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/cli.py +21 -30
  4. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/config/properties_fid_core.json +63 -6
  5. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/config/properties_rawdata_core.json +16 -9
  6. brukerapi-0.2.0/brukerapi/config/properties_rawdata_custom.json +65 -0
  7. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/data.py +2 -3
  8. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/dataset.py +159 -158
  9. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/exceptions.py +57 -84
  10. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/folders.py +183 -169
  11. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/jcampdx.py +223 -237
  12. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/mergers.py +15 -22
  13. brukerapi-0.2.0/brukerapi/schemas.py +639 -0
  14. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/splitters.py +100 -87
  15. brukerapi-0.2.0/brukerapi/utils.py +61 -0
  16. brukerapi-0.2.0/brukerapi.egg-info/PKG-INFO +244 -0
  17. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi.egg-info/SOURCES.txt +2 -1
  18. brukerapi-0.2.0/brukerapi.egg-info/requires.txt +13 -0
  19. brukerapi-0.2.0/pyproject.toml +80 -0
  20. {brukerapi-0.1.9 → brukerapi-0.2.0}/setup.cfg +1 -1
  21. {brukerapi-0.1.9 → brukerapi-0.2.0}/test/test_dataset.py +24 -21
  22. brukerapi-0.2.0/test/test_exceptions.py +47 -0
  23. {brukerapi-0.1.9 → brukerapi-0.2.0}/test/test_jcampdx.py +19 -17
  24. brukerapi-0.2.0/test/test_random_access.py +42 -0
  25. brukerapi-0.2.0/test/test_split.py +28 -0
  26. brukerapi-0.1.9/PKG-INFO +0 -10
  27. brukerapi-0.1.9/brukerapi/config/properties_rawdata_custom.json +0 -1
  28. brukerapi-0.1.9/brukerapi/schemas.py +0 -696
  29. brukerapi-0.1.9/brukerapi/utils.py +0 -62
  30. brukerapi-0.1.9/brukerapi.egg-info/PKG-INFO +0 -10
  31. brukerapi-0.1.9/brukerapi.egg-info/requires.txt +0 -2
  32. brukerapi-0.1.9/setup.py +0 -21
  33. brukerapi-0.1.9/test/test_random_access.py +0 -44
  34. brukerapi-0.1.9/test/test_split.py +0 -18
  35. {brukerapi-0.1.9 → brukerapi-0.2.0}/LICENSE +0 -0
  36. {brukerapi-0.1.9 → brukerapi-0.2.0}/MANIFEST.in +0 -0
  37. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/__init__.py +0 -0
  38. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/config/properties_2dseq_core.json +0 -0
  39. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/config/properties_2dseq_custom.json +0 -0
  40. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/config/properties_fid_custom.json +0 -0
  41. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/config/properties_traj_core.json +0 -0
  42. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi/config/properties_traj_custom.json +0 -0
  43. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi.egg-info/dependency_links.txt +0 -0
  44. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi.egg-info/entry_points.txt +0 -0
  45. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi.egg-info/not-zip-safe +0 -0
  46. {brukerapi-0.1.9 → brukerapi-0.2.0}/brukerapi.egg-info/top_level.txt +0 -0
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.4
2
+ Name: brukerapi
3
+ Version: 0.2.0
4
+ Summary: Bruker API
5
+ Author-email: Tomas Psorn <tomaspsorn@isibrno.cz>, Jiri Vitous <vitous@isibrno.cz>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/isi-nmr/brukerapi-python
8
+ Project-URL: Download, https://github.com/isi-nmr/brukerapi-python/releases/latest
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/x-rst
11
+ License-File: LICENSE
12
+ Requires-Dist: numpy<2; python_version < "3.9"
13
+ Requires-Dist: numpy>=1.26.0; python_version >= "3.9"
14
+ Requires-Dist: pyyaml
15
+ Provides-Extra: dev
16
+ Requires-Dist: pytest; extra == "dev"
17
+ Requires-Dist: zenodo_get; extra == "dev"
18
+ Requires-Dist: ruff; extra == "dev"
19
+ Requires-Dist: pytest-cov; extra == "dev"
20
+ Dynamic: license-file
21
+
22
+ brukerapi-python
23
+ ======================
24
+
25
+ .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3831320.svg
26
+ :target: https://doi.org/10.5281/zenodo.3831320
27
+
28
+ .. image:: https://github.com/isi-nmr/brukerapi-python/workflows/CI/badge.svg
29
+ :target: https://doi.org/10.5281/zenodo.3831320
30
+
31
+ .. image:: https://readthedocs.org/projects/bruker-api/badge/?version=latest
32
+ :target: https://bruker-api.readthedocs.io/en/latest/?badge=latest
33
+ :alt: Documentation Status
34
+
35
+
36
+ A Python package providing I/O interface for Bruker data sets.
37
+
38
+ tl;dr
39
+ ========
40
+
41
+ Install using pip:
42
+
43
+ .. code-block:: shell
44
+
45
+ pip install brukerapi
46
+
47
+ Load any **data set**:
48
+
49
+ .. code-block:: python
50
+
51
+ from brukerapi.dataset import Dataset
52
+ dataset = Dataset('{path}/2dseq') # create data set, works for fid, 2dseq, rawdata.x, ser
53
+ dataset.data # access data array
54
+ dataset.VisuCoreSize # get a value of a single parameter
55
+
56
+ Load an entire **study**:
57
+
58
+ .. code-block:: python
59
+
60
+ from brukerapi.folders import Study
61
+ study = Study('{path_to_study_folder}')
62
+ dataset = study.get_dataset(exp_id='1', proc_id='1')
63
+
64
+ # get_dataset returns an empty dataset
65
+ # in order to load data into the data set, you can either use the context manager:
66
+
67
+ with dataset as d:
68
+ d.data # access data array
69
+ d.VisuCoreSize # get a value of a parameter
70
+
71
+ # or the load function
72
+ dataset.load()
73
+ dataset.data # access data array
74
+ dataset.VisuCoreSize # get a value of a single parameter
75
+
76
+ Load a parametric file:
77
+
78
+ .. code-block:: python
79
+
80
+ from brukerapi.jcampdx import JCAMPDX
81
+
82
+ parameters = JCAMPDX('path_to_scan/method')
83
+
84
+ TR = data.params["PVM_RepetitionTime"].value # This way
85
+ TR = data.get_value("PVM_RepetitionTime") # Or this way
86
+
87
+
88
+
89
+
90
+
91
+ Features
92
+ ========
93
+
94
+ * **I/O** interface for **fid** data sets
95
+ * **I/O** interface for **2dseq** data sets
96
+ * **I/O** interface for **ser** data sets
97
+ * **I/O** interface for **rawdata** data sets
98
+ * **Random access** for **fid** and **2dseq** data sets
99
+ * **Split** operation implemented over **2dseq** data sets
100
+ * **Filter** operation implemented over Bruker **folders** (allowing you to work with a subset of your study only)
101
+
102
+ Examples
103
+ ========
104
+
105
+ * How to `read <examples/read_fid.ipynb>`_ a Bruker fid, 2dseq, rawdata, or ser file
106
+ * How to `split slice packages <examples/split_sp_demo.ipynb>`_ of a 2dseq data set
107
+ * How to `split FG_ECHO <examples/split_fg_echo_demo.ipynb>`_ of a 2dseq data set
108
+ * How to `split FG_ISA <examples/examples/split_fg_isa_demo.ipynb>`_ of a 2dseq data set
109
+
110
+ Documentation
111
+ ==============
112
+
113
+ Online `documentation <https://bruker-api.readthedocs.io/en/latest/>`_ of the API is available at Read The Docs.
114
+
115
+
116
+ Install
117
+ =======
118
+ Using pip:
119
+
120
+ .. code-block:: shell
121
+
122
+ pip install brukerapi
123
+
124
+ From source:
125
+
126
+ .. code-block:: shell
127
+
128
+ git clone https://github.com/isi-nmr/brukerapi-python.git
129
+ cd brukerapi-python
130
+ python setup.py build
131
+ python setup.py install
132
+
133
+ Testing
134
+ ========
135
+ To ensure reliability, every commit to this repository is tested against the following, publicly available
136
+ data sets:
137
+
138
+ * `BrukerAPI test data set (Bruker ParaVision v5.1) <https://doi.org/10.5281/zenodo.3899268>`_
139
+ * `BrukerAPI test data set (Bruker ParaVision v6.0.1) <https://doi.org/10.5281/zenodo.3894651>`_
140
+ * `bruker2nifti_qa data set <https://gitlab.com/naveau/bruker2nifti_qa>`_
141
+
142
+ Compatibility
143
+ =============
144
+
145
+ The API was tested using various data sets obtained by **ParaVision 5.1**, **6.0.1** and **360**. It it is compatible
146
+ with the following data set types from individual ParaVision versions.
147
+
148
+ ParaVision v5.1
149
+ """""""""""""""
150
+ Compatible data set types:
151
+
152
+ * **fid**
153
+ * **2dseq**
154
+ * **rawdata.job0**
155
+ * **rawdata.Navigator**
156
+
157
+ Compatible pulse sequences for **fid** data sets:
158
+
159
+ * FLASH.ppg
160
+ * MGE.ppg
161
+ * MSME.ppg
162
+ * RARE.ppg
163
+ * FAIR_RARE.ppg
164
+ * RAREVTR.ppg
165
+ * RAREst.ppg
166
+ * MDEFT.ppg
167
+ * FISP.ppg
168
+ * FLOWMAP.ppg
169
+ * DtiStandard.ppg
170
+ * EPI.ppg
171
+ * FAIR_EPI.ppg
172
+ * DtiEpi.ppg
173
+ * T1_EPI.ppg
174
+ * T2_EPI.ppg
175
+ * T2S_EPI.ppg
176
+ * SPIRAL.ppg
177
+ * DtiSpiral.ppg
178
+ * UTE.ppg
179
+ * UTE3D.ppg
180
+ * ZTE.ppg
181
+ * CSI.ppg
182
+ * FieldMap.ppg
183
+ * NSPECT.ppg
184
+ * PRESS.ppg
185
+ * STEAM.ppg
186
+ * igFLASH.ppg
187
+
188
+ ParaVision v6.0.1 and v7.0.0
189
+ """""""""""""""""""""""""""""""
190
+ Compatible data set types:
191
+
192
+ * **fid**
193
+ * **2dseq**
194
+ * **rawdata.job0**
195
+ * **rawdata.Navigator**
196
+
197
+ Compatible pulse sequences for **fid** data sets:
198
+
199
+ * FLASH.ppg,
200
+ * FLASHAngio.ppg
201
+ * IgFLASH.ppg
202
+ * MGE.ppg
203
+ * MSME.ppg
204
+ * RARE.ppg
205
+ * FAIR_RARE.ppg
206
+ * RAREVTR.ppg
207
+ * RAREst.ppg
208
+ * MDEFT.ppg
209
+ * FISP.ppg
210
+ * FLOWMAP.ppg
211
+ * DtiStandard.ppg
212
+ * EPI.ppg
213
+ * FAIR_EPI.ppg
214
+ * CASL_EPI.ppg
215
+ * DtiEpi.ppg
216
+ * T1_EPI.ppg
217
+ * T2_EPI.ppg
218
+ * T2S_EPI.ppg
219
+ * SPIRAL.ppg
220
+ * DtiSpiral.ppg
221
+ * UTE.ppg
222
+ * UTE3D.ppg
223
+ * ZTE.ppg
224
+ * CSI.ppg
225
+ * FieldMap.ppg
226
+ * SINGLEPULSE.ppg
227
+ * NSPECT.ppg
228
+ * EPSI.ppg
229
+ * PRESS.ppg
230
+ * STEAM.ppg
231
+ * ISIS.ppg
232
+ * CPMG.ppg
233
+ * RfProfile.ppg
234
+
235
+
236
+ ParaVision 360 v1.1 v3.0-v3.7
237
+ """""""""""""""""""""""""""""""""
238
+ Reading rawdata is supported only in a basic form, no reshaping into k-space is supported at the moment.
239
+ Compatible data set types:
240
+
241
+ * **2dseq**
242
+ * **rawdata.job0**
243
+ * **rawdata.Navigator**
244
+
@@ -11,6 +11,7 @@ brukerapi-python
11
11
  :target: https://bruker-api.readthedocs.io/en/latest/?badge=latest
12
12
  :alt: Documentation Status
13
13
 
14
+
14
15
  A Python package providing I/O interface for Bruker data sets.
15
16
 
16
17
  tl;dr
@@ -51,6 +52,18 @@ Load an entire **study**:
51
52
  dataset.data # access data array
52
53
  dataset.VisuCoreSize # get a value of a single parameter
53
54
 
55
+ Load a parametric file:
56
+
57
+ .. code-block:: python
58
+
59
+ from brukerapi.jcampdx import JCAMPDX
60
+
61
+ parameters = JCAMPDX('path_to_scan/method')
62
+
63
+ TR = data.params["PVM_RepetitionTime"].value # This way
64
+ TR = data.get_value("PVM_RepetitionTime") # Or this way
65
+
66
+
54
67
 
55
68
 
56
69
 
@@ -151,8 +164,8 @@ Compatible pulse sequences for **fid** data sets:
151
164
  * STEAM.ppg
152
165
  * igFLASH.ppg
153
166
 
154
- ParaVision v6.0.1
155
- """""""""""""""""
167
+ ParaVision v6.0.1 and v7.0.0
168
+ """""""""""""""""""""""""""""""
156
169
  Compatible data set types:
157
170
 
158
171
  * **fid**
@@ -198,8 +211,10 @@ Compatible pulse sequences for **fid** data sets:
198
211
  * CPMG.ppg
199
212
  * RfProfile.ppg
200
213
 
201
- ParaVision v360
202
- """""""""""""""
214
+
215
+ ParaVision 360 v1.1 v3.0-v3.7
216
+ """""""""""""""""""""""""""""""""
217
+ Reading rawdata is supported only in a basic form, no reshaping into k-space is supported at the moment.
203
218
  Compatible data set types:
204
219
 
205
220
  * **2dseq**
@@ -1,18 +1,17 @@
1
- from argparse import ArgumentParser
2
- from brukerapi.splitters import *
3
- from brukerapi.folders import *
4
1
  import sys
2
+ from argparse import ArgumentParser
5
3
 
4
+ from brukerapi.folders import Dataset, Filter, Folder, Path
5
+ from brukerapi.splitters import FrameGroupSplitter, SlicePackageSplitter
6
6
 
7
- def main():
8
- """
9
7
 
10
- """
11
- parser = ArgumentParser(prog='bruker')
8
+ def main():
9
+ """ """
10
+ parser = ArgumentParser(prog="bruker")
12
11
  subparsers = parser.add_subparsers()
13
12
 
14
13
  # report sub-command
15
- parser_report = subparsers.add_parser('report', help='export properties of data sets to json, or yaml file')
14
+ parser_report = subparsers.add_parser("report", help="export properties of data sets to json, or yaml file")
16
15
  parser_report.add_argument(
17
16
  "-i",
18
17
  "--input",
@@ -27,27 +26,22 @@ def main():
27
26
  parser_report.add_argument(
28
27
  "-f",
29
28
  "--format",
30
- choices=['json', 'yml'],
31
- default='json',
29
+ choices=["json", "yml"],
30
+ default="json",
32
31
  help="Format of report files",
33
32
  )
34
33
  parser_report.add_argument(
35
34
  "-p",
36
35
  "--props",
37
36
  type=str,
38
- nargs='+',
37
+ nargs="+",
39
38
  help="List of properties to include",
40
39
  )
41
- parser_report.add_argument(
42
- "-v",
43
- "--verbose",
44
- help="make verbose",
45
- action="store_true"
46
- )
40
+ parser_report.add_argument("-v", "--verbose", help="make verbose", action="store_true")
47
41
  parser_report.set_defaults(func=report)
48
42
 
49
43
  # report sub-command
50
- parser_split = subparsers.add_parser('split', help='split dataset into several sub-datasets')
44
+ parser_split = subparsers.add_parser("split", help="split dataset into several sub-datasets")
51
45
  parser_split.add_argument(
52
46
  "-i",
53
47
  "--input",
@@ -62,13 +56,13 @@ def main():
62
56
  dest="path_out",
63
57
  type=str,
64
58
  required=False,
65
- help="Folder to save splitted data sets",
59
+ help="Folder to save split data sets",
66
60
  )
67
61
  parser_split.add_argument(
68
62
  "-s",
69
63
  "--slice_package",
70
64
  dest="slice_package",
71
- action='store_true',
65
+ action="store_true",
72
66
  help="Split by slice package",
73
67
  )
74
68
  parser_split.add_argument(
@@ -81,7 +75,7 @@ def main():
81
75
  parser_split.set_defaults(func=split)
82
76
 
83
77
  # filter sub-command
84
- parser_filter = subparsers.add_parser('filter', help='get files based on querry')
78
+ parser_filter = subparsers.add_parser("filter", help="get files based on query")
85
79
  parser_filter.add_argument(
86
80
  "-i",
87
81
  "--input",
@@ -108,8 +102,6 @@ def main():
108
102
  func(args)
109
103
 
110
104
 
111
-
112
-
113
105
  def split(args):
114
106
  """
115
107
  split sub-command
@@ -145,13 +137,12 @@ def report(args):
145
137
  elif output.is_dir():
146
138
  # folder to folder
147
139
  Folder(input).report(path_out=output, format_=args.format, props=args.props, verbose=args.verbose)
148
- else:
149
- # dataset in-place
150
- if output is None:
151
- Dataset(input, add_parameters=['subject']).report(props=args.props, verbose=args.verbose)
152
- # dataset to folder, or dataset to file
153
- elif output.is_dir():
154
- Dataset(input, add_parameters=['subject']).report(path=output, props=args.props, verbose=args.verbose)
140
+ # dataset in-place
141
+ elif output is None:
142
+ Dataset(input, add_parameters=["subject"]).report(props=args.props, verbose=args.verbose)
143
+ # dataset to folder, or dataset to file
144
+ elif output.is_dir():
145
+ Dataset(input, add_parameters=["subject"]).report(path=output, props=args.props, verbose=args.verbose)
155
146
 
156
147
 
157
148
  def filter(args):
@@ -223,9 +223,7 @@
223
223
  ["#PULPROG[1:-1]",
224
224
  [
225
225
  "EPI.ppg",
226
- "DtiEpi.ppg",
227
226
  "navigatorEPI_OM.ppg",
228
- "EPSI.ppg",
229
227
  "FAIR_EPI.ppg",
230
228
  "CASL_EPI.ppg",
231
229
  "T1_EPI.ppg",
@@ -236,6 +234,18 @@
236
234
  "#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
237
235
  ]
238
236
  },
237
+ {
238
+ "cmd": "'dEPI'" ,
239
+ "conditions": [
240
+ ["#PULPROG[1:-1]",
241
+ [
242
+ "DtiEpi.ppg",
243
+ "EPSI.ppg"
244
+ ]
245
+ ],
246
+ "#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
247
+ ]
248
+ },
239
249
  {
240
250
  "cmd": "'SPECTROSCOPY'" ,
241
251
  "conditions": [
@@ -322,7 +332,13 @@
322
332
  ]
323
333
  },
324
334
  {
325
- "cmd": "#NR",
335
+ "cmd": "#NSegments*#NI*#NR*(#ACQ_size[2] if len(#ACQ_size)>2 else 1)",
336
+ "conditions": [
337
+ "@scheme_id=='dEPI'"
338
+ ]
339
+ },
340
+ {
341
+ "cmd": "#NR*#NI",
326
342
  "conditions": [
327
343
  "@scheme_id=='SPECTROSCOPY'"
328
344
  ]
@@ -430,9 +446,23 @@
430
446
  "@scheme_id=='EPI'"
431
447
  ]
432
448
  },
449
+ {
450
+ "cmd": [
451
+ "#PVM_EncMatrix[0] * #PVM_EncMatrix[1] // #NSegments",
452
+ "#PVM_EncNReceivers",
453
+ "#NSegments",
454
+ "#NI",
455
+ "#NR",
456
+ "#ACQ_size[2] if len(#ACQ_size)>2 else 1"
457
+ ],
458
+ "conditions": [
459
+ "@scheme_id=='dEPI'"
460
+ ]
461
+ },
433
462
  {
434
463
  "cmd": [
435
464
  "#ACQ_size.tuple[0] // 2",
465
+ "#NI",
436
466
  "#NR"
437
467
  ],
438
468
  "conditions": [
@@ -527,11 +557,24 @@
527
557
  {
528
558
  "cmd": [0,2,3,4,1],
529
559
  "conditions": [
530
- "@scheme_id in ['EPI', 'SPIRAL']"
560
+ "@scheme_id in ['SPIRAL']"
561
+ ]
562
+ },
563
+ {
564
+ "cmd": [0,2,3,4,1],
565
+ "conditions": [
566
+ "@scheme_id in ['EPI']"
567
+ ]
568
+ },
569
+ {
570
+ "cmd": [0,2,3,4,1,5],
571
+ "conditions": [
572
+ "@scheme_id in ['dEPI']"
531
573
  ]
532
574
  },
575
+
533
576
  {
534
- "cmd": [0,1],
577
+ "cmd": [0,1,2],
535
578
  "conditions": [
536
579
  "@scheme_id=='SPECTROSCOPY'"
537
580
  ]
@@ -604,9 +647,23 @@
604
647
  "@scheme_id=='EPI'"
605
648
  ]
606
649
  },
650
+ {
651
+ "cmd": [
652
+ "#PVM_EncMatrix[0]",
653
+ "#PVM_EncMatrix[1]",
654
+ "#NI",
655
+ "#NR",
656
+ "#PVM_EncNReceivers",
657
+ "#ACQ_size[2] if len(#ACQ_size)>2 else 1"
658
+ ],
659
+ "conditions": [
660
+ "@scheme_id=='dEPI'"
661
+ ]
662
+ },
607
663
  {
608
664
  "cmd": [
609
665
  "#ACQ_size.tuple[0] // 2",
666
+ "#NI",
610
667
  "#NR"
611
668
  ],
612
669
  "conditions": [
@@ -701,7 +758,7 @@
701
758
  "'channel'"
702
759
  ],
703
760
  "conditions": [
704
- ["@scheme_id",["CART_2D","RADIAL","EPI","SPIRAL","ZTE"]]
761
+ ["@scheme_id",["CART_2D","RADIAL","EPI","dEPI","SPIRAL","ZTE"]]
705
762
  ]
706
763
  },
707
764
  {
@@ -5,7 +5,7 @@
5
5
  "conditions": [
6
6
  "#GO_raw_data_format=='GO_32BIT_SGN_INT'",
7
7
  "#BYTORDA=='little'",
8
- ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>"]]
8
+ ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
9
9
  ]
10
10
  },
11
11
  {
@@ -13,7 +13,7 @@
13
13
  "conditions": [
14
14
  "#GO_raw_data_format=='GO_16BIT_SGN_INT'",
15
15
  "#BYTORDA=='little'",
16
- ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>"]]
16
+ ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
17
17
  ]
18
18
  },
19
19
  {
@@ -21,7 +21,7 @@
21
21
  "conditions": [
22
22
  "#GO_raw_data_format=='GO_32BIT_FLOAT'",
23
23
  "#BYTORDA=='little'",
24
- ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>"]]
24
+ ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
25
25
  ]
26
26
  },
27
27
  {
@@ -29,7 +29,7 @@
29
29
  "conditions": [
30
30
  "#GO_raw_data_format=='GO_32BIT_SGN_INT'",
31
31
  "#BYTORDA=='big'",
32
- ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>"]]
32
+ ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
33
33
  ]
34
34
  },
35
35
  {
@@ -37,7 +37,7 @@
37
37
  "conditions": [
38
38
  "#GO_raw_data_format=='GO_16BIT_SGN_INT'",
39
39
  "#BYTORDA=='big'",
40
- ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>"]]
40
+ ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
41
41
  ]
42
42
  },
43
43
  {
@@ -45,7 +45,7 @@
45
45
  "conditions": [
46
46
  "#GO_raw_data_format=='GO_32BIT_FLOAT'",
47
47
  "#BYTORDA=='big'",
48
- ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>"]]
48
+ ["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
49
49
  ]
50
50
  },
51
51
  {
@@ -53,7 +53,7 @@
53
53
  "conditions": [
54
54
  "#ACQ_word_size=='_32_BIT'",
55
55
  "#BYTORDA=='little'",
56
- ["#ACQ_sw_version",["<PV-360.1.1>"]]
56
+ ["#ACQ_sw_version",["<PV-360.1.1>","<PV-360.3.0>","<PV-360.3.1>","<PV-360.3.2>","<PV-360.3.3>","<PV-360.3.4>","<PV-360.3.5>","<PV-360.3.6>","<PV-360.3.7>"]]
57
57
  ]
58
58
  }
59
59
  ],
@@ -61,9 +61,16 @@
61
61
  {
62
62
  "cmd": "#ACQ_jobs.primed_dict(7)['<{}>'.format(@subtype)]",
63
63
  "conditions": [
64
- "#ACQ_sw_version in ['<PV-360.1.1>']"
64
+ ["#ACQ_sw_version",["<PV-360.1.1>"]]
65
65
  ]
66
66
  },
67
+ {
68
+ "cmd": "[v for v in #ACQ_jobs.nested if v[-1] == '<{}>'.format(@subtype)][0]",
69
+ "conditions": [
70
+ ["#ACQ_sw_version",["<PV-360.3.0>","<PV-360.3.1>","<PV-360.3.2>","<PV-360.3.3>","<PV-360.3.4>","<PV-360.3.5>","<PV-360.3.6>","<PV-360.3.7>"]]
71
+ ]
72
+ },
73
+
67
74
  {
68
75
  "cmd": "#ACQ_jobs.nested[0]",
69
76
  "conditions": [
@@ -88,7 +95,7 @@
88
95
  ],
89
96
  "shape_storage": [
90
97
  {
91
- "cmd": "(@job_desc[0],) + (@job_desc[3],)",
98
+ "cmd": "(@job_desc[0],) + (#PVM_EncNReceivers,) + (@job_desc[3],)",
92
99
  "conditions": []
93
100
  }
94
101
  ]
@@ -0,0 +1,65 @@
1
+ {
2
+ "subj_id": [
3
+ {
4
+ "cmd": "#SUBJECT_id[1:-1]",
5
+ "conditions": [
6
+
7
+ ]
8
+ },
9
+ {
10
+ "cmd": "''",
11
+ "conditions": [
12
+
13
+ ]
14
+ }
15
+ ],
16
+ "study_id": [
17
+ {
18
+ "cmd": "str(#SUBJECT_study_nr)",
19
+ "conditions": [
20
+
21
+ ]
22
+ },
23
+ {
24
+ "cmd": "''",
25
+ "conditions": [
26
+
27
+ ]
28
+ }
29
+ ],
30
+ "exp_id": [
31
+ {
32
+ "cmd": "@path.parent.name",
33
+ "conditions": [
34
+
35
+ ]
36
+ },
37
+ {
38
+ "cmd": "''",
39
+ "conditions": [
40
+
41
+ ]
42
+ }
43
+ ],
44
+ "id": [
45
+ {
46
+ "cmd": "f'RawData_{@subtype}_{@exp_id}_{@subj_id}_{@study_id}'",
47
+ "conditions": [
48
+ ]
49
+ }
50
+ ],
51
+ "TR": [
52
+ {
53
+ "cmd": "#PVM_RepetitionTime",
54
+ "conditions": [],
55
+ "unit": "ms"
56
+ }
57
+ ],
58
+ "TE": [
59
+ {
60
+ "cmd": "#PVM_EchoTime",
61
+ "conditions": [],
62
+ "unit": "ms"
63
+ }
64
+ ]
65
+ }
@@ -1,8 +1,7 @@
1
- class DataRandomAccess():
2
-
1
+ class DataRandomAccess:
3
2
  def __init__(self, dataset):
4
3
  self._dataset = dataset
5
4
  self._scheme = dataset._scheme
6
5
 
7
6
  def __getitem__(self, slice):
8
- return self._scheme.ra(slice)
7
+ return self._scheme.ra(slice)