brukerapi 0.2.6__tar.gz → 0.3.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 (47) hide show
  1. {brukerapi-0.2.6/brukerapi.egg-info → brukerapi-0.3.0}/PKG-INFO +40 -118
  2. {brukerapi-0.2.6 → brukerapi-0.3.0}/README.rst +39 -117
  3. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/cli.py +1 -1
  4. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_2dseq_core.json +9 -1
  5. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_2dseq_custom.json +15 -3
  6. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_fid_core.json +72 -7
  7. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_fid_custom.json +3 -3
  8. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_rawdata_core.json +7 -1
  9. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_traj_core.json +1 -2
  10. brukerapi-0.3.0/brukerapi/data.py +7 -0
  11. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/dataset.py +277 -47
  12. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/exceptions.py +17 -17
  13. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/folders.py +36 -25
  14. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/jcampdx.py +173 -111
  15. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/schemas.py +187 -70
  16. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/splitters.py +1 -4
  17. {brukerapi-0.2.6 → brukerapi-0.3.0/brukerapi.egg-info}/PKG-INFO +40 -118
  18. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi.egg-info/SOURCES.txt +1 -0
  19. {brukerapi-0.2.6 → brukerapi-0.3.0}/pyproject.toml +1 -1
  20. brukerapi-0.3.0/test/test_dataset.py +827 -0
  21. {brukerapi-0.2.6 → brukerapi-0.3.0}/test/test_exceptions.py +24 -1
  22. brukerapi-0.3.0/test/test_folders.py +148 -0
  23. brukerapi-0.3.0/test/test_jcampdx.py +339 -0
  24. brukerapi-0.3.0/test/test_property_configs.py +154 -0
  25. brukerapi-0.3.0/test/test_random_access.py +20 -0
  26. brukerapi-0.3.0/test/test_rawdata.py +17 -0
  27. {brukerapi-0.2.6 → brukerapi-0.3.0}/test/test_split.py +11 -1
  28. {brukerapi-0.2.6 → brukerapi-0.3.0}/test/test_trajectory.py +11 -0
  29. brukerapi-0.2.6/brukerapi/data.py +0 -7
  30. brukerapi-0.2.6/test/test_dataset.py +0 -72
  31. brukerapi-0.2.6/test/test_folders.py +0 -34
  32. brukerapi-0.2.6/test/test_jcampdx.py +0 -42
  33. brukerapi-0.2.6/test/test_property_configs.py +0 -62
  34. brukerapi-0.2.6/test/test_random_access.py +0 -42
  35. {brukerapi-0.2.6 → brukerapi-0.3.0}/LICENSE +0 -0
  36. {brukerapi-0.2.6 → brukerapi-0.3.0}/MANIFEST.in +0 -0
  37. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/__init__.py +0 -0
  38. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_rawdata_custom.json +0 -0
  39. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/config/properties_traj_custom.json +0 -0
  40. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/mergers.py +0 -0
  41. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi/utils.py +0 -0
  42. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi.egg-info/dependency_links.txt +0 -0
  43. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi.egg-info/entry_points.txt +0 -0
  44. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi.egg-info/not-zip-safe +0 -0
  45. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi.egg-info/requires.txt +0 -0
  46. {brukerapi-0.2.6 → brukerapi-0.3.0}/brukerapi.egg-info/top_level.txt +0 -0
  47. {brukerapi-0.2.6 → brukerapi-0.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: brukerapi
3
- Version: 0.2.6
3
+ Version: 0.3.0
4
4
  Summary: Bruker API
5
5
  Author-email: Tomas Psorn <tomaspsorn@isibrno.cz>, Jiri Vitous <vitous@isibrno.cz>
6
6
  Maintainer-email: Jiri Vitous <vitous@isibrno.cz>
@@ -50,9 +50,9 @@ Load any **data set**:
50
50
  .. code-block:: python
51
51
 
52
52
  from brukerapi.dataset import Dataset
53
- dataset = Dataset('{path}/2dseq') # create data set, works for fid, 2dseq, rawdata.x
53
+ dataset = Dataset('{path}/2dseq') # also supports fid, fid_proc.64, traj, and rawdata.jobN
54
54
  dataset.data # access data array
55
- dataset.VisuCoreSize # get a value of a single parameter
55
+ dataset.get_value('VisuCoreSize') # get a parameter value
56
56
 
57
57
  Load an entire **study**:
58
58
 
@@ -62,17 +62,7 @@ Load an entire **study**:
62
62
  study = Study('{path_to_study_folder}')
63
63
  dataset = study.get_dataset(exp_id='1', proc_id='1')
64
64
 
65
- # get_dataset returns an empty dataset
66
- # in order to load data into the data set, you can either use the context manager:
67
-
68
- with dataset as d:
69
- d.data # access data array
70
- d.VisuCoreSize # get a value of a parameter
71
-
72
- # or the load function
73
- dataset.load()
74
- dataset.data # access data array
75
- dataset.VisuCoreSize # get a value of a single parameter
65
+ dataset.data # Study loads datasets by default
76
66
 
77
67
  Load a parametric file:
78
68
 
@@ -82,8 +72,8 @@ Load a parametric file:
82
72
 
83
73
  parameters = JCAMPDX('path_to_scan/method')
84
74
 
85
- TR = data.params["PVM_RepetitionTime"].value # This way
86
- TR = data.get_value("PVM_RepetitionTime") # Or this way
75
+ TR = parameters.params["PVM_RepetitionTime"].value
76
+ TR = parameters.get_value("PVM_RepetitionTime")
87
77
 
88
78
 
89
79
 
@@ -98,6 +88,8 @@ Features
98
88
  * **Random access** for **fid** and **2dseq** data sets
99
89
  * **Split** operation implemented over **2dseq** data sets
100
90
  * **Filter** operation implemented over Bruker **folders** (allowing you to work with a subset of your study only)
91
+ * ParaVision 5.1, 6.0.1, 7.0.0, and 360 metadata and binary-layout support
92
+ * Metadata-based fallback inference for custom Cartesian, EPI, radial/UTE, spiral, ZTE, CSI, and spectroscopy sequences
101
93
 
102
94
  Examples
103
95
  ========
@@ -127,8 +119,7 @@ From source:
127
119
 
128
120
  git clone https://github.com/isi-nmr/brukerapi-python.git
129
121
  cd brukerapi-python
130
- python setup.py build
131
- python setup.py install
122
+ python -m pip install -e .[dev]
132
123
 
133
124
  Testing
134
125
  ========
@@ -137,107 +128,38 @@ data sets:
137
128
 
138
129
  * `BrukerAPI test data set (Bruker ParaVision v5.1) <https://doi.org/10.5281/zenodo.3899268>`_
139
130
  * `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>`_
131
+ * BrukerAPI test data set for ParaVision v7.0.0 (Zenodo DOI collection ``10.5281/zenodo.4522220``)
132
+ * `PV360 standard data <https://github.com/cecilyen/PV360_StdData>`_
133
+
134
+ The corpus download is opt-in for local runs:
135
+
136
+ .. code-block:: shell
137
+
138
+ python -m pytest test --download_test_data
139
+
140
+ Without that flag, pytest uses any corpus already present under ``test/test_data`` and
141
+ skips unavailable collections.
142
+
143
+ File format reference
144
+ =====================
145
+
146
+ `Bruker ParaVision Raw Data Format
147
+ <https://github.com/gdevenyi/brkraw-legacy/blob/main/FILE_FORMAT.md>`_ is the source of truth
148
+ for file-format parsing, binary layouts, dataset typing, and metadata-driven acquisition
149
+ scheme inference in this project.
141
150
 
142
151
  Compatibility
143
152
  =============
144
153
 
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**
154
+ Tested releases are ParaVision 5.1, 6.0.1, 7.0.0, and PV360 3.x. Supported
155
+ primary binaries are ``fid``, ``fid_proc.64``, ``2dseq``, ``traj``,
156
+ ``rawdata.jobN``, and ``rawdata.Navigator``. Known ``fid.spiral``,
157
+ ``fid.navFid``, and ``fid.orig`` files are exposed as auxiliary subdatasets of
158
+ their parent ``fid``; they are not accepted as standalone primary datasets.
159
+ TopSpin/NMR ``ser`` is intentionally unsupported.
160
+
161
+ Known pulse-program names use dedicated layouts. For custom sequences the
162
+ reader also infers common acquisition families from metadata; callers can pass
163
+ ``scheme_id=`` when inference is ambiguous. Rawdata is returned as complex
164
+ ordered samples, not as reconstructed k-space. See the compatibility page in
165
+ the documentation for behavior and current reconstruction limitations.
@@ -28,9 +28,9 @@ Load any **data set**:
28
28
  .. code-block:: python
29
29
 
30
30
  from brukerapi.dataset import Dataset
31
- dataset = Dataset('{path}/2dseq') # create data set, works for fid, 2dseq, rawdata.x
31
+ dataset = Dataset('{path}/2dseq') # also supports fid, fid_proc.64, traj, and rawdata.jobN
32
32
  dataset.data # access data array
33
- dataset.VisuCoreSize # get a value of a single parameter
33
+ dataset.get_value('VisuCoreSize') # get a parameter value
34
34
 
35
35
  Load an entire **study**:
36
36
 
@@ -40,17 +40,7 @@ Load an entire **study**:
40
40
  study = Study('{path_to_study_folder}')
41
41
  dataset = study.get_dataset(exp_id='1', proc_id='1')
42
42
 
43
- # get_dataset returns an empty dataset
44
- # in order to load data into the data set, you can either use the context manager:
45
-
46
- with dataset as d:
47
- d.data # access data array
48
- d.VisuCoreSize # get a value of a parameter
49
-
50
- # or the load function
51
- dataset.load()
52
- dataset.data # access data array
53
- dataset.VisuCoreSize # get a value of a single parameter
43
+ dataset.data # Study loads datasets by default
54
44
 
55
45
  Load a parametric file:
56
46
 
@@ -60,8 +50,8 @@ Load a parametric file:
60
50
 
61
51
  parameters = JCAMPDX('path_to_scan/method')
62
52
 
63
- TR = data.params["PVM_RepetitionTime"].value # This way
64
- TR = data.get_value("PVM_RepetitionTime") # Or this way
53
+ TR = parameters.params["PVM_RepetitionTime"].value
54
+ TR = parameters.get_value("PVM_RepetitionTime")
65
55
 
66
56
 
67
57
 
@@ -76,6 +66,8 @@ Features
76
66
  * **Random access** for **fid** and **2dseq** data sets
77
67
  * **Split** operation implemented over **2dseq** data sets
78
68
  * **Filter** operation implemented over Bruker **folders** (allowing you to work with a subset of your study only)
69
+ * ParaVision 5.1, 6.0.1, 7.0.0, and 360 metadata and binary-layout support
70
+ * Metadata-based fallback inference for custom Cartesian, EPI, radial/UTE, spiral, ZTE, CSI, and spectroscopy sequences
79
71
 
80
72
  Examples
81
73
  ========
@@ -105,8 +97,7 @@ From source:
105
97
 
106
98
  git clone https://github.com/isi-nmr/brukerapi-python.git
107
99
  cd brukerapi-python
108
- python setup.py build
109
- python setup.py install
100
+ python -m pip install -e .[dev]
110
101
 
111
102
  Testing
112
103
  ========
@@ -115,107 +106,38 @@ data sets:
115
106
 
116
107
  * `BrukerAPI test data set (Bruker ParaVision v5.1) <https://doi.org/10.5281/zenodo.3899268>`_
117
108
  * `BrukerAPI test data set (Bruker ParaVision v6.0.1) <https://doi.org/10.5281/zenodo.3894651>`_
118
- * `bruker2nifti_qa data set <https://gitlab.com/naveau/bruker2nifti_qa>`_
109
+ * BrukerAPI test data set for ParaVision v7.0.0 (Zenodo DOI collection ``10.5281/zenodo.4522220``)
110
+ * `PV360 standard data <https://github.com/cecilyen/PV360_StdData>`_
111
+
112
+ The corpus download is opt-in for local runs:
113
+
114
+ .. code-block:: shell
115
+
116
+ python -m pytest test --download_test_data
117
+
118
+ Without that flag, pytest uses any corpus already present under ``test/test_data`` and
119
+ skips unavailable collections.
120
+
121
+ File format reference
122
+ =====================
123
+
124
+ `Bruker ParaVision Raw Data Format
125
+ <https://github.com/gdevenyi/brkraw-legacy/blob/main/FILE_FORMAT.md>`_ is the source of truth
126
+ for file-format parsing, binary layouts, dataset typing, and metadata-driven acquisition
127
+ scheme inference in this project.
119
128
 
120
129
  Compatibility
121
130
  =============
122
131
 
123
- The API was tested using various data sets obtained by **ParaVision 5.1**, **6.0.1** and **360**. It it is compatible
124
- with the following data set types from individual ParaVision versions.
125
-
126
- ParaVision v5.1
127
- """""""""""""""
128
- Compatible data set types:
129
-
130
- * **fid**
131
- * **2dseq**
132
- * **rawdata.job0**
133
- * **rawdata.Navigator**
134
-
135
- Compatible pulse sequences for **fid** data sets:
136
-
137
- * FLASH.ppg
138
- * MGE.ppg
139
- * MSME.ppg
140
- * RARE.ppg
141
- * FAIR_RARE.ppg
142
- * RAREVTR.ppg
143
- * RAREst.ppg
144
- * MDEFT.ppg
145
- * FISP.ppg
146
- * FLOWMAP.ppg
147
- * DtiStandard.ppg
148
- * EPI.ppg
149
- * FAIR_EPI.ppg
150
- * DtiEpi.ppg
151
- * T1_EPI.ppg
152
- * T2_EPI.ppg
153
- * T2S_EPI.ppg
154
- * SPIRAL.ppg
155
- * DtiSpiral.ppg
156
- * UTE.ppg
157
- * UTE3D.ppg
158
- * ZTE.ppg
159
- * CSI.ppg
160
- * FieldMap.ppg
161
- * NSPECT.ppg
162
- * PRESS.ppg
163
- * STEAM.ppg
164
- * igFLASH.ppg
165
-
166
- ParaVision v6.0.1 and v7.0.0
167
- """""""""""""""""""""""""""""""
168
- Compatible data set types:
169
-
170
- * **fid**
171
- * **2dseq**
172
- * **rawdata.job0**
173
- * **rawdata.Navigator**
174
-
175
- Compatible pulse sequences for **fid** data sets:
176
-
177
- * FLASH.ppg,
178
- * FLASHAngio.ppg
179
- * IgFLASH.ppg
180
- * MGE.ppg
181
- * MSME.ppg
182
- * RARE.ppg
183
- * FAIR_RARE.ppg
184
- * RAREVTR.ppg
185
- * RAREst.ppg
186
- * MDEFT.ppg
187
- * FISP.ppg
188
- * FLOWMAP.ppg
189
- * DtiStandard.ppg
190
- * EPI.ppg
191
- * FAIR_EPI.ppg
192
- * CASL_EPI.ppg
193
- * DtiEpi.ppg
194
- * T1_EPI.ppg
195
- * T2_EPI.ppg
196
- * T2S_EPI.ppg
197
- * SPIRAL.ppg
198
- * DtiSpiral.ppg
199
- * UTE.ppg
200
- * UTE3D.ppg
201
- * ZTE.ppg
202
- * CSI.ppg
203
- * FieldMap.ppg
204
- * SINGLEPULSE.ppg
205
- * NSPECT.ppg
206
- * EPSI.ppg
207
- * PRESS.ppg
208
- * STEAM.ppg
209
- * ISIS.ppg
210
- * CPMG.ppg
211
- * RfProfile.ppg
212
-
213
-
214
- ParaVision 360 v1.1 v3.0-v3.7
215
- """""""""""""""""""""""""""""""""
216
- Reading rawdata is supported only in a basic form, no reshaping into k-space is supported at the moment.
217
- Compatible data set types:
218
-
219
- * **2dseq**
220
- * **rawdata.job0**
221
- * **rawdata.Navigator**
132
+ Tested releases are ParaVision 5.1, 6.0.1, 7.0.0, and PV360 3.x. Supported
133
+ primary binaries are ``fid``, ``fid_proc.64``, ``2dseq``, ``traj``,
134
+ ``rawdata.jobN``, and ``rawdata.Navigator``. Known ``fid.spiral``,
135
+ ``fid.navFid``, and ``fid.orig`` files are exposed as auxiliary subdatasets of
136
+ their parent ``fid``; they are not accepted as standalone primary datasets.
137
+ TopSpin/NMR ``ser`` is intentionally unsupported.
138
+
139
+ Known pulse-program names use dedicated layouts. For custom sequences the
140
+ reader also infers common acquisition families from metadata; callers can pass
141
+ ``scheme_id=`` when inference is ambiguous. Rawdata is returned as complex
142
+ ordered samples, not as reconstructed k-space. See the compatibility page in
143
+ the documentation for behavior and current reconstruction limitations.
@@ -141,7 +141,7 @@ def report(args):
141
141
  elif output is None:
142
142
  Dataset(input, add_parameters=["subject"]).report(props=args.props, verbose=args.verbose)
143
143
  # dataset to folder, or dataset to file
144
- elif output.is_dir():
144
+ else:
145
145
  Dataset(input, add_parameters=["subject"]).report(path=output, props=args.props, verbose=args.verbose)
146
146
 
147
147
 
@@ -143,12 +143,20 @@
143
143
  {
144
144
  "cmd": "#VisuCoreDataSlope.array",
145
145
  "conditions": []
146
+ },
147
+ {
148
+ "cmd": "#RECO_map_slope.array",
149
+ "conditions": []
146
150
  }
147
151
  ],
