traj: Half circle golden-ratio sampling
@@ -94,6 +94,7 @@ int main_traj(int argc, char* argv[])
bool d3d = false;
bool transverse = false;
bool asymTraj = false;
+ bool halfCircle = false;
float gdelays[2][3] = {
{ 0., 0., 0. },
@@ -111,6 +112,7 @@ int main_traj(int argc, char* argv[])
OPT_SET('g', &pGold, "golden angle in partition direction"),
OPT_SET('r', &radial, "radial"),
OPT_SET('G', &golden, "golden-ratio sampling"),
+ OPT_SET('H', &halfCircle, "halfCircle golden-ratio sampling"),
OPT_SET('D', &dbl, "double base angle"),
OPT_FLVEC3('q', &gdelays[0], "delays", "gradient delays: x, y, xy"),
OPT_FLVEC3('Q', &gdelays[1], "delays", "(gradient delays: z, xz, yz)"),
@@ -133,6 +135,9 @@ int main_traj(int argc, char* argv[])
dims[0] = 3;
dims[1] = X;
+ if (halfCircle)
+ golden = true;
+
if (0 == mb) {
mb = 1;
@@ -194,6 +199,9 @@ int main_traj(int argc, char* argv[])
double base = golden ? ((2. - golden_angle) / 2.) : (1. / (float)Y);
double angle = M_PI * (float)remap(mode, Y, turns, mb, j) * (dbl ? 2. : 1.) * base;
+ if (halfCircle)
+ angle = fmod(angle, M_PI);
+
/* Calculate read-out samples
* for symmetric Trajectory [DC between between sample no. X/2-1 and X/2, zero-based indexing]
* or asymmetric Trajectory [DC component at sample no. X/2, zero-based indexing]
