spinlab 0.0.2__tar.gz → 0.0.3__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.
- {spinlab-0.0.2/SpinLab.egg-info → spinlab-0.0.3}/PKG-INFO +1 -1
- {spinlab-0.0.2 → spinlab-0.0.3/SpinLab.egg-info}/PKG-INFO +1 -1
- {spinlab-0.0.2 → spinlab-0.0.3}/pyproject.toml +2 -2
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/specman.py +26 -4
- {spinlab-0.0.2 → spinlab-0.0.3}/LICENSE.txt +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/MANIFEST.in +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/README.md +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/SpinLab.egg-info/SOURCES.txt +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/SpinLab.egg-info/dependency_links.txt +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/SpinLab.egg-info/top_level.txt +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/setup.cfg +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/analysis/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/analysis/hydration.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/analysis/peaks.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/analysis/relaxation_fit.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/analysis/simulate_enhancement_profiles.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/config/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/config/config.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/config/spinlab.cfg +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/constants/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/constants/constants.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/constants/mrProperties.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/constants/radicalProperties.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/core/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/core/base.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/core/coord.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/core/data.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/core/ufunc.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/core/util.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/fitting/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/fitting/general.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/bes3t.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/cnsi.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/delta.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/h5.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/load.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/load_csv.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/logs.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/mat.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/power.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/prospa.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/random.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/rs2d.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/save.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/tnmr.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/topspin.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/vna.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/vnmrj.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/io/winepr.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/math/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/math/lineshape.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/math/pulses.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/math/relaxation.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/math/window.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/plotting/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/plotting/colors.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/plotting/general.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/plotting/image.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/plotting/stack_plot.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/align.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/apodization.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/average.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/conversion.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/fft.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/helpers.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/integration.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/interpolation.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/offset.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/processing/phase.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/reporting/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/version.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/widgets/__init__.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/widgets/align_widget.py +0 -0
- {spinlab-0.0.2 → spinlab-0.0.3}/spinlab/widgets/phase_widget.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "spinlab"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.3"
|
|
4
4
|
description = "SpinLab - Bringing the Power of Python to NMR-EPR Spectroscopy"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -25,4 +25,4 @@ build-backend = "setuptools.build_meta"
|
|
|
25
25
|
include-package-data = true
|
|
26
26
|
|
|
27
27
|
[tool.setuptools.package-data]
|
|
28
|
-
mypkg = ["*.cfg"]
|
|
28
|
+
mypkg = ["*.cfg"]
|
|
@@ -17,7 +17,11 @@ scale_dict = {
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def import_specman(
|
|
20
|
-
path,
|
|
20
|
+
path,
|
|
21
|
+
autodetect_coords: bool = True,
|
|
22
|
+
autodetect_dims: bool = True,
|
|
23
|
+
make_complex: bool = True,
|
|
24
|
+
complex_dim: str = "x",
|
|
21
25
|
):
|
|
22
26
|
"""Import SpecMan data and return SpinData object
|
|
23
27
|
|
|
@@ -30,6 +34,9 @@ def import_specman(
|
|
|
30
34
|
path (str): Path to either .exp file
|
|
31
35
|
autodetect_coords(bool): Autodetect coords based on attrs
|
|
32
36
|
autodetect_dims(bool): Autodetect dims based on attrs
|
|
37
|
+
make_complex (bool): If True, will create a complex SpinData object if the data is complex
|
|
38
|
+
complex_dim (str): The dimension to use for complex data (default: 'x')
|
|
39
|
+
|
|
33
40
|
Returns:
|
|
34
41
|
data (SpinData): SpinData object containing SpecMan EPR data
|
|
35
42
|
"""
|
|
@@ -68,7 +75,9 @@ def import_specman(
|
|
|
68
75
|
attrs["experiment_type"] = "epr_spectrum"
|
|
69
76
|
|
|
70
77
|
specman_data = _sl.SpinData(data, dims, coords, attrs)
|
|
71
|
-
|
|
78
|
+
if make_complex:
|
|
79
|
+
if complex_dim in dims and len(specman_data.coords[complex_dim]) == 2:
|
|
80
|
+
specman_data = _sl.create_complex(specman_data, complex_dim)
|
|
72
81
|
return specman_data
|
|
73
82
|
|
|
74
83
|
|
|
@@ -233,7 +242,6 @@ def analyze_attrs(attrs):
|
|
|
233
242
|
unit = None
|
|
234
243
|
if len(val_list) > 1:
|
|
235
244
|
unit = val_list[-1] # get unit
|
|
236
|
-
|
|
237
245
|
val = val_list[0].strip(",")
|
|
238
246
|
val_unit = val_list[1] if len(val_list) == 5 else None
|
|
239
247
|
temp[new_key] = int(val) if "." not in val else float(val)
|
|
@@ -338,9 +346,23 @@ def calculate_specman_coords(attrs, old_coords, dims=None):
|
|
|
338
346
|
coord = _np.linspace(start, stop, length)
|
|
339
347
|
elif dim in attrs and dim + "_step" not in attrs and dim + "_stop" not in attrs:
|
|
340
348
|
val_string = attrs["params_" + dim].split(";")[0]
|
|
349
|
+
val_string = val_string.replace(", ", ",").split(",")
|
|
341
350
|
coord = _np.array(
|
|
342
|
-
[
|
|
351
|
+
[
|
|
352
|
+
float(val.split()[0])
|
|
353
|
+
for val in val_string
|
|
354
|
+
if val.split()[0].replace(".", "").isdigit()
|
|
355
|
+
]
|
|
343
356
|
)
|
|
357
|
+
units = []
|
|
358
|
+
try:
|
|
359
|
+
units = [x.split()[1] for x in val_string if not x.split()[1].isdigit()]
|
|
360
|
+
except IndexError:
|
|
361
|
+
pass
|
|
362
|
+
|
|
363
|
+
if units:
|
|
364
|
+
for i in range(len(coord)):
|
|
365
|
+
coord[i] *= _convert_unit(units[i])
|
|
344
366
|
else:
|
|
345
367
|
coord = _np.arange(0.0, length)
|
|
346
368
|
coords.append(_np.array(coord))
|
|
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
|
|
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
|
|
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
|