Replies: 17 comments 32 replies
-
Hi Anais, Thanks for all the information. This is very helpful.
The reason could be the same for these two points, and it should be pretty easy to fix (basically what you proposed). I have experienced a similar problem with the fid.seq file, as it has no gradients and the reader assumed that there is at least one gradient/adc/rf in the file. I was sure this issue was already fixed, so that was our mistake. @beorostica, do you know what happened there? I will try all of the files at https://github.com/pulseq/pulseq/tree/master/tests. To see if that fixes it. But if you experienced problems with a file that is not fid*.seq please let me know.
Regarding the simulation errors, I know the cause. It is related to #52. When gradient spoiling is applied for a Phantom with spins' positions in a finite grid (like
The best solution would be to implement an EPG simulation method, but we will do this after speeding up, even more, the simulations (if you are curious read this) For the spoiler-related problems, tell me if putting Cheers! |
Beta Was this translation helpful? Give feedback.
-
Hi Carlos, Thank you for the detailed feedback. Of all the files in https://github.com/pulseq/pulseq/tree/master/tests, I can only load gre.seq in Koma. I tried to create a new phantom to avoid the spoiler issue. I was able to launch the brain_phantom2D command, but I cannot find how to output it as an HDF5 file. Did I miss something? Best, |
Beta Was this translation helpful? Give feedback.
-
Hi! If you are using the UI, you don't necessary need to write the phantom to use it, you can do the following in the terminal obj_ui[] = brain_phantom2D(...) That should plot the phantom in the UI with the updated number of spins. The same is true for the sequence with the variable If you want to write the phantom in HDF5 format, right now we do not provide a function to do that as we are developing it in #184. Using the HDF5 you could write the field ρ = data[1,:,:,:]
T1 = 1e-3 ./ data[2,:,:,:] # R1 [ms] => T1 [s]
T2 = 1e-3 ./ data[3,:,:,:] # R2 [ms] => T2* [s]
T2s = 1e-3 ./ data[4,:,:,:] # R2* [ms] => T2* [s]
Δw = data[5,:,:,:] # off-resonance field map [rad/s] Basically the opposite of KomaMRI.jl/KomaMRIFiles/src/Phantom/JEMRIS.jl Lines 21 to 52 in 30042f9 Sorry for the delays with the fix, do you have a particular sequence file that really want to work so I can prioritize it? Cheers! |
Beta Was this translation helpful? Give feedback.
-
Anais and Carlos, I can confirm that I see the same behavior for the tests at: https://github.com/pulseq/pulseq/tree/master/tests i.e. most do not load, and the gre.seq does not reconstruct well. I did not attempt the work around. I see the same as well for the KomaMRI examples, i.e. band on the ge.seq (possibly this is correct for the seq?) and gre_JEMRIS.seq and radial_JEMRIS.seq do not turn out well for reconstruction. The above was discovered while trying to debug the simulation of the example from: https://github.com/jfnielsen/TOPPEpsdSourceCode/blob/UserGuide/v6/examples/write2DGRE.m which is in a private repository from Jon Nielsen's @jfnielsen TOPPE GR scanner interpreter. At first it seemed like it could be sys parameters were mismatched, but it now seems like it might be a more general issue, given the above discussion. I believe the gre2d.seq has been tested successfully on GE scanners with TOPPE, so in theory should simulate as well. I will certainly share any results or insight I find on further seq files that run and/or seem problematic with KomaMRI. We will figure it out! Curt |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Read #52. It looks like a Z spoiler should be used with any 2d gre, until jittering the sample points can be implemented? |
Beta Was this translation helpful? Give feedback.
-
Please see pull request #314 for proposed fixes when the seq file has no gradients, or a shaped gradient. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@curtcorum, are you still experiencing issues even after adding the minus sign in your tests? Maybe this is another problem. |
Beta Was this translation helpful? Give feedback.
-
It is essentially a Nyquist condition, I believe. I am working on up-sampling the existing 2d phantom using Interpolations.jl for testing and will share what I find. There may be more to it in that it interacts with spoiling, etc. This would not be too difficult to add or extend the existing phantom options in KomaMRI. There is also the: |
Beta Was this translation helpful? Give feedback.
-
Here are some results with "upsampling" the phantom2D. Using gre.m from pulseq/tests and ss=1 looks pretty good (and slightly different with the adc phase fixes?) There is definitely still an echo in the K-space data: With obj_ui[] = brain_phantom2D(;us=2) is looks a fair bit cleaner: and the K-space does not have a strong aliasing echo (although some of the tail could still be in). Using obj_ui[] = brain_phantom2D(;us=3) does not seem to change things much so us=2-3 is probably good enough for this sequence. The changes are on: https://github.com/curtcorum/KomaMRI.jl/tree/upsample_phantoms And I'm putting in a pull request: #319 |
Beta Was this translation helpful? Give feedback.
-
We registered new versions of KomaMRIBase, KomaMRIFiles, KomaMRIPlots, and KomaMRICore to fix the phase issue. It took us a little bit to register because we were waiting for JuliaRegistries/General#102440. We will soon also merge #319 and register a KomaMRIBase 0.8.3 😄 . |
Beta Was this translation helpful? Give feedback.
-
I get it with us=2, and us=3 below, reduced somewhat. |
Beta Was this translation helpful? Give feedback.
-
Here is a "thin" 3d phantom, with us=2: obj_ui[] = brain_phantom3D(; us=2, start_end=[179,181]); The image is substantially lower artifact and raw data cleaner. The spurious echoes are reduced by the de-phasing over the z-direction, either from any spoiling or just T2* being closer to reality. The current brain_phantom2D is really 2D so will not capture any Z-gradient spoiling, and the T2* of a "voxel" is nonphysically long. My suggestion is to use this type of thin 3D phantom with any spoiled gradient echo sequence. @cncastillo @beorostica Probably the 2D phantom should be given some thickness of one voxel? |
Beta Was this translation helpful? Give feedback.
-
@aTrotier It is slow to display (actually not display) in KomaUI, but the following gives nice results:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
The critical 2D parameter seems to be usy >= 5,
us=[1, 7] looks even cleaner than us=[1, 10] ???
|
Beta Was this translation helpful? Give feedback.
-
Hello,
I have been trying to simulate sequences importing Pulseq files.
I tested the files provided on the Koma GitHub:
Regardless of the odd results, I tested some examples from the Pulseq repository (https://github.com/pulseq/pulseq/tree/master/tests):
I pursued my test trying to import my own work-in-progress Pulseq file. It did not work directly. As I was using arbitrary shapes for gradients and not trapezoids, I thought that it might be a small issue linked to it. So I investigated and found that, when the gradient key was 0, an error was thrown because no gradient id was 0.
I performed a quick fix by excluding this case in Pulseq.jl (l.458):
elseif gradLibrary[i]["type"] == 'g' && i!=0 #Arbitrary gradient waveform
Now I can import my sequence and nothing seems to be missing.
However, this quick fix does nothing for the other examples.
Do you encounter similar issues?
Is there anything specific to do while generating the Pulseq file to make it compatible with Koma?
Best,
Anais
Beta Was this translation helpful? Give feedback.
All reactions