148
152
  "offset": [
149
153
  {
150
154
  "cmd": "#VisuCoreDataOffs.array",
151
155
  "conditions": []
156
+ },
157
+ {
158
+ "cmd": "#RECO_map_offset.array",
159
+ "conditions": []
152
160
  }
153
161
  ],
154
162
  "dim_type": [
@@ -169,4 +177,4 @@
169
177
  "conditions": ["@is_single_slice==False"]
170
178
  }
171
179
  ]
172
- }
180
+ }
@@ -130,6 +130,18 @@
130
130
  "#VisuCorePosition.size[0]==1",
131
131
  "#VisuCoreDim==2"]
132
132
  },
133
+ {
134
+ "cmd": "np.array([#VisuCoreExtent[0] / #VisuCoreSize[0], #VisuCoreExtent[1] / #VisuCoreSize[1], np.linalg.norm(#VisuCorePosition[1,:] - #VisuCorePosition[0,:])])",
135
+ "conditions": [
136
+ "#VisuCorePosition.size[0]>1",
137
+ "#VisuCoreDim==2"]
138
+ },
139
+ {
140
+ "cmd": "np.array([#VisuCoreExtent[0] / #VisuCoreSize[0], #VisuCoreExtent[1] / #VisuCoreSize[1], #VisuCoreFrameThickness])",
141
+ "conditions": [
142
+ "#VisuCorePosition.size[0]==1",
143
+ "#VisuCoreDim==2"]
144
+ },
133
145
  {
134
146
  "cmd": "np.array([#VisuCoreExtent[0] / #VisuCoreSize[0], #VisuCoreExtent[1] / #VisuCoreSize[1], #VisuCoreExtent[2] / #VisuCoreSize[2]])",
135
147
  "conditions": [
@@ -253,13 +265,13 @@
253
265
  {
254
266
  "cmd": "datetime.datetime.strptime(#VisuStudyDate[1:-1], '%X %d %b %Y')",
255
267
  "conditions": [
256
- "#VisuVersion==1"
268
+ "'T' not in #VisuStudyDate"
257
269
  ]
258
270
  },
259
271
  {
260
272
  "cmd": "datetime.datetime.strptime(#VisuStudyDate[1:-1], '%Y-%m-%dT%X,%f%z')",
261
273
  "conditions": [
262
- "#VisuVersion==3"
274
+ "'T' in #VisuStudyDate"
263
275
  ]
264
276
  }
265
277
  ],
@@ -274,4 +286,4 @@
274
286
  "comment": "default value"
275
287
  }
