imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
117 stars 63 forks source link

Full api doc for pypulseq.Opts #96

Closed zhengliuer closed 1 year ago

zhengliuer commented 1 year ago

Hi, I noticed that the parameters of pp.Opts are updated to 1.4, however, the interpretation of each parameter is not complete.
I've got some confusion about the semantic of rf_ringdown_time, any ideas?

btasdelen commented 1 year ago

Hi @ZhengLiu97. RF ringdown time is the time between where RF pulse is supposed to end and where its residual oscillations (ringdowns) ends. This variable dictates the smallest time delay you can put before the ADC.

In summary, your RF pulse requires some time to completely decay, as the system has finite bandwidth. This how it looks like for a rectangular pulse:

image

If you start your ADC before the RF ringdown, it can corrupt your NMR signal. In the extreme case, you can damage your receive circuitry, but many scanners have safeguards to avoid that.

The actual value you need to put in depends on the scanner you are using, and usually given in the manufacturer's documentation. If not sure, you can use conservative values like 100 us.

zhengliuer commented 1 year ago

@bilal-tasdelen Thank you so much for your reply! I noticed that there is a parameter called rfDeadTime. which is the minimal time between two RF. Does rdRingDownTime has a similar meaning, which is the minimal time between RF and ADC, like called rf-adcDeadTime? As I understand it, baseon on your description, we always hope ADC is aligned to the ideal time range of the rf(even sinc pulse),

Time between the real and ideal start time, or the end time, is called this ringdown time. For we want to ADC is aligned to the ideal start time and ideal end time, so we need this rf ringdown time, to let RF get its ideal value. image

Also, is there any reference, like paper about this? Thanks a lot!

btasdelen commented 1 year ago

@ZhengLiu97 It is not to align ADC to the ideal end time, but rather to avoid the real end time. You should make sure that there is at least "rf_ringdown_time" between the end of the RF pulse and the beginning of the ADC. In the case of Pulseq, if you provide this variable and use the functions such as make_block_pulse() and ask for the delay, it will give you the proper delay considering the RF ringdown time with the following code:

if rf.ringdown_time > 0 and return_delay:
    delay = make_delay(calc_duration(rf) + rf.ringdown_time)
    return rf, delay

For deeper understanding, you can look into Q-factor of the coils and antennas, which causes the ringdown. These two abstracts have a brief summary of the phenomenon and ways to circumvent that:

https://www.mr.ethz.ch/abstracts/files/ismrm14_0951.pdf https://cds.ismrm.org/ismrm-2001/PDF4/0914.pdf

I hope these helps.

zhengliuer commented 1 year ago

@bilal-tasdelen Sorry, I just mixed up the RF and readout out gradient. Now I have a parameter called rf-adc dead time, which is the minimal time interval between rf and ADC, I suppose this is rf ring down time in pulseq?

btasdelen commented 1 year ago

@ZhengLiu97 Yes, that is correct.

zhengliuer commented 1 year ago

Thanks a lot! Great Help!