Coder Social home page Coder Social logo

Comments (5)

sravan953 avatar sravan953 commented on July 23, 2024

Will attempt to reproduce this next week, and investigate further.

from pypulseq.

schuenke avatar schuenke commented on July 23, 2024

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.

sairamgeethanath avatar sairamgeethanath commented on July 23, 2024

from pypulseq.

schuenke avatar schuenke commented on July 23, 2024

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.

sravan953 avatar sravan953 commented on July 23, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.