276
288
  ]
277
- }
289
+ }
@@ -47,7 +47,73 @@
47
47
  "conditions": [
48
48
  "#ACQ_word_size=='_32_BIT'",
49
49
  "#BYTORDA=='little'",
50
- ["#ACQ_sw_version",["<PV-360.1.1>"]]
50
+ "#ACQ_sw_version=='<PV-360.1.1>' or #ACQ_sw_version.value.startswith('<PV-360.3.')"
51
+ ]
52
+ },
53
+ {
54
+ "cmd": "np.dtype('i4').newbyteorder('>')",
55
+ "conditions": [
56
+ "#ACQ_word_size=='_32_BIT'",
57
+ "#BYTORDA=='big'",
58
+ "#ACQ_sw_version=='<PV-360.1.1>' or #ACQ_sw_version.value.startswith('<PV-360.3.')"
59
+ ]
60
+ },
61
+ {
62
+ "cmd": "np.dtype('i2').newbyteorder('<')",
63
+ "conditions": [
64
+ "#ACQ_word_size=='_16_BIT'",
65
+ "#BYTORDA=='little'",
66
+ "#ACQ_sw_version=='<PV-360.1.1>' or #ACQ_sw_version.value.startswith('<PV-360.3.')"
67
+ ]
68
+ },
69
+ {
70
+ "cmd": "np.dtype('i2').newbyteorder('>')",
71
+ "conditions": [
72
+ "#ACQ_word_size=='_16_BIT'",
73
+ "#BYTORDA=='big'",
74
+ "#ACQ_sw_version=='<PV-360.1.1>' or #ACQ_sw_version.value.startswith('<PV-360.3.')"
75
+ ]
76
+ },
77
+ {
78
+ "cmd": "np.dtype('i4').newbyteorder('<')",
79
+ "conditions": [
80
+ "#DTYPA in [0, 'Integer']",
81
+ "#BYTORDA=='little'"
82
+ ]
83
+ },
84
+ {
85
+ "cmd": "np.dtype('i4').newbyteorder('>')",
86
+ "conditions": [
87
+ "#DTYPA in [0, 'Integer']",
88
+ "#BYTORDA=='big'"
89
+ ]
90
+ },
91
+ {
92
+ "cmd": "np.dtype('f4').newbyteorder('<')",
93
+ "conditions": [
94
+ "#DTYPA in [1, 'Float']",
95
+ "#BYTORDA=='little'"
96
+ ]
97
+ },
98
+ {
99
+ "cmd": "np.dtype('f4').newbyteorder('>')",
100
+ "conditions": [
101
+ "#DTYPA in [1, 'Float']",
102
+ "#BYTORDA=='big'"
103
+ ]
104
+ },
105
+ {
106
+ "cmd": "np.dtype('f8').newbyteorder('<')",
107
+ "conditions": [
108
+ "#DTYPA in [2, 'Double']",
109
+ "#BYTORDA=='little'"
110
+ ]
111
+ },
112
+ {
113
+ "cmd": "np.dtype('f8').newbyteorder('>')",
114
+ "conditions": [
115
+ "#DTYPA in [2, 'Double']",
116
+ "#BYTORDA=='big'"
51
117
  ]
52
118
  }
