Skip to content

Commit

Permalink
Fixed Opts to work properly with negative gamma (e.g. for Oxygen-17)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankZijlstra committed Feb 7, 2024
1 parent 6a5109d commit a9d1e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pypulseq/opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ def __init__(

if max_grad != None:
max_grad = convert(
from_value=max_grad, from_unit=grad_unit, to_unit="Hz/m", gamma=gamma
from_value=max_grad, from_unit=grad_unit, to_unit="Hz/m", gamma=abs(gamma)
)
else:
max_grad = Opts.default.max_grad

if max_slew != None:
max_slew = convert(
from_value=max_slew, from_unit=slew_unit, to_unit="Hz/m", gamma=gamma
from_value=max_slew, from_unit=slew_unit, to_unit="Hz/m", gamma=abs(gamma)
)
else:
max_slew = Opts.default.max_slew
Expand Down

0 comments on commit a9d1e03

Please sign in to comment.