Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions matlab/+mr/@Sequence/Sequence.m
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,17 @@ function setBlock(obj, index, varargin)
end

% now calculate the actual k-space trajectory based on the
% gradient waveforms
gw=obj.gradient_waveforms();
% gradient waveforms (interp on grad raster time)
wave_data=obj.waveforms_and_times();
tmax=max([wave_data{1}(1,end) wave_data{2}(1,end) wave_data{3}(1,end)]);
dt=obj.gradRasterTime; % time raster
nt=ceil(tmax/dt);
%tmax=nt*dt;

gw=zeros(3,nt);
for i=1:3
gw(i,:)=interp1(wave_data{i}(1,:),wave_data{i}(2,:),((1:nt)-0.5)*dt,'linear',0);
end
i_excitation=round(t_excitation/obj.gradRasterTime);
i_refocusing=round(t_refocusing/obj.gradRasterTime);
% ii_next_excitation=min(length(i_excitation),1);
Expand Down Expand Up @@ -2807,3 +2816,4 @@ function setExtensionStringAndID(obj, str, id)
end
end
end % classdef