53
119
  ],
@@ -96,7 +162,7 @@
96
162
  ]
97
163
  }
98
164
  ],
99
- "acq_lenght": [
165
+ "acq_length": [
100
166
  {
101
167
  "cmd": "#ACQ_size.tuple[0] * @channels",
102
168
  "conditions": [
@@ -196,8 +262,7 @@
196
262
  ["#PULPROG[1:-1]",
197
263
  [
198
264
  "UTE.ppg",
199
- "UTE3D.ppg",
200
- "ZTE.ppg"
265
+ "UTE3D.ppg"
201
266
  ]
202
267
  ]
203
268
  ]
@@ -416,7 +481,7 @@
416
481
  },
417
482
  {
418
483
  "cmd": [
419
- "#PVM_EncMatrix[0] * #PVM_EncMatrix[1] // #NSegments",
484
+ "#PVM_DigNp",
420
485
  "#PVM_EncNReceivers",
421
486
  "#NSegments",
422
487
  "#NI",
@@ -507,7 +572,7 @@
507
572
  "#PVM_EncNReceivers",
508
573
  "#ACQ_phase_factor",
509
574
  "#NI",
510
- "NPro / ACQ_phase_factor",
575
+ "#NPro // #ACQ_phase_factor",
511
576
  "#NR"
512
577
  ],
513
578
  "conditions": [
@@ -617,7 +682,7 @@
617
682
  },
618
683
  {
619
684
  "cmd": [
620
- "#PVM_EncMatrix[0]",
685
+ "#PVM_DigNp // (#PVM_EncMatrix[1] // #NSegments)",
621
686
  "#PVM_EncMatrix[1]",
622
687
  "#NI",
623
688
  "#NR",
@@ -52,13 +52,13 @@
52
52
  {
53
53
  "cmd": "datetime.datetime.strptime(#ACQ_time,'<%Y-%m-%dT%X,%f%z>')",
54
54
  "conditions": [
55
- "#ACQ_sw_version=='<PV 6.0.1>'"
55
+ "'T' in #ACQ_time"
56
56
  ]
57
57
  },
58
58
  {
59
59
  "cmd": "datetime.datetime.strptime(#ACQ_time,'<%H:%M:%S %d %b %Y>')",
60
60
  "conditions": [
61
- "#ACQ_sw_version=='<PV 5.1>'"
61
+ "'T' not in #ACQ_time"
62
62
  ]
63
63
  }
64
64
  ],
@@ -88,4 +88,4 @@
88
88
  "unit": "ms"
89
89
  }
90
90
  ]
91
- }
91
+ }
@@ -77,7 +77,7 @@
77
77
  ],
