Fix:missing-t_ktraj-return-from-calculate_kspace#282
Conversation
|
As far as I can see, the Matlab example sequences usually use the There is also (an old?) So in my opinion we should keep some consistency and either leave the Python function as it is or adjust it to match the Matlab |
|
I ran into this when I reimplemented One non-breaking option is to add a |
|
I think your suggestions makes sense. |
|
|
|
OK, then we can not mirror Pulseq calculateKspacePP. I think Franks suggestion sounds like a good solution. I think everyone that wants to match k-space data from a Skope fieldcam to the nominal trajectory would highly appreciate this change. I do not know how to alter this pull request accordingly. Frank can you help me? |
|
If we are going to introduce a breaking change with an option to roll back via a |
|
I don't think it makes sense to have the rollback option not set as a default, because then it would still break old code unless the new parameter is set. With it set to default we can give a deprecation warning. If we break things, I agree that returning a To be clear, I'm not opposed to a breaking change, because even when we deprecate the current result values, at some point the breaking change needs to happen anyway. But this is something that would need to be documented. And a user should not get a "too many values to unpack" error without any indication why. |
…t without breaking backwards compatibility (see imr-framework#282).
|
I also found I needed this parameter and so rolled up a quick solution in line with what Bilal suggested here which seems to pass the standard tests. Is it worth me making a new pull request or merging it with this one somehow? |
|
I will have a look at this again. Probably tuesday next week. |
|
we see some other k-space inconsistencies, but it would be better if this PR is solved in 1.4 and 1.5 so we can rule some things out. so thumbs up for a solution to this, we are also happy to help here. |
|
okay, I agree it makes sense to keep the default behaviour as it is so that we dont break existing code. IMO, there are two options now:
What's your preference @FrankZijlstra @mzaiss @lukeje @btasdelen @Nikbert Ofc the variable names are up for discussion as well |
I would prefer this option (as implemented in my branch here: https://github.com/lukeje/pypulseq/tree/calculate_kspace_dict but with |
|
2 |
|
Okay, I implemented option 2 in c8cb776 As always when touching some files, I also did some additional refactoring. The most important things:
It should be easy to track the changes if you go through them step by step. It would be great if @Nikbert and maybe one more maintainer could review the changes. I prefer to avoid approving my own implementations / changes. |
|
This updated branch works for me. Though I noticed that |
|
Thanks for your feedback. I will have a look at the existing function calls and might update them accordingly. |
|
Looks good to me! Thanks for following up on this issue. |
This adds t_ktraj to the return values of calculate_kspace, to make it consistent with the Matlab Pulseq Version.
t_ktraj is very handy when comparing measured and nominal trajectories.
All the Best