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

'Sequence' object has no attribute 'gradient_waveforms' in Sequence.calculate_kspace #107

Closed
fzimmermann89 opened this issue Mar 14, 2023 · 6 comments · Fixed by #140
Closed
Assignees

Comments

@fzimmermann89
Copy link
Contributor

fzimmermann89 commented Mar 14, 2023

Hi,

gw = self.gradient_waveforms()

results in 'Sequence' object has no attribute 'gradient_waveforms'
as gradient_waveforms has been removed in 22fb57c

Not sure why as I am not familiar with thecodebase and the commit message does not really explain it...

Cheers,
Felix

@sravan953
Copy link
Collaborator

Hello, can you share code to reproduce this bug?

@fzimmermann89
Copy link
Contributor Author

Yes,
any call to calculate_kspace will cause the error. The minimal example is

import pypulseq as pp
pp.Sequence().calculate_kspace()

@btasdelen
Copy link
Collaborator

@sravan953 @fzimmermann89 I believe calculate_kspace is also non-functional in upstream Pulseq implementation. I am not sure why.

@sravan953 Was there a reason to remove gradient_waveforms function? There are still several cases where it is useful. We can also take it out from Sequence.m and put into another file, if complexity is the issue.

@fzimmermann89
Copy link
Contributor Author

fzimmermann89 commented Mar 20, 2023

..and is calculate_kspacePP a drop-in replacement for calculate_kspace?

Nevermind, even though the description is the same, calculate_kspacePP uses piecewise polynomials.

fzimmermann89 added a commit to fzimmermann89/pypulseq that referenced this issue Mar 20, 2023
This should fix imr-framework#107.
Also change description of calculate_kspacePP.
@sravan953
Copy link
Collaborator

@bilal-tasdelen @fzimmermann89 calculate_kspacePP() is supposed to be the replacement for calculate_kspace(). Since gradient_waveforms() was only called by calculate_kspace(), I removed it!

@sravan953 sravan953 self-assigned this Mar 20, 2023
@fzimmermann89
Copy link
Contributor Author

As https://pypulseq.readthedocs.io/en/master/pypulseq.Sequence.html#pypulseq.Sequence.sequence.Sequence.calculate_kspace
calculate_kspace is still in the documentation, I would prefer to get this fixed again.

Sorry for dropping the ball here, but I did not use pypulseq for some time -- and today got hit again by the same issue.

fzimmermann89 added a commit to fzimmermann89/pypulseq that referenced this issue Oct 5, 2023
This should fix imr-framework#107.
Also change description of calculate_kspacePP.

add missing import

as requested by review
fzimmermann89 added a commit to fzimmermann89/pypulseq that referenced this issue Oct 5, 2023
This should fix imr-framework#107.
Also change description of calculate_kspacePP.
fzimmermann89 added a commit to fzimmermann89/pypulseq that referenced this issue Oct 5, 2023
This should fix imr-framework#107.
Also change description of calculate_kspacePP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants