Comments (5)
Will attempt to reproduce this next week, and investigate further.
from pypulseq.
I know its a really old Issue, but I encountered the same problem at our 3T Verio (VB17, interpreter v1.4, PyPulseq da4568a) when I was trying to implement a saturation pulse train consisting of several block pulses with varying flip angles (realized using different durations) and spoiler gradients.
After a lot of testing and debugging I realized that the problem only occures if at least two block pulses with different durations are used. Using the same duration, but different amplitudes works.
For Gaussian or Sinc pulses no such problem occurs.
However, I am not sure if this is a PyPulseq specific problem. Maybe somebody with Matlab can try ?!
from pypulseq.
from pypulseq.
I created a minimal sequence/script for debugging that should fail on our scanner in my opinion. I will test it tomorrow morning!
import numpy as np
import pypulseq as pp
seq = pp.Sequence()
sys = pp.Opts(max_grad=30, grad_unit='mT/m', max_slew=120, slew_unit='T/m/s')
rf_1 = pp.make_block_pulse(flip_angle=45/180 * np.pi, duration=2e-3, system=sys)
rf_2 = pp.make_block_pulse(flip_angle=90/180 * np.pi, duration=4e-3, system=sys)
grad = pp.make_trapezoid(channel='x', area=750, duration=2e-3)
adc = pp.make_adc(num_samples=128, delay=0, duration=2e-3)
seq.add_block(rf_1)
seq.add_block(grad)
seq.add_block(rf_2)
seq.add_block(grad)
seq.add_block(adc)
print(seq.test_report())
seq.plot()
seq.write('block_pulse_debug_python')
The plots and the generated seq-file look fine.
Can somebody create the same script with Matlab and post it here or check if the seq-files are identical? This way we can find out if it is a PyPulseq or a pulseq interpreter bug. In my opinion it's the latter.
The generated seq-file created with Python is attached. It's just renamed as *.txt so I can attach it directly.
block_pulse_debug_python.txt
from pypulseq.
@sairamgeethanath Thanks for the suggestion! 👍
@schuenke Great experiment, here's the MATLAB version from Pulseq 1.4.0 (commit 9db4bb688d54aad7665494476038962f8c2916f1). The .seq
files are identical, so if both Pulseq/PyPulseq files do not run on the scanner, we can open an issue on the Pulseq
MATLAB_block_pulse_debug_python.txt
repository.
from pypulseq.
Related Issues (20)
- dev branch: write_gre.py gives: invalid value encountered in true_divide slice_pos[j] = np.divide( HOT 2
- Import with latest version of numpy not possible HOT 1
- Questions about ADC dead time check HOT 6
- unused variable HOT 3
- np.int and np.float HOT 1
- AttributeError when calling calculate_kspace() in sequence.py HOT 2
- CI Tests HOT 1
- Cannot generate trapezoidal gradient only specifying amplitude and duration. HOT 1
- Arguments of make_block_pulse are highly confusing HOT 3
- make_trapezoid with just flat_area fails HOT 6
- Conda Package for Pypulseq HOT 5
- PyPulseq requires GPU compute (cuPy) on Google Colab HOT 1
- KeyError When Reading .seq File generated from MATLAB pulseq 1.4.0 in pypulseq 1.4.0 HOT 5
- Pypulseq ignores BlockDurationRaster Definition in file
- Compatibility with Pulseq 1.3.1 broken HOT 1
- Feature: Sequence `install`
- Sigpy pulses can not be added to sequence HOT 1
- add_blocks interpolation issue HOT 2
- "Identical" shapes not found in event_lib HOT 4
- Numpy float error when importing pypulseq HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypulseq.