MRArbGrad 2.1.0__tar.gz → 3.0.0__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 (45) hide show
  1. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0/MRArbGrad.egg-info}/PKG-INFO +1 -1
  2. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/MRArbGrad.egg-info/SOURCES.txt +1 -4
  3. {mrarbgrad-2.1.0/MRArbGrad.egg-info → mrarbgrad-3.0.0}/PKG-INFO +1 -1
  4. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/example/example_BuiltInTraj.py +4 -4
  5. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/example/example_ExternalFunction2D.py +1 -1
  6. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/example/example_ExternalSamples2D.py +1 -1
  7. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/example/example_ExternalSamples3D.py +1 -1
  8. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/Function.py +13 -27
  9. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/__init__.py +1 -1
  10. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/mag/Mag.h +0 -13
  11. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/main.cpp +93 -95
  12. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/Cones.h +4 -6
  13. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/MrTraj.h +29 -37
  14. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/MrTraj_2D.h +3 -3
  15. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/Rosette.h +12 -12
  16. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/Seiffert.h +4 -7
  17. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/Shell3d.h +6 -6
  18. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/Spiral.h +5 -5
  19. mrarbgrad-2.1.0/mrarbgrad_src/ext/traj/VarDenSpiral.h → mrarbgrad-3.0.0/mrarbgrad_src/ext/traj/VDSpiral.h +16 -16
  20. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/Yarnball.h +10 -10
  21. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/utility/Intp.h +0 -2
  22. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/utility/global.h +13 -1
  23. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/utility/v3.h +6 -8
  24. mrarbgrad-3.0.0/mrarbgrad_src/trajfunc/__init__.py +1 -0
  25. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/trajfunc/main.py +3 -3
  26. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/pyproject.toml +1 -1
  27. mrarbgrad-2.1.0/mrarbgrad_src/TrajFunc.py +0 -47
  28. mrarbgrad-2.1.0/mrarbgrad_src/ext/mag/GradGen.cpp +0 -439
  29. mrarbgrad-2.1.0/mrarbgrad_src/ext/mag/GradGen.h +0 -191
  30. mrarbgrad-2.1.0/mrarbgrad_src/trajfunc/__init__.py +0 -1
  31. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/LICENSE +0 -0
  32. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/MANIFEST.in +0 -0
  33. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/MRArbGrad.egg-info/dependency_links.txt +0 -0
  34. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/MRArbGrad.egg-info/requires.txt +0 -0
  35. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/MRArbGrad.egg-info/top_level.txt +0 -0
  36. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/README.md +0 -0
  37. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/Utility.py +0 -0
  38. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/mag/Mag.cpp +0 -0
  39. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/traj/TrajFunc.h +0 -0
  40. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/utility/LinIntp.h +0 -0
  41. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/utility/SplineIntp.h +0 -0
  42. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/utility/global.cpp +0 -0
  43. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/mrarbgrad_src/ext/utility/v3.cpp +0 -0
  44. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/setup.cfg +0 -0
  45. {mrarbgrad-2.1.0 → mrarbgrad-3.0.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MRArbGrad
3
- Version: 2.1.0
3
+ Version: 3.0.0
4
4
  Summary: Gradient waveform design tool for arbitrary k-space trajectories.
5
5
  Author-email: Ryan <ryan_shanghaitech@proton.me>
6
6
  License-Expression: MIT
@@ -17,12 +17,9 @@ example/example_ExternalFunction2D.py
17
17
  example/example_ExternalSamples2D.py
18
18
  example/example_ExternalSamples3D.py
19
19
  mrarbgrad_src/Function.py
20
- mrarbgrad_src/TrajFunc.py
21
20
  mrarbgrad_src/Utility.py
22
21
  mrarbgrad_src/__init__.py
23
22
  mrarbgrad_src/ext/main.cpp
24
- mrarbgrad_src/ext/mag/GradGen.cpp
25
- mrarbgrad_src/ext/mag/GradGen.h
26
23
  mrarbgrad_src/ext/mag/Mag.cpp
27
24
  mrarbgrad_src/ext/mag/Mag.h
28
25
  mrarbgrad_src/ext/traj/Cones.h
@@ -33,7 +30,7 @@ mrarbgrad_src/ext/traj/Seiffert.h
33
30
  mrarbgrad_src/ext/traj/Shell3d.h
34
31
  mrarbgrad_src/ext/traj/Spiral.h
35
32
  mrarbgrad_src/ext/traj/TrajFunc.h
36
- mrarbgrad_src/ext/traj/VarDenSpiral.h
33
+ mrarbgrad_src/ext/traj/VDSpiral.h
37
34
  mrarbgrad_src/ext/traj/Yarnball.h
38
35
  mrarbgrad_src/ext/utility/Intp.h
39
36
  mrarbgrad_src/ext/utility/LinIntp.h
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MRArbGrad
3
- Version: 2.1.0
3
+ Version: 3.0.0
4
4
  Summary: Gradient waveform design tool for arbitrary k-space trajectories.
5
5
  Author-email: Ryan <ryan_shanghaitech@proton.me>
6
6
  License-Expression: MIT
@@ -26,10 +26,10 @@ mag.setMagTrajRep(1) # enable trajectory reparameterization (experimental)
26
26
  mag.setDbgPrint(1) # enable debug info (for benchmark purpose)
27
27
 
28
28
  # calculate gradient
29
- # lstArrK0, lstArrGrad = mag.getG_Spiral(is3D=0, **argCom); nAx = 2
30
- # lstArrK0, lstArrGrad = mag.getG_VarDenSpiral(is3D=0, **argCom); nAx = 2
31
- # lstArrK0, lstArrGrad = mag.getG_VarDenSpiral_RT(is3D=0, **argCom); nAx = 2
32
- lstArrK0, lstArrGrad = mag.getG_Rosette(is3D=0, **argCom); nAx = 2
29
+ # lstArrK0, lstArrGrad = mag.getG_Spiral(**argCom); nAx = 2
30
+ # lstArrK0, lstArrGrad = mag.getG_VDSpiral(**argCom); nAx = 2
31
+ # lstArrK0, lstArrGrad = mag.getG_VDSpiral_RT(**argCom); nAx = 2
32
+ lstArrK0, lstArrGrad = mag.getG_Rosette(**argCom); nAx = 2
33
33
  # lstArrK0, lstArrGrad = mag.getG_Rosette_Trad(**argCom); nAx = 2
34
34
  # lstArrK0, lstArrGrad = mag.getG_Shell3d(**argCom); nAx = 3
35
35
  # lstArrK0, lstArrGrad = mag.getG_Yarnball(**argCom); nAx = 3
@@ -28,7 +28,7 @@ def Rosette(t):
28
28
  pLim = [0,1]
29
29
 
30
30
  # derive slew-rate constrained trajectory
31
- arrGrad = mag.calGrad4ExFunc(False, fov, nPix, sLim, gLim, dtGrad, Rosette, None, None, pLim[0], pLim[1])[0]
31
+ arrGrad = mag.calGrad4ExFunc(fov, nPix, sLim, gLim, dtGrad, Rosette, None, None, pLim[0], pLim[1])[0]
32
32
  # arrGrad = mag.gradClip(arrGrad, dtGrad, sLim, gLim) # clip slew/grad amp with hardware constraint
33
33
  nRO = arrGrad.shape[0]
34
34
 
@@ -32,7 +32,7 @@ nAx = 2
32
32
 
33
33
  # derive slew-rate constrained trajectory
34
34
  for i in range(1):
35
- arrGrad = mag.calGrad4ExSamp(False, fov, nPix, sLim, gLim, dtGrad, arrK)[0]
35
+ arrGrad = mag.calGrad4ExSamp(fov, nPix, sLim, gLim, dtGrad, arrK)[0]
36
36
  # arrGrad = mag.gradClip(arrGrad, dtGrad, sLim, gLim) # clip slew/grad amp with hardware constraint
37
37
  nRO = arrGrad.shape[0]
38
38
 
@@ -24,7 +24,7 @@ arrK = Yarnball(arrP)
24
24
 
25
25
  # derive slew-rate constrained trajectory
26
26
  mag.setDbgPrint(1)
27
- arrGrad = mag.calGrad4ExSamp(True, fov, nPix, sLim, gLim, dtGrad, arrK)[0]
27
+ arrGrad = mag.calGrad4ExSamp(fov, nPix, sLim, gLim, dtGrad, arrK)[0]
28
28
  # arrGrad = mag.gradClip(arrGrad, dtGrad, sLim, gLim) # clip slew/grad amp with hardware constraint
29
29
  nRO = arrGrad.shape[0]
30
30
 
@@ -9,7 +9,6 @@ goldang = getGoldang()
9
9
 
10
10
  def calGrad4ExFunc\
11
11
  (
12
- is3D: bool = False,
13
12
  fov: float64 = 0.256,
14
13
  nPix: int64 = 256,
15
14
 
@@ -30,7 +29,6 @@ def calGrad4ExFunc\
30
29
  '''
31
30
  return ext.calGrad4ExFunc\
32
31
  (
33
- int64(is3D),
34
32
  float64(fov),
35
33
  int64(nPix),
36
34
 
@@ -48,7 +46,6 @@ def calGrad4ExFunc\
48
46
 
49
47
  def calGrad4ExSamp\
50
48
  (
51
- is3D: bool = False,
52
49
  fov: float64 = 0.256,
53
50
  nPix: int64 = 256,
54
51
 
@@ -64,7 +61,6 @@ def calGrad4ExSamp\
64
61
  '''
65
62
  return ext.calGrad4ExSamp\
66
63
  (
67
- int64(is3D),
68
64
  float64(fov),
69
65
  int64(nPix),
70
66
 
@@ -77,7 +73,6 @@ def calGrad4ExSamp\
77
73
 
78
74
  def getG_Spiral\
79
75
  (
80
- is3D: bool = False,
81
76
  fov: float64 = 0.256,
82
77
  nPix: int64 = 256,
83
78
 
@@ -85,6 +80,7 @@ def getG_Spiral\
85
80
  gLim: float64 = 50e-3 * 42.5756e6 * 0.256 / 256,
86
81
  dt: float64 = 10e-6,
87
82
 
83
+ nSlice: int64 = 1,
88
84
  kRhoPhi: float64 = 0.5 / (4 * pi)
89
85
  ) -> tuple[list[NDArray], list[NDArray]]:
90
86
  '''
@@ -93,7 +89,6 @@ def getG_Spiral\
93
89
  '''
94
90
  return ext.getG_Spiral\
95
91
  (
96
- int64(is3D),
97
92
  float64(fov),
98
93
  int64(nPix),
99
94
 
@@ -101,19 +96,20 @@ def getG_Spiral\
101
96
  float64(gLim),
102
97
  float64(dt),
103
98
 
99
+ int64(nSlice),
104
100
  float64(kRhoPhi)
105
101
  )
106
102
 
107
- def getG_VarDenSpiral\
103
+ def getG_VDSpiral\
108
104
  (
109
- is3D: bool = False,
110
105
  fov: float64 = 0.256,
111
106
  nPix: int64 = 256,
112
107
 
113
108
  sLim: float64 = 50 * 42.5756e6 * 0.256 / 256,
114
109
  gLim: float64 = 50e-3 * 42.5756e6 * 0.256 / 256,
115
110
  dt: float64 = 10e-6,
116
-
111
+
112
+ nSlice: int64 = 1,
117
113
  kRhoPhi0: float64 = 0.5 / (8 * pi),
118
114
  kRhoPhi1: float64 = 0.5 / (2 * pi),
119
115
  ) -> tuple[list[NDArray], list[NDArray]]:
@@ -121,9 +117,8 @@ def getG_VarDenSpiral\
121
117
  :return: list of trajectory start, list of gradient waveforms
122
118
  :rtype: tuple[list[NDArray], list[NDArray]]
123
119
  '''
124
- return ext.getG_VarDenSpiral\
120
+ return ext.getG_VDSpiral\
125
121
  (
126
- int64(is3D),
127
122
  float64(fov),
128
123
  int64(nPix),
129
124
 
@@ -131,13 +126,13 @@ def getG_VarDenSpiral\
131
126
  float64(gLim),
132
127
  float64(dt),
133
128
 
129
+ int64(nSlice),
134
130
  float64(kRhoPhi0),
135
131
  float64(kRhoPhi1)
136
132
  )
137
133
 
138
- def getG_VarDenSpiral_RT\
134
+ def getG_VDSpiral_RT\
139
135
  (
140
- is3D: bool = False,
141
136
  fov: float64 = 0.256,
142
137
  nPix: int64 = 256,
143
138
 
@@ -153,9 +148,8 @@ def getG_VarDenSpiral_RT\
153
148
  :return: list of trajectory start, list of gradient waveforms
154
149
  :rtype: tuple[list[NDArray], list[NDArray]]
155
150
  '''
156
- return ext.getG_VarDenSpiral_RT\
151
+ return ext.getG_VDSpiral_RT\
157
152
  (
158
- int64(is3D),
159
153
  float64(fov),
160
154
  int64(nPix),
161
155
 
@@ -171,7 +165,6 @@ def getG_VarDenSpiral_RT\
171
165
 
172
166
  def getG_Rosette\
173
167
  (
174
- is3D: bool = False,
175
168
  fov: float64 = 0.256,
176
169
  nPix: int64 = 256,
177
170
 
@@ -179,6 +172,7 @@ def getG_Rosette\
179
172
  gLim: float64 = 50e-3 * 42.5756e6 * 0.256 / 256,
180
173
  dt: float64 = 10e-6,
181
174
 
175
+ nSlice: int64 = 1,
182
176
  om1: float64 = 5*pi,
183
177
  om2: float64 = 3*pi,
184
178
  tMax: float64 = 1e0,
@@ -189,7 +183,6 @@ def getG_Rosette\
189
183
  '''
190
184
  return ext.getG_Rosette\
191
185
  (
192
- int64(is3D),
193
186
  float64(fov),
194
187
  int64(nPix),
195
188
 
@@ -197,6 +190,7 @@ def getG_Rosette\
197
190
  float64(gLim),
198
191
  float64(dt),
199
192
 
193
+ int64(nSlice),
200
194
  float64(om1),
201
195
  float64(om2),
202
196
  float64(tMax)
@@ -204,7 +198,6 @@ def getG_Rosette\
204
198
 
205
199
  def getG_Rosette_Trad\
206
200
  (
207
- is3D: bool = False,
208
201
  fov: float64 = 0.256,
209
202
  nPix: int64 = 256,
210
203
 
@@ -212,6 +205,7 @@ def getG_Rosette_Trad\
212
205
  gLim: float64 = 50e-3 * 42.5756e6 * 0.256 / 256,
213
206
  dt: float64 = 10e-6,
214
207
 
208
+ nSlice: int64 = 1,
215
209
  om1: float64 = 5*pi,
216
210
  om2: float64 = 3*pi,
217
211
  tMax: float64 = 1e0,
@@ -223,7 +217,6 @@ def getG_Rosette_Trad\
223
217
  '''
224
218
  return ext.getG_Rosette_Trad\
225
219
  (
226
- int64(is3D),
227
220
  float64(fov),
228
221
  int64(nPix),
229
222
 
@@ -231,6 +224,7 @@ def getG_Rosette_Trad\
231
224
  float64(gLim),
232
225
  float64(dt),
233
226
 
227
+ int64(nSlice),
234
228
  float64(om1),
235
229
  float64(om2),
236
230
  float64(tMax),
@@ -239,7 +233,6 @@ def getG_Rosette_Trad\
239
233
 
240
234
  def getG_Shell3d\
241
235
  (
242
- is3D: bool = False,
243
236
  fov: float64 = 0.256,
244
237
  nPix: int64 = 256,
245
238
 
@@ -255,7 +248,6 @@ def getG_Shell3d\
255
248
  '''
256
249
  return ext.getG_Shell3d\
257
250
  (
258
- int64(is3D),
259
251
  float64(fov),
260
252
  int64(nPix),
261
253
 
@@ -268,7 +260,6 @@ def getG_Shell3d\
268
260
 
269
261
  def getG_Yarnball\
270
262
  (
271
- is3D: bool = False,
272
263
  fov: float64 = 0.256,
273
264
  nPix: int64 = 256,
274
265
 
@@ -284,7 +275,6 @@ def getG_Yarnball\
284
275
  '''
285
276
  return ext.getG_Yarnball\
286
277
  (
287
- int64(is3D),
288
278
  float64(fov),
289
279
  int64(nPix),
290
280
 
@@ -297,7 +287,6 @@ def getG_Yarnball\
297
287
 
298
288
  def getG_Seiffert\
299
289
  (
300
- is3D: bool = False,
301
290
  fov: float64 = 0.256,
302
291
  nPix: int64 = 256,
303
292
 
@@ -314,7 +303,6 @@ def getG_Seiffert\
314
303
  '''
315
304
  return ext.getG_Seiffert\
316
305
  (
317
- int64(is3D),
318
306
  float64(fov),
319
307
  int64(nPix),
320
308
 
@@ -328,7 +316,6 @@ def getG_Seiffert\
328
316
 
329
317
  def getG_Cones\
330
318
  (
331
- is3D: bool = False,
332
319
  fov: float64 = 0.256,
333
320
  nPix: int64 = 256,
334
321
 
@@ -344,7 +331,6 @@ def getG_Cones\
344
331
  '''
345
332
  return ext.getG_Cones\
346
333
  (
347
- int64(is3D),
348
334
  float64(fov),
349
335
  int64(nPix),
350
336
 
@@ -1,5 +1,5 @@
1
1
  from .Function import calGrad4ExFunc, calGrad4ExSamp
2
- from .Function import getG_Cones, getG_Rosette, getG_Rosette_Trad, getG_Seiffert, getG_Shell3d, getG_Spiral, getG_VarDenSpiral, getG_VarDenSpiral_RT, getG_Yarnball
2
+ from .Function import getG_Cones, getG_Rosette, getG_Rosette_Trad, getG_Seiffert, getG_Shell3d, getG_Spiral, getG_VDSpiral, getG_VDSpiral_RT, getG_Yarnball
3
3
  from .Function import setSolverMtg, setTrajRev, setGoldAng, setShuf, setMaxG0, setMaxG1, setExGEnd, setMagOverSamp, setMagSFS, setMagGradRep, setMagTrajRep, setDbgPrint
4
4
  from .Utility import _calDiaphony, rotate, _calJacElip, _calCompElipInt, _calSphFibPt, cvtGrad2Traj, getGoldang, getGoldrat, rand3d, gradClip
5
5
 
@@ -15,9 +15,6 @@
15
15
  class Spline_TrajFunc: public TrajFunc
16
16
  {
17
17
  public:
18
- typedef std::vector<v3> vv3;
19
- typedef std::vector<f64> vf64;
20
-
21
18
  Spline_TrajFunc():
22
19
  TrajFunc(0,0)
23
20
  {}
@@ -87,16 +84,6 @@ protected:
87
84
  class Mag
88
85
  {
89
86
  public:
90
- typedef std::vector<i64> vi64;
91
- typedef std::vector<f64> vf64;
92
- typedef std::list<i64> ll;
93
- typedef std::list<f64> lf64;
94
-
95
- typedef std::vector<v3> vv3;
96
- typedef std::vector<vv3> vvv3;
97
- typedef std::list<v3> lv3;
98
- typedef std::list<vv3> lvv3;
99
-
100
87
  Mag();
101
88
  bool setup
102
89
  (