Skip to content

Commit 970abbe

Browse files
ckolbPTBschuenke
andauthored
fix test_report() to work with preceding noise acquisitions (#310)
* ignore adc events prior to rf in test report * add seq5 as another test sequence including preceding noise acquisition --------- Co-authored-by: Patrick Schuenke <[email protected]> Co-authored-by: Patrick Schuenke <[email protected]>
1 parent 7917e78 commit 970abbe

File tree

3 files changed

+1355
-2
lines changed

3 files changed

+1355
-2
lines changed

src/pypulseq/Sequence/ext_test_report.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ def ext_test_report(self) -> str:
3131
k_traj_adc, _, t_excitation, _, t_adc = self.calculate_kspace()
3232
t_excitation = np.asarray(t_excitation)
3333

34+
# remove all ADC events that come before the first RF event (noise scans or alike)
35+
t_adc = t_adc[t_adc > t_excitation[0]]
36+
3437
k_abs_adc = np.sqrt(np.sum(np.square(k_traj_adc), axis=0))
3538
k_abs_echo, index_echo = np.min(k_abs_adc), np.argmin(k_abs_adc)
3639
t_echo = t_adc[index_echo]

0 commit comments

Comments
 (0)