78
78
  "job_desc": [
79
79
  {
80
- "cmd": "#ACQ_jobs.primed_dict(7)['<{}>'.format(@subtype)]",
80
+ "cmd": "#ACQ_jobs.primed_dict(-1)['<{}>'.format(@subtype)]",
81
81
  "conditions": [
82
82
  ["#ACQ_sw_version",["<PV-360.1.1>"]]
83
83
  ]
@@ -112,6 +112,12 @@
112
112
  }
113
113
  ],
114
114
  "shape_storage": [
115
+ {
116
+ "cmd": "(@job_desc[0],) + (#PVM_EncNReceivers,) + (@job_desc[6],)",
117
+ "conditions": [
118
+ "#ACQ_sw_version.value.startswith('<PV-360.3.')"
119
+ ]
120
+ },
115
121
  {
116
122
  "cmd": "(@job_desc[0],) + (#PVM_EncNReceivers,) + (@job_desc[3],)",
117
123
  "conditions": []
@@ -14,8 +14,7 @@
14
14
  [
15
15
  "UTE.ppg",
16
16
  "UTE3D.ppg",
17
- "IgUTE.ppg",
18
- "ZTE.ppg"
17
+ "IgUTE.ppg"
19
18
  ]
20
19
  ]
21
20
  ]
@@ -0,0 +1,7 @@
1
+ class DataRandomAccess:
2
+ def __init__(self, dataset):
3
+ self._dataset = dataset
4
+ self._schema = dataset._schema
5
+
6
+ def __getitem__(self, key):
7
+ return self._schema.ra(key)