Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo fix & fix return syntax #56

Merged
merged 5 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions doc/readthedocs_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
furo==2021.4.11b34
7 changes: 5 additions & 2 deletions pypulseq/make_arbitrary_rf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def make_arbitrary_rf(signal: np.ndarray, flip_angle: float, bandwidth: float =
signal = np.squeeze(signal)
if signal.ndim > 1:
raise ValueError(f'signal should have ndim=1. Passed ndim={signal.ndim}')
signal = signal / bp.abs(np.sum(signal * system.rf_raster_time)) * flip_angle / (2 * np.pi)
signal = signal / np.abs(np.sum(signal * system.rf_raster_time)) * flip_angle / (2 * np.pi)

N = len(signal)
duration = N * system.rf_raster_time
Expand Down Expand Up @@ -121,4 +121,7 @@ def make_arbitrary_rf(signal: np.ndarray, flip_angle: float, bandwidth: float =
rf.t = np.concatenate((rf.t, rf.t[-1] + t_fill))
rf.signal = np.concatenate((rf.signal, np.zeros(len(t_fill))))

return rf, gz if return_gz else rf
if return_gz:
return rf, gz
else:
return rf