From 1f60a77f098533c6d2e725ca4ed84ebe7967f6e1 Mon Sep 17 00:00:00 2001 From: Nikbert Date: Wed, 14 May 2025 20:24:14 +0200 Subject: [PATCH] Fix:missing-t_ktraj-return-from-calculate_kspace --- src/pypulseq/Sequence/ext_test_report.py | 2 +- src/pypulseq/Sequence/sequence.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pypulseq/Sequence/ext_test_report.py b/src/pypulseq/Sequence/ext_test_report.py index 73b889f7..8379ce5d 100644 --- a/src/pypulseq/Sequence/ext_test_report.py +++ b/src/pypulseq/Sequence/ext_test_report.py @@ -28,7 +28,7 @@ def ext_test_report(self) -> str: # Calculate TE, TR duration, num_blocks, event_count = self.duration() - k_traj_adc, k_traj, t_excitation, t_refocusing, t_adc = self.calculate_kspace() + k_traj_adc, k_traj, t_ktraj, t_excitation, t_refocusing, t_adc = self.calculate_kspace() t_excitation = np.asarray(t_excitation) k_abs_adc = np.sqrt(np.sum(np.square(k_traj_adc), axis=0)) diff --git a/src/pypulseq/Sequence/sequence.py b/src/pypulseq/Sequence/sequence.py index 90f1073e..3983ce00 100644 --- a/src/pypulseq/Sequence/sequence.py +++ b/src/pypulseq/Sequence/sequence.py @@ -281,6 +281,8 @@ def calculate_kspace( K-space trajectory sampled at `t_adc` timepoints. k_traj : numpy.array K-space trajectory of the entire pulse sequence. + t_ktraj : numpy.array + K-space trajectory timepoints. t_excitation : List[float] Excitation timepoints. t_refocusing : List[float] @@ -429,7 +431,7 @@ def calculate_kspace( k_traj[:, i_period_end] = k_traj[:, i_period_end] + dk k_traj_adc = k_traj[:, i_adc] - return k_traj_adc, k_traj, t_excitation, t_refocusing, t_adc + return k_traj_adc, k_traj, t_ktraj, t_excitation, t_refocusing, t_adc def calculate_kspacePP( self,