コード例 #1
0
    def test_stspa_spiral(self):

        target, sens = self.problem_2d(8)

        fov = 0.55
        gts = 6.4e-6
        gslew = 190
        gamp = 40
        R = 1
        dx = 0.025  # in m
        # construct a trajectory
        g, k, t, s = rf.spiral_arch(fov / R, dx, gts, gslew, gamp)

        A = linop.Sense(sens, coord=k, ishape=target.shape).H

        pulses = rf.stspa(target,
                          sens,
                          k,
                          dt=4e-6,
                          alpha=1,
                          b0=None,
                          st=None,
                          explicit=False,
                          max_iter=100,
                          tol=1E-4)

        npt.assert_array_almost_equal(A * pulses, target, 1E-3)
コード例 #2
0
    def test_stspa_radial(self):

        target, sens = self.problem_2d(8)

        # makes dim*dim*2 trajectory
        traj = sp.mri.radial((sens.shape[1], sens.shape[1], 2),
                             target.shape,
                             golden=True,
                             dtype=np.float)
        # reshape to be Nt*2 trajectory
        traj = np.reshape(traj, [traj.shape[0] * traj.shape[1], 2])

        A = linop.Sense(sens, coord=traj, weights=None, ishape=target.shape).H

        pulses = rf.stspa(target,
                          sens,
                          traj,
                          dt=4e-6,
                          alpha=1,
                          b0=None,
                          st=None,
                          explicit=False,
                          max_iter=100,
                          tol=1E-4)

        npt.assert_array_almost_equal(A * pulses, target, 1E-3)