imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
111 stars 58 forks source link

AttributeError when calling calculate_kspace() in sequence.py #139

Closed HSun981 closed 8 months ago

HSun981 commented 8 months ago

Describe the bug AttributeError: 'Sequence' object has no attribute 'gradient_waveforms'

To Reproduce I called seq.calculate_kspace() where seq is initialized as a Sequence object!

Expected behavior I could not find the attribute gradient_waveforms

Screenshots image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

btasdelen commented 8 months ago

Hi @HSun981! gradient_waveforms function is removed, which made calculate_kspace non-functional (should be removed as well). You can see the discussion here: #107 and #109.

It is replaced by calculate_kspacePP function, which should work as a drop-in replacement.

If you really want to use calculate_kspace or gradient_waveforms, you can add those functions separately to your project with slight modifications to the code shared in PR #109.

I am closing this issue as there is already an open issue related to this, but if you have more questions/comments, feel free to comment to the original issue.

HSun981 commented 8 months ago

Thanks for the information:)! I should've checked more carefully. Have a good day!