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

Shape check for arbitrary rf/grad #22

Closed
Mmj94 opened this issue Sep 30, 2019 · 5 comments
Closed

Shape check for arbitrary rf/grad #22

Mmj94 opened this issue Sep 30, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Mmj94
Copy link

Mmj94 commented Sep 30, 2019

Is your feature request related to a problem? Please describe.
If a waveform of shape (1,x) is used to construct arbitrary rf or gradient events they cannot be successfully added to a block.

Describe the solution you'd like
Perform shape checking

@sravan953 sravan953 self-assigned this Sep 30, 2019
@sravan953 sravan953 added the enhancement New feature or request label Sep 30, 2019
@sravan953
Copy link
Collaborator

Could you share code to reproduce this?

@Mmj94
Copy link
Author

Mmj94 commented May 5, 2020

`from pypulseq.opts import Opts  
from pypulseq.Sequence.sequence import Sequence
from pypulseq.make_arbitrary_rf import make_arbitrary_rf

import numpy as np
import math

system = Opts(max_grad=32, grad_unit='mT/m', max_slew=130, slew_unit='T/m/s', grad_raster_time=10e-6, rf_raster_time= 10e-6)
seq = Sequence(system)

rf = np.ones((1, 300), dtype=complex)
#rf = np.ones((300, 1), dtype=complex)

rf_waveform, _ = make_arbitrary_rf(flip_angle=90 * 180 / math.pi, system=system, signal=rf)
seq.add_block(rf_waveform)`

@Mmj94
Copy link
Author

Mmj94 commented May 5, 2020

Running the code above as it is, it would break.
However, if you run the second rf line instead that is now commented, it will go through.

@sravan953 sravan953 added bug Something isn't working and removed enhancement New feature or request labels May 5, 2020
sravan953 added a commit that referenced this issue May 5, 2020
Ensure 1-dimensional RF signal in `make_arbitrary_rf()`
@sravan953
Copy link
Collaborator

Thank you! Commit 0f55671 should have fixed this. Please let me know so I can close the issue.

@Mmj94
Copy link
Author

Mmj94 commented May 6, 2020

Yes, this fixes the above problem. You can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants