toolapi 0.1.0__cp39-abi3-win_arm64.whl
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.
Potentially problematic release.
This version of toolapi might be problematic. Click here for more details.
- toolapi/__init__.py +4 -0
- toolapi/_core.pyd +0 -0
- toolapi/_core.pyi +3 -0
- toolapi/value.py +85 -0
- toolapi-0.1.0.dist-info/METADATA +9 -0
- toolapi-0.1.0.dist-info/RECORD +7 -0
- toolapi-0.1.0.dist-info/WHEEL +4 -0
toolapi/__init__.py
ADDED
toolapi/_core.pyd
ADDED
|
Binary file
|
toolapi/_core.pyi
ADDED
toolapi/value.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"""Pure Python wrapper classes for toolapi Value types.
|
|
2
|
+
|
|
3
|
+
These classes mirror the Rust Value enum variants. The Rust ``obj_to_value``
|
|
4
|
+
converter dispatches on the Python class name.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from dataclasses import dataclass
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@dataclass
|
|
13
|
+
class TissueProperties:
|
|
14
|
+
t1: float
|
|
15
|
+
t2: float
|
|
16
|
+
t2dash: float
|
|
17
|
+
adc: float
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@dataclass
|
|
21
|
+
class VoxelGridPhantom:
|
|
22
|
+
voxel_shape_type: str
|
|
23
|
+
voxel_shape_data: list[float]
|
|
24
|
+
grid_spacing: list[float]
|
|
25
|
+
grid_size: list[int]
|
|
26
|
+
pd: list[float]
|
|
27
|
+
t1: list[float]
|
|
28
|
+
t2: list[float]
|
|
29
|
+
t2dash: list[float]
|
|
30
|
+
adc: list[float]
|
|
31
|
+
b0: list[float]
|
|
32
|
+
b1: list[list[float]]
|
|
33
|
+
coil_sens: list[list[float]]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@dataclass
|
|
37
|
+
class MultiTissuePhantom:
|
|
38
|
+
voxel_shape_type: str
|
|
39
|
+
voxel_shape_data: list[float]
|
|
40
|
+
grid_spacing: list[float]
|
|
41
|
+
grid_size: list[int]
|
|
42
|
+
b1: list[list[float]]
|
|
43
|
+
coil_sens: list[list[float]]
|
|
44
|
+
tissues: list[tuple[list[float], list[float], TissueProperties]]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Event:
|
|
48
|
+
def __init__(self, variant: str, **kwargs):
|
|
49
|
+
self.variant = variant
|
|
50
|
+
self.fields = kwargs
|
|
51
|
+
|
|
52
|
+
@staticmethod
|
|
53
|
+
def Pulse(angle: float, phase: float) -> Event:
|
|
54
|
+
return Event("Pulse", angle=angle, phase=phase)
|
|
55
|
+
|
|
56
|
+
@staticmethod
|
|
57
|
+
def Fid(kt: list[float]) -> Event:
|
|
58
|
+
return Event("Fid", kt=kt)
|
|
59
|
+
|
|
60
|
+
@staticmethod
|
|
61
|
+
def Adc(phase: float) -> Event:
|
|
62
|
+
return Event("Adc", phase=phase)
|
|
63
|
+
|
|
64
|
+
def __repr__(self):
|
|
65
|
+
return f"Event.{self.variant}({self.fields})"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@dataclass
|
|
69
|
+
class EventSeq:
|
|
70
|
+
events: list[Event]
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
@dataclass
|
|
74
|
+
class BlockSeq:
|
|
75
|
+
blocks: list
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@dataclass
|
|
79
|
+
class Block:
|
|
80
|
+
min_duration: float = 0.0
|
|
81
|
+
rf: object = None
|
|
82
|
+
gx: object = None
|
|
83
|
+
gy: object = None
|
|
84
|
+
gz: object = None
|
|
85
|
+
adc: object = None
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: toolapi
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
|
+
Requires-Dist: mrzerocore>=0.2.4 ; extra == 'test'
|
|
8
|
+
Provides-Extra: test
|
|
9
|
+
Requires-Python: >=3.8
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
toolapi\__init__.py,sha256=Y2udfo9k8kSbGhwUf5ThiNk8Q70Mja9F0OAR38WK5Nk,90
|
|
2
|
+
toolapi\_core.pyd,sha256=ovwFaDLHmpRuUJkTNuAUlEbTAmBQa_g2mMRSS9prvLo,1914880
|
|
3
|
+
toolapi\_core.pyi,sha256=qxdl-RAgLvIn5ccMqsOe3aOGo2NnAbF6nSMfjByqNYQ,139
|
|
4
|
+
toolapi\value.py,sha256=CZ1EeE6Rsm40E9zyt8_-oLx2YnAPTHGJi6xFFiskUzI,1841
|
|
5
|
+
toolapi-0.1.0.dist-info\METADATA,sha256=sa2_OPM_tVAtDQ1HRT0tBgCwF-B2Sdf4kTO2Ix4_pJU,328
|
|
6
|
+
toolapi-0.1.0.dist-info\WHEEL,sha256=h8w_DW0LiywXMbSUHCLul_l4CebRZjDSZjnp7AvBr2Y,95
|
|
7
|
+
toolapi-0.1.0.dist-info\RECORD,,
|