-
Notifications
You must be signed in to change notification settings - Fork 74
Implemented rotate3D. Fix for rotate. #244
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
Conversation
…ection when rotating around the y-axis.
@BenWilhelmUniklinikFreiburg All source code needs to be in |
@schuenke sorry, not sure how that happened. The files should be in the correct place now. |
@BenWilhelmUniklinikFreiburg I had a look at the tests and realized that you were only checking for For easier debugging, I introduced Maybe you can check yourself what causes the problem. At least in one case the |
Ah, and it's NOT failing for all cases. All multiples of pi/2 work fine 😄 |
Just a note: the E.g. checking the equality of blocks works like this: pypulseq/tests/test_sequence.py Line 319 in 1c623fe
|
It seems to me that tests fails for |
Ok, scaling the area together with the other parameters in scaled_grad = copy(grad)
if scaled_grad.type == 'trap':
scaled_grad.amplitude = scaled_grad.amplitude * scale
scaled_grad.flat_area = scaled_grad.flat_area * scale
else:
scaled_grad.waveform = scaled_grad.waveform * scale
scaled_grad.first = scaled_grad.first * scale
scaled_grad.last = scaled_grad.last * scale
scaled_grad.area = scaled_grad.area * scale I think this is correct, isn't it? After all, it seems that |
I opened a PR to @BenWilhelmUniklinikFreiburg fork with my changes - if merged, it should update this PR as well. It also refactors tests so that it uses existing As |
Implemented rotate3D. Changed rotate to have the correct rotation direction when rotating around the y-axis. The direction for rotating around the x- and z-axis is not changed.