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.
Files changed (37) hide show
  1. {brukerapi-0.2.0/brukerapi.egg-info → brukerapi-0.2.2}/PKG-INFO +2 -1
  2. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_fid_custom.json +1 -1
  3. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/dataset.py +25 -5
  4. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/schemas.py +14 -0
  5. {brukerapi-0.2.0 → brukerapi-0.2.2/brukerapi.egg-info}/PKG-INFO +2 -1
  6. {brukerapi-0.2.0 → brukerapi-0.2.2}/pyproject.toml +5 -1
  7. {brukerapi-0.2.0 → brukerapi-0.2.2}/LICENSE +0 -0
  8. {brukerapi-0.2.0 → brukerapi-0.2.2}/MANIFEST.in +0 -0
  9. {brukerapi-0.2.0 → brukerapi-0.2.2}/README.rst +0 -0
  10. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/__init__.py +0 -0
  11. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/cli.py +0 -0
  12. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_2dseq_core.json +0 -0
  13. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_2dseq_custom.json +0 -0
  14. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_fid_core.json +0 -0
  15. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_rawdata_core.json +0 -0
  16. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_rawdata_custom.json +0 -0
  17. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_traj_core.json +0 -0
  18. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/config/properties_traj_custom.json +0 -0
  19. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/data.py +0 -0
  20. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/exceptions.py +0 -0
  21. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/folders.py +0 -0
  22. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/jcampdx.py +0 -0
  23. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/mergers.py +0 -0
  24. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/splitters.py +0 -0
  25. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi/utils.py +0 -0
  26. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/SOURCES.txt +0 -0
  27. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/dependency_links.txt +0 -0
  28. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/entry_points.txt +0 -0
  29. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/not-zip-safe +0 -0
  30. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/requires.txt +0 -0
  31. {brukerapi-0.2.0 → brukerapi-0.2.2}/brukerapi.egg-info/top_level.txt +0 -0
  32. {brukerapi-0.2.0 → brukerapi-0.2.2}/setup.cfg +0 -0
  33. {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_dataset.py +0 -0
  34. {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_exceptions.py +0 -0
  35. {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_jcampdx.py +0 -0
  36. {brukerapi-0.2.0 → brukerapi-0.2.2}/test/test_random_access.py +0 -0
  37. {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.0
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
@@ -71,7 +71,7 @@
71
71
  "dwell_s": [
72
72
  {
73
73
  "cmd": "1./ @sw_hz / 2.",
74
- "conditions": []
74
+ "conditions": ["@sw_hz!=0"]
75
75
  }
76
76
  ],
77
77
  "TR": [
@@ -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: :UnsuportedDatasetType: In case `Dataset.type` is not in SUPPORTED
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"] and not (set(DEFAULT_STATES[self.type]["parameter_files"]) <= set(os.listdir(str(self.path.parent)))):
252
- raise IncompleteDataset
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
- delattr(self, property)
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 == "fid":
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.0
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.0"
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