brukerapi 0.2.5__tar.gz → 0.2.6__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.
- {brukerapi-0.2.5/brukerapi.egg-info → brukerapi-0.2.6}/PKG-INFO +3 -5
- {brukerapi-0.2.5 → brukerapi-0.2.6}/README.rst +2 -4
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_2dseq_core.json +2 -2
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_fid_core.json +19 -39
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_rawdata_core.json +33 -15
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_traj_core.json +0 -39
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/dataset.py +2 -2
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/folders.py +5 -5
- {brukerapi-0.2.5 → brukerapi-0.2.6/brukerapi.egg-info}/PKG-INFO +3 -5
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi.egg-info/SOURCES.txt +2 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/pyproject.toml +1 -1
- brukerapi-0.2.6/test/test_folders.py +34 -0
- brukerapi-0.2.6/test/test_property_configs.py +62 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/LICENSE +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/MANIFEST.in +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/__init__.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/cli.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_2dseq_custom.json +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_fid_custom.json +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_rawdata_custom.json +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/config/properties_traj_custom.json +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/data.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/exceptions.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/jcampdx.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/mergers.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/schemas.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/splitters.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi/utils.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi.egg-info/dependency_links.txt +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi.egg-info/entry_points.txt +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi.egg-info/not-zip-safe +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi.egg-info/requires.txt +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/brukerapi.egg-info/top_level.txt +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/setup.cfg +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/test/test_dataset.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/test/test_exceptions.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/test/test_jcampdx.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/test/test_random_access.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/test/test_split.py +0 -0
- {brukerapi-0.2.5 → brukerapi-0.2.6}/test/test_trajectory.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: brukerapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
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,7 +50,7 @@ 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') # create data set, works for fid, 2dseq, rawdata.x
|
|
54
54
|
dataset.data # access data array
|
|
55
55
|
dataset.VisuCoreSize # get a value of a single parameter
|
|
56
56
|
|
|
@@ -94,7 +94,6 @@ Features
|
|
|
94
94
|
|
|
95
95
|
* **I/O** interface for **fid** data sets
|
|
96
96
|
* **I/O** interface for **2dseq** data sets
|
|
97
|
-
* **I/O** interface for **ser** data sets
|
|
98
97
|
* **I/O** interface for **rawdata** data sets
|
|
99
98
|
* **Random access** for **fid** and **2dseq** data sets
|
|
100
99
|
* **Split** operation implemented over **2dseq** data sets
|
|
@@ -103,7 +102,7 @@ Features
|
|
|
103
102
|
Examples
|
|
104
103
|
========
|
|
105
104
|
|
|
106
|
-
* How to `read <examples/read_fid.ipynb>`_ a Bruker fid, 2dseq,
|
|
105
|
+
* How to `read <examples/read_fid.ipynb>`_ a Bruker fid, 2dseq, or rawdata file
|
|
107
106
|
* How to `split slice packages <examples/split_sp_demo.ipynb>`_ of a 2dseq data set
|
|
108
107
|
* How to `split FG_ECHO <examples/split_fg_echo_demo.ipynb>`_ of a 2dseq data set
|
|
109
108
|
* How to `split FG_ISA <examples/examples/split_fg_isa_demo.ipynb>`_ of a 2dseq data set
|
|
@@ -242,4 +241,3 @@ Compatible data set types:
|
|
|
242
241
|
* **2dseq**
|
|
243
242
|
* **rawdata.job0**
|
|
244
243
|
* **rawdata.Navigator**
|
|
245
|
-
|
|
@@ -28,7 +28,7 @@ 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') # create data set, works for fid, 2dseq, rawdata.x
|
|
32
32
|
dataset.data # access data array
|
|
33
33
|
dataset.VisuCoreSize # get a value of a single parameter
|
|
34
34
|
|
|
@@ -72,7 +72,6 @@ Features
|
|
|
72
72
|
|
|
73
73
|
* **I/O** interface for **fid** data sets
|
|
74
74
|
* **I/O** interface for **2dseq** data sets
|
|
75
|
-
* **I/O** interface for **ser** data sets
|
|
76
75
|
* **I/O** interface for **rawdata** data sets
|
|
77
76
|
* **Random access** for **fid** and **2dseq** data sets
|
|
78
77
|
* **Split** operation implemented over **2dseq** data sets
|
|
@@ -81,7 +80,7 @@ Features
|
|
|
81
80
|
Examples
|
|
82
81
|
========
|
|
83
82
|
|
|
84
|
-
* How to `read <examples/read_fid.ipynb>`_ a Bruker fid, 2dseq,
|
|
83
|
+
* How to `read <examples/read_fid.ipynb>`_ a Bruker fid, 2dseq, or rawdata file
|
|
85
84
|
* How to `split slice packages <examples/split_sp_demo.ipynb>`_ of a 2dseq data set
|
|
86
85
|
* How to `split FG_ECHO <examples/split_fg_echo_demo.ipynb>`_ of a 2dseq data set
|
|
87
86
|
* How to `split FG_ISA <examples/examples/split_fg_isa_demo.ipynb>`_ of a 2dseq data set
|
|
@@ -220,4 +219,3 @@ Compatible data set types:
|
|
|
220
219
|
* **2dseq**
|
|
221
220
|
* **rawdata.job0**
|
|
222
221
|
* **rawdata.Navigator**
|
|
223
|
-
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{
|
|
31
31
|
"cmd": "np.dtype('uint8').newbyteorder('<')",
|
|
32
32
|
"conditions": [
|
|
33
|
-
["#VisuCoreWordType",["
|
|
33
|
+
["#VisuCoreWordType",["_8BIT_UNSGN_INT"]],
|
|
34
34
|
["#VisuCoreByteOrder",["littleEndian"]]
|
|
35
35
|
]
|
|
36
36
|
},
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
{
|
|
59
59
|
"cmd": "np.dtype('uint8').newbyteorder('>')",
|
|
60
60
|
"conditions": [
|
|
61
|
-
["#VisuCoreWordType",["
|
|
61
|
+
["#VisuCoreWordType",["_8BIT_UNSGN_INT"]],
|
|
62
62
|
["#VisuCoreByteOrder",["bigEndian"]]
|
|
63
63
|
]
|
|
64
64
|
}
|
|
@@ -4,48 +4,42 @@
|
|
|
4
4
|
"cmd": "np.dtype('int32').newbyteorder('<')",
|
|
5
5
|
"conditions": [
|
|
6
6
|
"#GO_raw_data_format=='GO_32BIT_SGN_INT'",
|
|
7
|
-
"#BYTORDA=='little'"
|
|
8
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
7
|
+
"#BYTORDA=='little'"
|
|
9
8
|
]
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
11
|
"cmd": "np.dtype('int16').newbyteorder('<')",
|
|
13
12
|
"conditions": [
|
|
14
13
|
"#GO_raw_data_format=='GO_16BIT_SGN_INT'",
|
|
15
|
-
"#BYTORDA=='little'"
|
|
16
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
14
|
+
"#BYTORDA=='little'"
|
|
17
15
|
]
|
|
18
16
|
},
|
|
19
17
|
{
|
|
20
18
|
"cmd": "np.dtype('float32').newbyteorder('<')",
|
|
21
19
|
"conditions": [
|
|
22
20
|
"#GO_raw_data_format=='GO_32BIT_FLOAT'",
|
|
23
|
-
"#BYTORDA=='little'"
|
|
24
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
21
|
+
"#BYTORDA=='little'"
|
|
25
22
|
]
|
|
26
23
|
},
|
|
27
24
|
{
|
|
28
25
|
"cmd": "np.dtype('int32').newbyteorder('>')",
|
|
29
26
|
"conditions": [
|
|
30
27
|
"#GO_raw_data_format=='GO_32BIT_SGN_INT'",
|
|
31
|
-
"#BYTORDA=='big'"
|
|
32
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
28
|
+
"#BYTORDA=='big'"
|
|
33
29
|
]
|
|
34
30
|
},
|
|
35
31
|
{
|
|
36
32
|
"cmd": "np.dtype('int16').newbyteorder('>')",
|
|
37
33
|
"conditions": [
|
|
38
34
|
"#GO_raw_data_format=='GO_16BIT_SGN_INT'",
|
|
39
|
-
"#BYTORDA=='big'"
|
|
40
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
35
|
+
"#BYTORDA=='big'"
|
|
41
36
|
]
|
|
42
37
|
},
|
|
43
38
|
{
|
|
44
39
|
"cmd": "np.dtype('float32').newbyteorder('>')",
|
|
45
40
|
"conditions": [
|
|
46
41
|
"#GO_raw_data_format=='GO_32BIT_FLOAT'",
|
|
47
|
-
"#BYTORDA=='big'"
|
|
48
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
42
|
+
"#BYTORDA=='big'"
|
|
49
43
|
]
|
|
50
44
|
},
|
|
51
45
|
{
|
|
@@ -82,15 +76,13 @@
|
|
|
82
76
|
{
|
|
83
77
|
"cmd": "int((np.ceil(#ACQ_size.tuple[0] * @channels * @numpy_dtype.itemsize / 1024.) * 1024. / @numpy_dtype.itemsize))",
|
|
84
78
|
"conditions": [
|
|
85
|
-
"#GO_block_size=='Standard_KBlock_Format'"
|
|
86
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
79
|
+
"#GO_block_size=='Standard_KBlock_Format'"
|
|
87
80
|
]
|
|
88
81
|
},
|
|
89
82
|
{
|
|
90
83
|
"cmd": "int(#ACQ_size.tuple[0] * @channels)",
|
|
91
84
|
"conditions": [
|
|
92
|
-
"#GO_block_size!='Standard_KBlock_Format'"
|
|
93
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
85
|
+
"#GO_block_size!='Standard_KBlock_Format'"
|
|
94
86
|
]
|
|
95
87
|
},
|
|
96
88
|
{
|
|
@@ -115,15 +107,13 @@
|
|
|
115
107
|
{
|
|
116
108
|
"cmd": "#ACQ_size.tuple[0] * @channels",
|
|
117
109
|
"conditions": [
|
|
118
|
-
"#GO_block_size=='Standard_KBlock_Format'"
|
|
119
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
110
|
+
"#GO_block_size=='Standard_KBlock_Format'"
|
|
120
111
|
]
|
|
121
112
|
},
|
|
122
113
|
{
|
|
123
114
|
"cmd": "int(2 * #PVM_DigNp * @channels // #NSegments)",
|
|
124
115
|
"conditions": [
|
|
125
116
|
"#GO_block_size!='Standard_KBlock_Format'",
|
|
126
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']",
|
|
127
117
|
"#PULPROG[1:-1]=='EPSI.ppg'"
|
|
128
118
|
]
|
|
129
119
|
},
|
|
@@ -131,7 +121,6 @@
|
|
|
131
121
|
"cmd": "int(2 * #PVM_DigNp * @channels)",
|
|
132
122
|
"conditions": [
|
|
133
123
|
"#GO_block_size!='Standard_KBlock_Format'",
|
|
134
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']",
|
|
135
124
|
"#PULPROG[1:-1]!='EPSI.ppg'"
|
|
136
125
|
]
|
|
137
126
|
},
|
|
@@ -171,8 +160,7 @@
|
|
|
171
160
|
"<DESS.ppg>"
|
|
172
161
|
]
|
|
173
162
|
],
|
|
174
|
-
"#ACQ_dim==2"
|
|
175
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
163
|
+
"#ACQ_dim==2"
|
|
176
164
|
]
|
|
177
165
|
},
|
|
178
166
|
{
|
|
@@ -189,8 +177,7 @@
|
|
|
189
177
|
"MDEFT.ppg"
|
|
190
178
|
]
|
|
191
179
|
],
|
|
192
|
-
"#ACQ_dim==3"
|
|
193
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
180
|
+
"#ACQ_dim==3"
|
|
194
181
|
]
|
|
195
182
|
},
|
|
196
183
|
{
|
|
@@ -200,8 +187,7 @@
|
|
|
200
187
|
[
|
|
201
188
|
"FieldMap.ppg"
|
|
202
189
|
]
|
|
203
|
-
]
|
|
204
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
190
|
+
]
|
|
205
191
|
]
|
|
206
192
|
},
|
|
207
193
|
{
|
|
@@ -213,8 +199,7 @@
|
|
|
213
199
|
"UTE3D.ppg",
|
|
214
200
|
"ZTE.ppg"
|
|
215
201
|
]
|
|
216
|
-
]
|
|
217
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
202
|
+
]
|
|
218
203
|
]
|
|
219
204
|
},
|
|
220
205
|
{
|
|
@@ -230,8 +215,7 @@
|
|
|
230
215
|
"T2_EPI.ppg",
|
|
231
216
|
"T2S_EPI.ppg"
|
|
232
217
|
]
|
|
233
|
-
]
|
|
234
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
218
|
+
]
|
|
235
219
|
]
|
|
236
220
|
},
|
|
237
221
|
{
|
|
@@ -242,8 +226,7 @@
|
|
|
242
226
|
"DtiEpi.ppg",
|
|
243
227
|
"EPSI.ppg"
|
|
244
228
|
]
|
|
245
|
-
]
|
|
246
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
229
|
+
]
|
|
247
230
|
]
|
|
248
231
|
},
|
|
249
232
|
{
|
|
@@ -261,8 +244,7 @@
|
|
|
261
244
|
"fmap_fq.ppg",
|
|
262
245
|
"ste_laser_dIR_WSTM.ppg"
|
|
263
246
|
]
|
|
264
|
-
]
|
|
265
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
247
|
+
]
|
|
266
248
|
]
|
|
267
249
|
},
|
|
268
250
|
{
|
|
@@ -272,8 +254,7 @@
|
|
|
272
254
|
[
|
|
273
255
|
"CSI.ppg"
|
|
274
256
|
]
|
|
275
|
-
]
|
|
276
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>', '<PV-360.1.1>']"
|
|
257
|
+
]
|
|
277
258
|
]
|
|
278
259
|
},
|
|
279
260
|
{
|
|
@@ -295,8 +276,7 @@
|
|
|
295
276
|
[
|
|
296
277
|
"ZTE.ppg"
|
|
297
278
|
]
|
|
298
|
-
]
|
|
299
|
-
"#ACQ_sw_version in ['<PV 5.1>', '<PV 6.0>', '<PV 6.0.1>', '<PV-7.0.0>']"
|
|
279
|
+
]
|
|
300
280
|
]
|
|
301
281
|
}
|
|
302
282
|
],
|
|
@@ -793,4 +773,4 @@
|
|
|
793
773
|
]
|
|
794
774
|
}
|
|
795
775
|
]
|
|
796
|
-
}
|
|
776
|
+
}
|
|
@@ -4,48 +4,42 @@
|
|
|
4
4
|
"cmd": "np.dtype('int32').newbyteorder('<')",
|
|
5
5
|
"conditions": [
|
|
6
6
|
"#GO_raw_data_format=='GO_32BIT_SGN_INT'",
|
|
7
|
-
"#BYTORDA=='little'"
|
|
8
|
-
["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
|
|
7
|
+
"#BYTORDA=='little'"
|
|
9
8
|
]
|
|
10
9
|
},
|
|
11
10
|
{
|
|
12
11
|
"cmd": "np.dtype('int16').newbyteorder('<')",
|
|
13
12
|
"conditions": [
|
|
14
13
|
"#GO_raw_data_format=='GO_16BIT_SGN_INT'",
|
|
15
|
-
"#BYTORDA=='little'"
|
|
16
|
-
["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
|
|
14
|
+
"#BYTORDA=='little'"
|
|
17
15
|
]
|
|
18
16
|
},
|
|
19
17
|
{
|
|
20
18
|
"cmd": "np.dtype('float32').newbyteorder('<')",
|
|
21
19
|
"conditions": [
|
|
22
20
|
"#GO_raw_data_format=='GO_32BIT_FLOAT'",
|
|
23
|
-
"#BYTORDA=='little'"
|
|
24
|
-
["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
|
|
21
|
+
"#BYTORDA=='little'"
|
|
25
22
|
]
|
|
26
23
|
},
|
|
27
24
|
{
|
|
28
25
|
"cmd": "np.dtype('int32').newbyteorder('>')",
|
|
29
26
|
"conditions": [
|
|
30
27
|
"#GO_raw_data_format=='GO_32BIT_SGN_INT'",
|
|
31
|
-
"#BYTORDA=='big'"
|
|
32
|
-
["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
|
|
28
|
+
"#BYTORDA=='big'"
|
|
33
29
|
]
|
|
34
30
|
},
|
|
35
31
|
{
|
|
36
32
|
"cmd": "np.dtype('int16').newbyteorder('>')",
|
|
37
33
|
"conditions": [
|
|
38
34
|
"#GO_raw_data_format=='GO_16BIT_SGN_INT'",
|
|
39
|
-
"#BYTORDA=='big'"
|
|
40
|
-
["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
|
|
35
|
+
"#BYTORDA=='big'"
|
|
41
36
|
]
|
|
42
37
|
},
|
|
43
38
|
{
|
|
44
39
|
"cmd": "np.dtype('float32').newbyteorder('>')",
|
|
45
40
|
"conditions": [
|
|
46
41
|
"#GO_raw_data_format=='GO_32BIT_FLOAT'",
|
|
47
|
-
"#BYTORDA=='big'"
|
|
48
|
-
["#ACQ_sw_version",["<PV 5.1>", "<PV 6.0>", "<PV 6.0.1>","<PV-7.0.0>"]]
|
|
42
|
+
"#BYTORDA=='big'"
|
|
49
43
|
]
|
|
50
44
|
},
|
|
51
45
|
{
|
|
@@ -53,7 +47,31 @@
|
|
|
53
47
|
"conditions": [
|
|
54
48
|
"#ACQ_word_size=='_32_BIT'",
|
|
55
49
|
"#BYTORDA=='little'",
|
|
56
|
-
|
|
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.')"
|
|
57
75
|
]
|
|
58
76
|
}
|
|
59
77
|
],
|
|
@@ -67,7 +85,7 @@
|
|
|
67
85
|
{
|
|
68
86
|
"cmd": "[v for v in #ACQ_jobs.nested if v[-1] == '<{}>'.format(@subtype)][0]",
|
|
69
87
|
"conditions": [
|
|
70
|
-
|
|
88
|
+
"#ACQ_sw_version.value.startswith('<PV-360.3.')"
|
|
71
89
|
]
|
|
72
90
|
},
|
|
73
91
|
|
|
@@ -99,4 +117,4 @@
|
|
|
99
117
|
"conditions": []
|
|
100
118
|
}
|
|
101
119
|
]
|
|
102
|
-
}
|
|
120
|
+
}
|
|
@@ -17,22 +17,6 @@
|
|
|
17
17
|
"IgUTE.ppg",
|
|
18
18
|
"ZTE.ppg"
|
|
19
19
|
]
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
"#ACQ_sw_version",
|
|
23
|
-
[
|
|
24
|
-
"<PV 6.0.1>",
|
|
25
|
-
"<PV 5.1>",
|
|
26
|
-
"<PV-7.0.0>",
|
|
27
|
-
"<PV-360.3.0>",
|
|
28
|
-
"<PV-360.3.1>",
|
|
29
|
-
"<PV-360.3.2>",
|
|
30
|
-
"<PV-360.3.3>",
|
|
31
|
-
"<PV-360.3.4>",
|
|
32
|
-
"<PV-360.3.5>",
|
|
33
|
-
"<PV-360.3.6>",
|
|
34
|
-
"<PV-360.3.7>"
|
|
35
|
-
]
|
|
36
20
|
]
|
|
37
21
|
]
|
|
38
22
|
},
|
|
@@ -45,22 +29,6 @@
|
|
|
45
29
|
"SPIRAL.ppg",
|
|
46
30
|
"DtiSpiral.ppg"
|
|
47
31
|
]
|
|
48
|
-
],
|
|
49
|
-
[
|
|
50
|
-
"#ACQ_sw_version",
|
|
51
|
-
[
|
|
52
|
-
"<PV 6.0.1>",
|
|
53
|
-
"<PV 5.1>",
|
|
54
|
-
"<PV-7.0.0>",
|
|
55
|
-
"<PV-360.3.0>",
|
|
56
|
-
"<PV-360.3.1>",
|
|
57
|
-
"<PV-360.3.2>",
|
|
58
|
-
"<PV-360.3.3>",
|
|
59
|
-
"<PV-360.3.4>",
|
|
60
|
-
"<PV-360.3.5>",
|
|
61
|
-
"<PV-360.3.6>",
|
|
62
|
-
"<PV-360.3.7>"
|
|
63
|
-
]
|
|
64
32
|
]
|
|
65
33
|
]
|
|
66
34
|
},
|
|
@@ -72,13 +40,6 @@
|
|
|
72
40
|
[
|
|
73
41
|
"ZTE.ppg"
|
|
74
42
|
]
|
|
75
|
-
],
|
|
76
|
-
[
|
|
77
|
-
"#ACQ_sw_version",
|
|
78
|
-
[
|
|
79
|
-
"<PV 6.0.1>",
|
|
80
|
-
"<PV 5.1>"
|
|
81
|
-
]
|
|
82
43
|
]
|
|
83
44
|
]
|
|
84
45
|
}
|
|
@@ -125,7 +125,7 @@ RELATIVE_PATHS = {
|
|
|
125
125
|
|
|
126
126
|
class Dataset:
|
|
127
127
|
"""
|
|
128
|
-
Data set is created using one binary file {fid, 2dseq, rawdata,
|
|
128
|
+
Data set is created using one binary file {fid, 2dseq, rawdata, ...} and several JCAMP-DX
|
|
129
129
|
files (method, acqp, visu_pars,...). The JCAMP-DX files necessary for a creation of a data set are denoted as
|
|
130
130
|
**essential**. Each of the binary data files (fid, 2dseq,...) has slightly different data layout, i.e. the . The
|
|
131
131
|
data in the binary files is stored Since the individual types of b some features We distinguish By he name of the
|
|
@@ -606,7 +606,7 @@ class Dataset:
|
|
|
606
606
|
def write(self, path, **kwargs):
|
|
607
607
|
"""
|
|
608
608
|
Write the Dataset instance to the disk. This consists of writing the binary data file {fid, rawdata, 2dseq,
|
|
609
|
-
|
|
609
|
+
...} and respective JCAMP-DX files {method, acqp, visu_pars, reco}.
|
|
610
610
|
|
|
611
611
|
:param path: *str* Path to one of the supported data set types.
|
|
612
612
|
:param kwargs:
|
|
@@ -45,7 +45,7 @@ class Folder:
|
|
|
45
45
|
recursive = True
|
|
46
46
|
|
|
47
47
|
if dataset_index is None:
|
|
48
|
-
dataset_index = ["fid", "2dseq", "
|
|
48
|
+
dataset_index = ["fid", "2dseq", "rawdata"]
|
|
49
49
|
|
|
50
50
|
self.path = Path(path)
|
|
51
51
|
|
|
@@ -322,7 +322,7 @@ class Study(Folder):
|
|
|
322
322
|
recursive = True
|
|
323
323
|
|
|
324
324
|
if dataset_index is None:
|
|
325
|
-
dataset_index = ["fid", "2dseq", "
|
|
325
|
+
dataset_index = ["fid", "2dseq", "rawdata"]
|
|
326
326
|
|
|
327
327
|
self.path = Path(path)
|
|
328
328
|
self.validate()
|
|
@@ -367,7 +367,7 @@ class Study(Folder):
|
|
|
367
367
|
|
|
368
368
|
|
|
369
369
|
class Experiment(Folder):
|
|
370
|
-
"""Representation of the Bruker Experiment folder. The folder can contain *fid
|
|
370
|
+
"""Representation of the Bruker Experiment folder. The folder can contain *fid* and *rawdata.SUBTYPE* data sets.
|
|
371
371
|
It can contain multiple :obj:`.Processing` instances.
|
|
372
372
|
"""
|
|
373
373
|
|
|
@@ -391,7 +391,7 @@ class Experiment(Folder):
|
|
|
391
391
|
recursive = True
|
|
392
392
|
|
|
393
393
|
if dataset_index is None:
|
|
394
|
-
dataset_index = ["fid", "
|
|
394
|
+
dataset_index = ["fid", "rawdata"]
|
|
395
395
|
|
|
396
396
|
self.path = Path(path)
|
|
397
397
|
self.validate()
|
|
@@ -434,7 +434,7 @@ class Processing(Folder):
|
|
|
434
434
|
recursive = True
|
|
435
435
|
|
|
436
436
|
if dataset_index is None:
|
|
437
|
-
dataset_index = ["2dseq"
|
|
437
|
+
dataset_index = ["2dseq"]
|
|
438
438
|
|
|
439
439
|
self.path = Path(path)
|
|
440
440
|
self.validate()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: brukerapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
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,7 +50,7 @@ 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') # create data set, works for fid, 2dseq, rawdata.x
|
|
54
54
|
dataset.data # access data array
|
|
55
55
|
dataset.VisuCoreSize # get a value of a single parameter
|
|
56
56
|
|
|
@@ -94,7 +94,6 @@ Features
|
|
|
94
94
|
|
|
95
95
|
* **I/O** interface for **fid** data sets
|
|
96
96
|
* **I/O** interface for **2dseq** data sets
|
|
97
|
-
* **I/O** interface for **ser** data sets
|
|
98
97
|
* **I/O** interface for **rawdata** data sets
|
|
99
98
|
* **Random access** for **fid** and **2dseq** data sets
|
|
100
99
|
* **Split** operation implemented over **2dseq** data sets
|
|
@@ -103,7 +102,7 @@ Features
|
|
|
103
102
|
Examples
|
|
104
103
|
========
|
|
105
104
|
|
|
106
|
-
* How to `read <examples/read_fid.ipynb>`_ a Bruker fid, 2dseq,
|
|
105
|
+
* How to `read <examples/read_fid.ipynb>`_ a Bruker fid, 2dseq, or rawdata file
|
|
107
106
|
* How to `split slice packages <examples/split_sp_demo.ipynb>`_ of a 2dseq data set
|
|
108
107
|
* How to `split FG_ECHO <examples/split_fg_echo_demo.ipynb>`_ of a 2dseq data set
|
|
109
108
|
* How to `split FG_ISA <examples/examples/split_fg_isa_demo.ipynb>`_ of a 2dseq data set
|
|
@@ -242,4 +241,3 @@ Compatible data set types:
|
|
|
242
241
|
* **2dseq**
|
|
243
242
|
* **rawdata.job0**
|
|
244
243
|
* **rawdata.Navigator**
|
|
245
|
-
|
|
@@ -31,7 +31,9 @@ brukerapi/config/properties_traj_core.json
|
|
|
31
31
|
brukerapi/config/properties_traj_custom.json
|
|
32
32
|
test/test_dataset.py
|
|
33
33
|
test/test_exceptions.py
|
|
34
|
+
test/test_folders.py
|
|
34
35
|
test/test_jcampdx.py
|
|
36
|
+
test/test_property_configs.py
|
|
35
37
|
test/test_random_access.py
|
|
36
38
|
test/test_split.py
|
|
37
39
|
test/test_trajectory.py
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from brukerapi.dataset import Dataset
|
|
2
|
+
from brukerapi.folders import Folder, Processing
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def test_folder_traversal_skips_ser_and_processed_spectra(tmp_path):
|
|
6
|
+
experiment_path = tmp_path / "1"
|
|
7
|
+
processing_path = experiment_path / "pdata" / "1"
|
|
8
|
+
processing_path.mkdir(parents=True)
|
|
9
|
+
|
|
10
|
+
for path in [
|
|
11
|
+
experiment_path / "acqp",
|
|
12
|
+
experiment_path / "method",
|
|
13
|
+
experiment_path / "fid",
|
|
14
|
+
experiment_path / "ser",
|
|
15
|
+
processing_path / "visu_pars",
|
|
16
|
+
processing_path / "reco",
|
|
17
|
+
processing_path / "2dseq",
|
|
18
|
+
processing_path / "1r",
|
|
19
|
+
processing_path / "1i",
|
|
20
|
+
]:
|
|
21
|
+
path.write_text("")
|
|
22
|
+
|
|
23
|
+
folder = Folder(
|
|
24
|
+
tmp_path,
|
|
25
|
+
dataset_state={"parameter_files": [], "property_files": [], "load": 0},
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
experiment = folder["1"]
|
|
29
|
+
experiment_datasets = {child.path.name for child in experiment.children if isinstance(child, Dataset)}
|
|
30
|
+
assert experiment_datasets == {"fid"}
|
|
31
|
+
|
|
32
|
+
processing = next(child for child in experiment.get_processing_list() if isinstance(child, Processing))
|
|
33
|
+
processing_datasets = {child.path.name for child in processing.children if isinstance(child, Dataset)}
|
|
34
|
+
assert processing_datasets == {"2dseq"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
4
|
+
CONFIG_DIR = Path(__file__).resolve().parents[1] / "brukerapi" / "config"
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _load_config(name):
|
|
8
|
+
with (CONFIG_DIR / name).open() as f:
|
|
9
|
+
return json.load(f)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _contains_sw_version_gate(conditions):
|
|
13
|
+
for condition in conditions:
|
|
14
|
+
if isinstance(condition, str) and "ACQ_sw_version" in condition:
|
|
15
|
+
return True
|
|
16
|
+
if isinstance(condition, list) and condition and condition[0] == "#ACQ_sw_version":
|
|
17
|
+
return True
|
|
18
|
+
return False
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def test_fid_dtype_and_block_layout_are_not_version_gated():
|
|
22
|
+
config = _load_config("properties_fid_core.json")
|
|
23
|
+
|
|
24
|
+
standard_dtype_branches = config["numpy_dtype"][:6]
|
|
25
|
+
assert all(not _contains_sw_version_gate(branch["conditions"]) for branch in standard_dtype_branches)
|
|
26
|
+
|
|
27
|
+
standard_block_size_branches = config["block_size"][:2]
|
|
28
|
+
assert all(not _contains_sw_version_gate(branch["conditions"]) for branch in standard_block_size_branches)
|
|
29
|
+
|
|
30
|
+
standard_acq_length_branches = config["acq_lenght"][1:4]
|
|
31
|
+
assert all(not _contains_sw_version_gate(branch["conditions"]) for branch in standard_acq_length_branches)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_fid_common_scheme_detection_is_not_version_gated():
|
|
35
|
+
config = _load_config("properties_fid_core.json")
|
|
36
|
+
|
|
37
|
+
for branch in config["scheme_id"]:
|
|
38
|
+
if branch["cmd"] == "'SPIRAL'":
|
|
39
|
+
continue
|
|
40
|
+
assert not _contains_sw_version_gate(branch["conditions"])
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def test_rawdata_standard_dtype_is_not_version_gated_but_pv360_v1_branch_remains():
|
|
44
|
+
config = _load_config("properties_rawdata_core.json")
|
|
45
|
+
|
|
46
|
+
standard_dtype_branches = config["numpy_dtype"][:6]
|
|
47
|
+
assert all(not _contains_sw_version_gate(branch["conditions"]) for branch in standard_dtype_branches)
|
|
48
|
+
assert _contains_sw_version_gate(config["numpy_dtype"][6]["conditions"])
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def test_rawdata_pv360_v3_uses_prefix_matching():
|
|
52
|
+
config = _load_config("properties_rawdata_core.json")
|
|
53
|
+
|
|
54
|
+
for branch in config["numpy_dtype"][6:10]:
|
|
55
|
+
assert "#ACQ_sw_version=='<PV-360.1.1>' or #ACQ_sw_version.value.startswith('<PV-360.3.')" in branch["conditions"]
|
|
56
|
+
|
|
57
|
+
assert config["job_desc"][1]["conditions"] == ["#ACQ_sw_version.value.startswith('<PV-360.3.')"]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def test_traj_scheme_detection_is_not_version_gated():
|
|
61
|
+
config = _load_config("properties_traj_core.json")
|
|
62
|
+
assert all(not _contains_sw_version_gate(branch["conditions"]) for branch in config["scheme_id"])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|