Skip to content

Commit

Permalink
πŸ› Fix the magnitude slew rate calculation in the report. (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
btasdelen authored Jul 26, 2022
1 parent 7bf2afe commit 1156cc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypulseq/Sequence/ext_test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ def ext_test_report(self) -> str:
)
# Interpolate to common time
gw_ct[gc] = np.interp(
x=common_time, xp=gw_data[gc][0], fp=gw_data[gc][1], left=0, right=0
x=common_time, xp=gw_data[gc][0,:], fp=gw_data[gc][1,:], left=0, right=0
)
gs_ct[gc] = (gw_ct[gc][1:] -gw_ct[gc][1:]) / (
gs_ct[gc] = (gw_ct[gc][1:] - gw_ct[gc][:-1]) / (
common_time[1:] - common_time[:-1]
)
# Max grad/slew per channel
Expand Down Expand Up @@ -225,7 +225,7 @@ def ext_test_report(self) -> str:
+ ("{:.0f} " * len(gs)).format(*gs)
+ "Hz/m/s == "
+ ("{:.02f} " * len(ga_converted)).format(*gs_converted)
+ "mT/m/s\n"
+ "T/m/s\n"
)

ga_abs_converted = convert(from_value=ga_abs, from_unit="Hz/m", to_unit="mT/m")
Expand Down

0 comments on commit 1156cc7

Please sign in to comment.