brukerapi 0.2.0__tar.gz → 0.2.2__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.0/brukerapi.egg-info → brukerapi-0.2.2}/PKG-INFO +2 -1
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_fid_custom.json +1 -1
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/dataset.py +25 -5
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/schemas.py +14 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2/brukerapi.egg-info}/PKG-INFO +2 -1
- {brukerapi-0.2.0 → brukerapi-0.2.2}/pyproject.toml +5 -1
- {brukerapi-0.2.0 → brukerapi-0.2.2}/LICENSE +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/MANIFEST.in +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/README.rst +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/__init__.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/cli.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_2dseq_core.json +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_2dseq_custom.json +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_fid_core.json +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_rawdata_core.json +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_rawdata_custom.json +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_traj_core.json +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_traj_custom.json +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/data.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/exceptions.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/folders.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/jcampdx.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/mergers.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/splitters.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/utils.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/SOURCES.txt +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/dependency_links.txt +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/entry_points.txt +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/not-zip-safe +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/requires.txt +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/top_level.txt +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/setup.cfg +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_dataset.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_exceptions.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_jcampdx.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_random_access.py +0 -0
- {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_split.py +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: brukerapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Bruker API
|
|
5
5
|
Author-email: Tomas Psorn <tomaspsorn@isibrno.cz>, Jiri Vitous <vitous@isibrno.cz>
|
|
6
|
+
Maintainer-email: Jiri Vitous <vitous@isibrno.cz>
|
|
6
7
|
License: MIT
|
|
7
8
|
Project-URL: Homepage, https://github.com/isi-nmr/brukerapi-python
|
|
8
9
|
Project-URL: Download, https://github.com/isi-nmr/brukerapi-python/releases/latest
|
|
@@ -40,6 +40,12 @@ DEFAULT_STATES = {
|
|
|
40
40
|
"load": LOAD_STAGES["all"],
|
|
41
41
|
"mmap": False,
|
|
42
42
|
},
|
|
43
|
+
"fid_proc": {
|
|
44
|
+
"parameter_files": ["acqp", "method"],
|
|
45
|
+
"property_files": [Path(__file__).parents[0] / "config/properties_fid_core.json", Path(__file__).parents[0] / "config/properties_fid_custom.json"],
|
|
46
|
+
"load": LOAD_STAGES["all"],
|
|
47
|
+
"mmap": False,
|
|
48
|
+
},
|
|
43
49
|
"2dseq": {
|
|
44
50
|
"parameter_files": ["visu_pars"],
|
|
45
51
|
"property_files": [Path(__file__).parents[0] / "config/properties_2dseq_core.json", Path(__file__).parents[0] / "config/properties_2dseq_custom.json"],
|
|
@@ -77,6 +83,15 @@ RELATIVE_PATHS = {
|
|
|
77
83
|
"AdjStatePerScan": "./AdjStatePerScan",
|
|
78
84
|
"AdjStatePerStudy": "../AdjStatePerStudy",
|
|
79
85
|
},
|
|
86
|
+
"fid_proc": {
|
|
87
|
+
"method": "../../method",
|
|
88
|
+
"acqp": "../../acqp",
|
|
89
|
+
"subject": "../../../subject",
|
|
90
|
+
"reco": "./reco",
|
|
91
|
+
"visu_pars": "./visu_pars",
|
|
92
|
+
"AdjStatePerScan": "../../AdjStatePerScan",
|
|
93
|
+
"AdjStatePerStudy": "../../../AdjStatePerStudy",
|
|
94
|
+
},
|
|
80
95
|
"2dseq": {
|
|
81
96
|
"method": "../../method",
|
|
82
97
|
"acqp": "../../acqp",
|
|
@@ -156,7 +171,7 @@ class Dataset:
|
|
|
156
171
|
containing it. It is possible, to create an empty object using the load switch.
|
|
157
172
|
|
|
158
173
|
:param path: **str** path to dataset
|
|
159
|
-
:raise: :
|
|
174
|
+
:raise: :UnsupportedDatasetType: In case `Dataset.type` is not in SUPPORTED
|
|
160
175
|
:raise: :IncompleteDataset: If any of the JCAMP-DX files, necessary to create a Dataset instance is missing
|
|
161
176
|
|
|
162
177
|
"""
|
|
@@ -248,8 +263,12 @@ class Dataset:
|
|
|
248
263
|
raise UnsuportedDatasetType(self.type)
|
|
249
264
|
|
|
250
265
|
# Check whether all necessary JCAMP-DX files are present
|
|
251
|
-
if self._state.get("load") >= LOAD_STAGES["parameters"]
|
|
252
|
-
|
|
266
|
+
if self._state.get("load") >= LOAD_STAGES["parameters"]:
|
|
267
|
+
for i in DEFAULT_STATES[self.type]["parameter_files"]:
|
|
268
|
+
param_path = self.path.parent / RELATIVE_PATHS[self.type][i]
|
|
269
|
+
if i not in set(os.listdir(str(param_path.parent))):
|
|
270
|
+
raise IncompleteDataset
|
|
271
|
+
|
|
253
272
|
|
|
254
273
|
def load(self):
|
|
255
274
|
"""
|
|
@@ -381,7 +400,8 @@ class Dataset:
|
|
|
381
400
|
|
|
382
401
|
def unload_properties(self):
|
|
383
402
|
for property in self._properties:
|
|
384
|
-
|
|
403
|
+
if hasattr(self, property):
|
|
404
|
+
delattr(self,property)
|
|
385
405
|
self._properties = []
|
|
386
406
|
self._state["load_properties"] = False
|
|
387
407
|
|
|
@@ -486,7 +506,7 @@ class Dataset:
|
|
|
486
506
|
"""
|
|
487
507
|
Load the schema for given data set.
|
|
488
508
|
"""
|
|
489
|
-
if self.type
|
|
509
|
+
if self.type in ["fid", "fid_proc"]:
|
|
490
510
|
self._schema = SchemaFid(self)
|
|
491
511
|
elif self.type == "2dseq":
|
|
492
512
|
self._schema = Schema2dseq(self)
|
|
@@ -10,6 +10,20 @@ config_paths = {"core": Path(__file__).parents[0] / "config", "custom": Path(__f
|
|
|
10
10
|
# properties required for loading of the data array for each dataset type
|
|
11
11
|
REQUIRED_PROPERTIES = {
|
|
12
12
|
"fid": ["numpy_dtype", "channels", "block_size", "acq_lenght", "scheme_id", "block_count", "encoding_space", "permute", "k_space", "encoded_dim", "shape_storage", "dim_type"],
|
|
13
|
+
"fid_proc": [
|
|
14
|
+
"numpy_dtype",
|
|
15
|
+
"channels",
|
|
16
|
+
"block_size",
|
|
17
|
+
"acq_lenght",
|
|
18
|
+
"scheme_id",
|
|
19
|
+
"block_count",
|
|
20
|
+
"encoding_space",
|
|
21
|
+
"permute",
|
|
22
|
+
"k_space",
|
|
23
|
+
"encoded_dim",
|
|
24
|
+
"shape_storage",
|
|
25
|
+
"dim_type"
|
|
26
|
+
],
|
|
13
27
|
"2dseq": [
|
|
14
28
|
"pv_version",
|
|
15
29
|
"numpy_dtype",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: brukerapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Bruker API
|
|
5
5
|
Author-email: Tomas Psorn <tomaspsorn@isibrno.cz>, Jiri Vitous <vitous@isibrno.cz>
|
|
6
|
+
Maintainer-email: Jiri Vitous <vitous@isibrno.cz>
|
|
6
7
|
License: MIT
|
|
7
8
|
Project-URL: Homepage, https://github.com/isi-nmr/brukerapi-python
|
|
8
9
|
Project-URL: Download, https://github.com/isi-nmr/brukerapi-python/releases/latest
|
|
@@ -4,12 +4,14 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "brukerapi"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Bruker API"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Tomas Psorn", email = "tomaspsorn@isibrno.cz" },
|
|
11
11
|
{ name = "Jiri Vitous", email = "vitous@isibrno.cz" },
|
|
12
12
|
]
|
|
13
|
+
maintainers = [{ name = "Jiri Vitous", email = "vitous@isibrno.cz" }]
|
|
14
|
+
|
|
13
15
|
license = { text = "MIT" }
|
|
14
16
|
readme = "README.rst"
|
|
15
17
|
requires-python = ">=3.8"
|
|
@@ -18,6 +20,8 @@ dependencies = [
|
|
|
18
20
|
"numpy>=1.26.0; python_version>='3.9'",
|
|
19
21
|
"pyyaml",
|
|
20
22
|
]
|
|
23
|
+
|
|
24
|
+
|
|
21
25
|
urls = { "Homepage" = "https://github.com/isi-nmr/brukerapi-python", "Download" = "https://github.com/isi-nmr/brukerapi-python/releases/latest" }
|
|
22
26
|
|
|
23
27
|
[project.scripts]
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|