MRArbGrad 3.0.0__tar.gz → 3.0.1__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.
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1/MRArbGrad.egg-info}/PKG-INFO +1 -1
- {mrarbgrad-3.0.0/MRArbGrad.egg-info → mrarbgrad-3.0.1}/PKG-INFO +1 -1
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/example/example_ExternalFunction2D.py +4 -2
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/Function.py +0 -1
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/__init__.py +1 -1
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/main.cpp +2 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/MrTraj.h +15 -14
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/pyproject.toml +1 -1
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/LICENSE +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/MANIFEST.in +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/MRArbGrad.egg-info/SOURCES.txt +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/MRArbGrad.egg-info/dependency_links.txt +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/MRArbGrad.egg-info/requires.txt +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/MRArbGrad.egg-info/top_level.txt +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/README.md +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/example/example_BuiltInTraj.py +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/example/example_ExternalSamples2D.py +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/example/example_ExternalSamples3D.py +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/Utility.py +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/mag/Mag.cpp +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/mag/Mag.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/Cones.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/MrTraj_2D.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/Rosette.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/Seiffert.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/Shell3d.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/Spiral.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/TrajFunc.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/VDSpiral.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/traj/Yarnball.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/utility/Intp.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/utility/LinIntp.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/utility/SplineIntp.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/utility/global.cpp +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/utility/global.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/utility/v3.cpp +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/ext/utility/v3.h +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/trajfunc/__init__.py +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/mrarbgrad_src/trajfunc/main.py +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/setup.cfg +0 -0
- {mrarbgrad-3.0.0 → mrarbgrad-3.0.1}/setup.py +0 -0
|
@@ -6,8 +6,8 @@ import mrarbgrad as mag
|
|
|
6
6
|
gamma = 42.5756e6
|
|
7
7
|
fov = 0.256
|
|
8
8
|
nPix = 256
|
|
9
|
-
dtGrad = 10e-6
|
|
10
|
-
dtADC =
|
|
9
|
+
dtGrad = 10e-6
|
|
10
|
+
dtADC = 1e-6
|
|
11
11
|
sLim = 50 * gamma * fov/nPix
|
|
12
12
|
gLim = 20e-3 * gamma * fov/nPix
|
|
13
13
|
# gLim = 1/nPix/dtADC
|
|
@@ -28,6 +28,8 @@ def Rosette(t):
|
|
|
28
28
|
pLim = [0,1]
|
|
29
29
|
|
|
30
30
|
# derive slew-rate constrained trajectory
|
|
31
|
+
mag.setMaxG0(0)
|
|
32
|
+
mag.setMaxG1(0)
|
|
31
33
|
arrGrad = mag.calGrad4ExFunc(fov, nPix, sLim, gLim, dtGrad, Rosette, None, None, pLim[0], pLim[1])[0]
|
|
32
34
|
# arrGrad = mag.gradClip(arrGrad, dtGrad, sLim, gLim) # clip slew/grad amp with hardware constraint
|
|
33
35
|
nRO = arrGrad.shape[0]
|
|
@@ -347,7 +347,6 @@ def setGoldAng(x): ext.setGoldAng(x)
|
|
|
347
347
|
def setShuf(x): ext.setShuf(x)
|
|
348
348
|
def setMaxG0(x): ext.setMaxG0(x)
|
|
349
349
|
def setMaxG1(x): ext.setMaxG1(x)
|
|
350
|
-
def setExGEnd(x): ext.setExGEnd(x)
|
|
351
350
|
def setMagOverSamp(x): ext.setMagOverSamp(x)
|
|
352
351
|
def setMagSFS(x): ext.setMagSFS(x)
|
|
353
352
|
def setMagGradRep(x): ext.setMagGradRep(x)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from .Function import calGrad4ExFunc, calGrad4ExSamp
|
|
2
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
|
-
from .Function import setSolverMtg, setTrajRev, setGoldAng, setShuf, setMaxG0, setMaxG1,
|
|
3
|
+
from .Function import setSolverMtg, setTrajRev, setGoldAng, setShuf, setMaxG0, setMaxG1, setMagOverSamp, setMagSFS, setMagGradRep, setMagTrajRep, setDbgPrint
|
|
4
4
|
from .Utility import _calDiaphony, rotate, _calJacElip, _calCompElipInt, _calSphFibPt, cvtGrad2Traj, getGoldang, getGoldrat, rand3d, gradClip
|
|
5
5
|
|
|
6
6
|
from . import trajfunc
|
|
@@ -634,6 +634,7 @@ PyObject* setMaxG0(PyObject* self, PyObject* const* args, Py_ssize_t narg)
|
|
|
634
634
|
bool enMaxG0 = PyLong_AsLong(args[0]);
|
|
635
635
|
if (enMaxG0) gMrTraj_g0Norm = 1e6;
|
|
636
636
|
else gMrTraj_g0Norm = 0e0;
|
|
637
|
+
PRINT(gMrTraj_g0Norm); // test
|
|
637
638
|
Py_INCREF(Py_None);
|
|
638
639
|
return Py_None;
|
|
639
640
|
}
|
|
@@ -645,6 +646,7 @@ PyObject* setMaxG1(PyObject* self, PyObject* const* args, Py_ssize_t narg)
|
|
|
645
646
|
bool enMaxG1 = PyLong_AsLong(args[0]);
|
|
646
647
|
if (enMaxG1) gMrTraj_g1Norm = 1e6;
|
|
647
648
|
else gMrTraj_g1Norm = 0e0;
|
|
649
|
+
PRINT(gMrTraj_g1Norm); // test
|
|
648
650
|
Py_INCREF(Py_None);
|
|
649
651
|
return Py_None;
|
|
650
652
|
}
|
|
@@ -77,15 +77,6 @@ public:
|
|
|
77
77
|
void setGyoMagRat(f64 x)
|
|
78
78
|
{ m_gamma = x; }
|
|
79
79
|
|
|
80
|
-
void setUseMtg(bool x)
|
|
81
|
-
{ gMrTraj_enMtg = x; }
|
|
82
|
-
|
|
83
|
-
void setGNorm0(f64 x)
|
|
84
|
-
{ gMrTraj_g0Norm = x; }
|
|
85
|
-
|
|
86
|
-
void setGNorm1(f64 x)
|
|
87
|
-
{ gMrTraj_g1Norm = x; }
|
|
88
|
-
|
|
89
80
|
// a deterministic random number generator
|
|
90
81
|
static bool genRand3d(v3* v3Res, i64 lIdx)
|
|
91
82
|
{
|
|
@@ -327,6 +318,8 @@ protected:
|
|
|
327
318
|
ret &= calGRO_MTG(pvv3G, pvf64P, vf64C, objGradPara);
|
|
328
319
|
}
|
|
329
320
|
|
|
321
|
+
intpGrad(pvv3G, pvf64P, objGradPara.sLim, objGradPara.dt);
|
|
322
|
+
|
|
330
323
|
return ret;
|
|
331
324
|
}
|
|
332
325
|
|
|
@@ -357,6 +350,8 @@ protected:
|
|
|
357
350
|
ret &= calGRO_MTG(pvv3G, pvf64P, vf64C, objGradPara);
|
|
358
351
|
}
|
|
359
352
|
|
|
353
|
+
intpGrad(pvv3G, pvf64P, objGradPara.sLim, objGradPara.dt);
|
|
354
|
+
|
|
360
355
|
return ret;
|
|
361
356
|
}
|
|
362
357
|
|
|
@@ -371,7 +366,15 @@ protected:
|
|
|
371
366
|
ret &= calGRO(pvv3GRO, pvf64P, tfTraj, objGradPara, oversamp);
|
|
372
367
|
TOC;
|
|
373
368
|
|
|
374
|
-
|
|
369
|
+
if (pv3M0PE) ret &= tfTraj.getK0(pv3M0PE);
|
|
370
|
+
|
|
371
|
+
return ret;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
bool intpGrad(vv3* pvv3GRO, vf64* pvf64P, f64 sLim, f64 dt)
|
|
375
|
+
{
|
|
376
|
+
bool ret = true;
|
|
377
|
+
|
|
375
378
|
if (gMrTraj_g0Norm==0e0 && pvv3GRO)
|
|
376
379
|
{
|
|
377
380
|
// add ramp gradient to satisfy desired Gstart and Gfinal
|
|
@@ -380,7 +383,7 @@ protected:
|
|
|
380
383
|
pvv3GRO->insert(pvv3GRO->begin(), vv3GRampFront.begin(), vv3GRampFront.end());
|
|
381
384
|
|
|
382
385
|
// corresponding parameter sequence
|
|
383
|
-
if (pvf64P && !pvf64P->empty()) // null: user does not need p seq, empty:
|
|
386
|
+
if (pvf64P && !pvf64P->empty()) // null: user does not need p seq, empty: p seq not supported
|
|
384
387
|
{
|
|
385
388
|
vf64 vf64PInsert = vf64(vv3GRampFront.size(), pvf64P->front());
|
|
386
389
|
pvf64P->insert(pvf64P->begin(), vf64PInsert.begin(), vf64PInsert.end());
|
|
@@ -394,15 +397,13 @@ protected:
|
|
|
394
397
|
pvv3GRO->insert(pvv3GRO->end(), vv3GRampBack.begin(), vv3GRampBack.end());
|
|
395
398
|
|
|
396
399
|
// corresponding parameter sequence
|
|
397
|
-
if (pvf64P && !pvf64P->empty()) // null: user does not need p seq, empty:
|
|
400
|
+
if (pvf64P && !pvf64P->empty()) // null: user does not need p seq, empty: p seq not supported
|
|
398
401
|
{
|
|
399
402
|
vf64 vf64PInsert = vf64(vv3GRampBack.size(), pvf64P->back());
|
|
400
403
|
pvf64P->insert(pvf64P->end(), vf64PInsert.begin(), vf64PInsert.end());
|
|
401
404
|
}
|
|
402
405
|
}
|
|
403
406
|
|
|
404
|
-
if (pv3M0PE) ret &= tfTraj.getK0(pv3M0PE);
|
|
405
|
-
|
|
406
407
|
return ret;
|
|
407
408
|
}
|
|
408
409
|
};
|
|
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
|