path]/home/runner/work/KomaMRI.jl/KomaMRI.jl/docs/src/tutorial/pluto/01-gradient-echo-spin-echo.jlmetadatafrontmattertagseducationaltitle!Understanding basic MRI sequencesdescriptionBFree Induction Decay (FID), Gradient Echo (GE), and Spin Echo (SE)cell_results0$35ff3402-dc36-4b91-bec9-b4d21faf3e68running§runtime΂/depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$35ff3402-dc36-4b91-bec9-b4d21faf3e68depends_on_disabled_cells¦queued¤logsoutputbodyh
mimetext/htmlrootassigneelast_run_timestampAڪuCxFpersist_js_state·has_pluto_hook_features$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7crunning§runtime/0Xdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7cdepends_on_disabled_cells¦queued¤logsoutputbodyp
mimetext/htmlrootassigneelast_run_timestampAڪuG% persist_js_state·has_pluto_hook_features$2e65ae31-f50a-462b-9744-80bf6cdb388erunning§runtimedepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$2e65ae31-f50a-462b-9744-80bf6cdb388edepends_on_disabled_cells¦queued¤logsoutputbody$/
mimetext/htmlrootassigneerecon_t2_star_selast_run_timestampAڪuHǓpersist_js_state·has_pluto_hook_features$45952512-aaf1-43d8-a95e-c32bb2633f42running§runtimezKdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$45952512-aaf1-43d8-a95e-c32bb2633f42depends_on_disabled_cells¦queued¤logsoutputbody'
mimetext/htmlrootassigneelast_run_timestampAڪu7Ipersist_js_state·has_pluto_hook_features$34824db7-13c4-45e2-befa-f027b9b585c0running§runtimew3Ѹdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$34824db7-13c4-45e2-befa-f027b9b585c0depends_on_disabled_cells¦queued¤logsoutputbody3
mimetext/htmlrootassigneelast_run_timestampAڪuH:persist_js_state·has_pluto_hook_features$97104c46-e81f-444a-957f-0bbb1b02f1b8running§runtime;ddepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$97104c46-e81f-444a-957f-0bbb1b02f1b8depends_on_disabled_cells¦queued¤logsoutputbody 

3. $T_{2}^{*}$-decay

The $T_{2}^{*}$-decay is the signal decay produced by microscopic distribution of off-resonance.

The exact distribution of off-resonance is

$$p_{\Delta w}(w) = \frac{T_2^{'}}{\pi(1+T_2^{'2} w^2)},\quad\text{with }\frac{1}{T_2^{*}} = \frac{1}{T_2} + \frac{1}{T_2^{'}}.$$

In this excercise we will simplify this distribution, but we will obtain a similar effect.

mimetext/htmlrootassigneelast_run_timestampAڪuGJpersist_js_state·has_pluto_hook_features$97479437-9ce3-4b33-9134-0f2af89bccb5running§runtimeh-depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$97479437-9ce3-4b33-9134-0f2af89bccb5depends_on_disabled_cells¦queued¤logsgroupGPUFunctionslinemsg The GPU functionality is being called but no GPU backend is loaded to access it. Add 'using CUDA / Metal / AMDGPU / oneAPI' to your code. Defaulting back to the CPU. (No action is required if you want to run on the CPU). oneAPI support is experimental. text/plainlevelInfoidKomaMRICore_991108fecell_id$97479437-9ce3-4b33-9134-0f2af89bccb5kwargsfileM/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/GPUFunctions.jlgroupSimulatorCorelinemsg.Running simulation in the CPU with 4 thread(s)text/plainlevelInfoidKomaMRICore_618da742cell_id$97479437-9ce3-4b33-9134-0f2af89bccb5kwargskoma_versionv"0.13.0"text/plainsim_methodprefixKomaMRICore.Blochelementstypestructprefix_shortBlochobjectidfffffffff9162225!application/vnd.pluto.tree+objectspins400text/plaintime_points143text/plainadc_points100text/plainfileN/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/SimulatorCore.jlgroupstdoutlinemsgM 0.008323 seconds (17.10 k allocations: 1.111 MiB, 68.48% compilation time) text/plainlevelLogLevel(-555)idPlutoRunner_40f9f5d1cell_id$97479437-9ce3-4b33-9134-0f2af89bccb5kwargsfileP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jloutputbody
mimetext/htmlrootassigneelast_run_timestampAڪuDװpersist_js_state·has_pluto_hook_features$964404f6-7f46-4df9-ad98-921948c3be69running§runtime㴸depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$964404f6-7f46-4df9-ad98-921948c3be69depends_on_disabled_cells¦queued¤logsoutputbody,r
mimetext/htmlrootassigneelast_run_timestampAڪuGpersist_js_state·has_pluto_hook_features$4a4a6bd3-b820-479c-89e3-f3ce79a316dbrunning§runtime;depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$4a4a6bd3-b820-479c-89e3-f3ce79a316dbdepends_on_disabled_cells¦queued¤logsoutputbody$
mimetext/htmlrootassigneerecon_t2_star_grelast_run_timestampAڪuGCpersist_js_state·has_pluto_hook_features$74666c1a-2673-4936-982b-6229bf92af66running§runtimeZdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$74666c1a-2673-4936-982b-6229bf92af66depends_on_disabled_cells¦queued¤logsoutputbody
mimetext/htmlrootassigneelast_run_timestampAڪu7hpersist_js_state·has_pluto_hook_features$ada602d2-4f4b-4fb4-a763-8a639e05ff38running§runtime-ͳhdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$ada602d2-4f4b-4fb4-a763-8a639e05ff38depends_on_disabled_cells¦queued¤logsgroupGPUFunctionslinemsg The GPU functionality is being called but no GPU backend is loaded to access it. Add 'using CUDA / Metal / AMDGPU / oneAPI' to your code. Defaulting back to the CPU. (No action is required if you want to run on the CPU). oneAPI support is experimental. text/plainlevelInfoidKomaMRICore_991108fecell_id$ada602d2-4f4b-4fb4-a763-8a639e05ff38kwargsfileM/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/GPUFunctions.jlgroupSimulatorCorelinemsg.Running simulation in the CPU with 4 thread(s)text/plainlevelInfoidKomaMRICore_618da742cell_id$ada602d2-4f4b-4fb4-a763-8a639e05ff38kwargskoma_versionv"0.13.0"text/plainsim_methodprefixKomaMRICore.Blochelementstypestructprefix_shortBlochobjectidfffffffff9162225!application/vnd.pluto.tree+objectspins20text/plaintime_points128text/plainadc_points100text/plainfileN/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/SimulatorCore.jlgroupstdoutlinemsg6 0.001468 seconds (11.85 k allocations: 752.109 KiB) text/plainlevelLogLevel(-555)idPlutoRunner_40f9f5d1cell_id$ada602d2-4f4b-4fb4-a763-8a639e05ff38kwargsfileP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jloutputbody
mimetext/htmlrootassigneelast_run_timestampAڪuGspersist_js_state·has_pluto_hook_features$27686262-1a1e-45fa-b4ee-90ae1d9ee34erunning§runtimeQdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$27686262-1a1e-45fa-b4ee-90ae1d9ee34edepends_on_disabled_cells¦queued¤logsoutputbody6
  • (3.3) Simulate the seq_gre sequence

  • (3.4) Plot the simulated signal

  • (3.5) Compare the plot in (3.5) with (2.6)

  • (3.6) Reconstruct the 1D image

mimetext/htmlrootassigneelast_run_timestampAڪu7persist_js_state·has_pluto_hook_features$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7brunning§runtime
mimetext/htmlrootassigneelast_run_timestampAڪuGqԿpersist_js_state·has_pluto_hook_features$e4ef5145-a63c-4f91-ac04-3b5bf16c0842running§runtime7,ϸdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$e4ef5145-a63c-4f91-ac04-3b5bf16c0842depends_on_disabled_cells¦queued¤logsgroupGPUFunctionslinemsg The GPU functionality is being called but no GPU backend is loaded to access it. Add 'using CUDA / Metal / AMDGPU / oneAPI' to your code. Defaulting back to the CPU. (No action is required if you want to run on the CPU). oneAPI support is experimental. text/plainlevelInfoidKomaMRICore_991108fecell_id$e4ef5145-a63c-4f91-ac04-3b5bf16c0842kwargsfileM/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/GPUFunctions.jlgroupSimulatorCorelinemsg.Running simulation in the CPU with 4 thread(s)text/plainlevelInfoidKomaMRICore_618da742cell_id$e4ef5145-a63c-4f91-ac04-3b5bf16c0842kwargskoma_versionv"0.13.0"text/plainsim_methodprefixKomaMRICore.Blochelementstypestructprefix_shortBlochobjectidfffffffff9162225!application/vnd.pluto.tree+objectspins400text/plaintime_points128text/plainadc_points100text/plainfileN/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/SimulatorCore.jlgroupstdoutlinemsg6 0.001580 seconds (11.85 k allocations: 802.398 KiB) text/plainlevelLogLevel(-555)idPlutoRunner_40f9f5d1cell_id$e4ef5145-a63c-4f91-ac04-3b5bf16c0842kwargsfileP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jloutputbody // Load the library for consistent smooth scrolling const {default: scrollIntoView} = await import("data:text/javascript;base64,dmFyIFE9ZT0+Im9iamVjdCI9PXR5cGVvZiBlJiZudWxsIT1lJiYxPT09ZS5ub2RlVHlwZSxVPShlLHQpPT4oIXR8fCJoaWRkZW4iIT09ZSkmJiJ2aXNpYmxlIiE9PWUmJiJjbGlwIiE9PWUsQT0oZSx0KT0+e2lmKGUuY2xpZW50SGVpZ2h0PGUuc2Nyb2xsSGVpZ2h0fHxlLmNsaWVudFdpZHRoPGUuc2Nyb2xsV2lkdGgpe2xldCBsPWdldENvbXB1dGVkU3R5bGUoZSxudWxsKTtyZXR1cm4gVShsLm92ZXJmbG93WSx0KXx8VShsLm92ZXJmbG93WCx0KXx8KGU9PntsZXQgdD0oZT0+e2lmKCFlLm93bmVyRG9jdW1lbnR8fCFlLm93bmVyRG9jdW1lbnQuZGVmYXVsdFZpZXcpcmV0dXJuIG51bGw7dHJ5e3JldHVybiBlLm93bmVyRG9jdW1lbnQuZGVmYXVsdFZpZXcuZnJhbWVFbGVtZW50fWNhdGNoe3JldHVybiBudWxsfX0pKGUpO3JldHVybiEhdCYmKHQuY2xpZW50SGVpZ2h0PGUuc2Nyb2xsSGVpZ2h0fHx0LmNsaWVudFdpZHRoPGUuc2Nyb2xsV2lkdGgpfSkoZSl9cmV0dXJuITF9LFg9KGUsdCxsLG8sbixyLGkscyk9PnI8ZSYmaT50fHxyPmUmJmk8dD8wOnI8PWUmJnM8PWx8fGk+PXQmJnM+PWw/ci1lLW86aT50JiZzPGx8fHI8ZSYmcz5sP2ktdCtuOjAsJD1lPT5lLnBhcmVudEVsZW1lbnQ/PyhlLmdldFJvb3ROb2RlKCkuaG9zdHx8bnVsbCksdHQ9KGUsdCk9Pnt2YXIgbCxvLG4scjtpZih0eXBlb2YgZG9jdW1lbnQ+InUiKXJldHVybltdO2xldHtzY3JvbGxNb2RlOmksYmxvY2s6cyxpbmxpbmU6YSxib3VuZGFyeTpoLHNraXBPdmVyZmxvd0hpZGRlbkVsZW1lbnRzOnV9PXQsZz0iZnVuY3Rpb24iPT10eXBlb2YgaD9oOmU9PmUhPT1oO2lmKCFRKGUpKXRocm93IFR5cGVFcnJvcigiSW52YWxpZCB0YXJnZXQiKTtsZXQgdj1kb2N1bWVudC5zY3JvbGxpbmdFbGVtZW50fHxkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQsbT1bXSx3PWU7Zm9yKDtRKHcpJiZnKHcpOyl7aWYoKHc9JCh3KSk9PT12KXttLnB1c2godyk7YnJlYWt9bnVsbCE9dyYmdz09PWRvY3VtZW50LmJvZHkmJkEodykmJiFBKGRvY3VtZW50LmRvY3VtZW50RWxlbWVudCl8fG51bGwhPXcmJkEodyx1KSYmbS5wdXNoKHcpfWxldCBXPW51bGwhPShvPW51bGw9PShsPXdpbmRvdy52aXN1YWxWaWV3cG9ydCk/dm9pZCAwOmwud2lkdGgpP286aW5uZXJXaWR0aCxIPW51bGwhPShyPW51bGw9PShuPXdpbmRvdy52aXN1YWxWaWV3cG9ydCk/dm9pZCAwOm4uaGVpZ2h0KT9yOmlubmVySGVpZ2h0LHtzY3JvbGxYOl8sc2Nyb2xsWTp4fT13aW5kb3cse2hlaWdodDpFLHdpZHRoOlQsdG9wOk4scmlnaHQ6TCxib3R0b206WSxsZWZ0OkN9PWUuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCksUj0ic3RhcnQiPT09c3x8Im5lYXJlc3QiPT09cz9OOiJlbmQiPT09cz9ZOk4rRS8yLFY9ImNlbnRlciI9PT1hP0MrVC8yOiJlbmQiPT09YT9MOkMsQj1bXTtmb3IobGV0IEQ9MDtEPG0ubGVuZ3RoO0QrKyl7bGV0IE89bVtEXSx7aGVpZ2h0Omosd2lkdGg6SSx0b3A6UyxyaWdodDpxLGJvdHRvbTp6LGxlZnQ6Rn09Ty5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtpZigiaWYtbmVlZGVkIj09PWkmJk4+PTAmJkM+PTAmJlk8PUgmJkw8PVcmJk4+PVMmJlk8PXomJkM+PUYmJkw8PXEpYnJlYWs7bGV0IEc9Z2V0Q29tcHV0ZWRTdHlsZShPKSxKPXBhcnNlSW50KEcuYm9yZGVyTGVmdFdpZHRoLDEwKSxLPXBhcnNlSW50KEcuYm9yZGVyVG9wV2lkdGgsMTApLFA9cGFyc2VJbnQoRy5ib3JkZXJSaWdodFdpZHRoLDEwKSxaPXBhcnNlSW50KEcuYm9yZGVyQm90dG9tV2lkdGgsMTApLGVlPTAsZXQ9MCxlbD0ib2Zmc2V0V2lkdGgiaW4gTz9PLm9mZnNldFdpZHRoLU8uY2xpZW50V2lkdGgtSi1QOjAsZW89Im9mZnNldEhlaWdodCJpbiBPP08ub2Zmc2V0SGVpZ2h0LU8uY2xpZW50SGVpZ2h0LUstWjowLGVuPSJvZmZzZXRXaWR0aCJpbiBPPzA9PT1PLm9mZnNldFdpZHRoPzA6SS9PLm9mZnNldFdpZHRoOjAsZXI9Im9mZnNldEhlaWdodCJpbiBPPzA9PT1PLm9mZnNldEhlaWdodD8wOmovTy5vZmZzZXRIZWlnaHQ6MDtpZih2PT09TyllZT0ic3RhcnQiPT09cz9SOiJlbmQiPT09cz9SLUg6Im5lYXJlc3QiPT09cz9YKHgseCtILEgsSyxaLHgrUix4K1IrRSxFKTpSLUgvMixldD0ic3RhcnQiPT09YT9WOiJjZW50ZXIiPT09YT9WLVcvMjoiZW5kIj09PWE/Vi1XOlgoXyxfK1csVyxKLFAsXytWLF8rVitULFQpLGVlPU1hdGgubWF4KDAsZWUreCksZXQ9TWF0aC5tYXgoMCxldCtfKTtlbHNle2VlPSJzdGFydCI9PT1zP1ItUy1LOiJlbmQiPT09cz9SLXorWitlbzoibmVhcmVzdCI9PT1zP1goUyx6LGosSyxaK2VvLFIsUitFLEUpOlItKFMrai8yKStlby8yLGV0PSJzdGFydCI9PT1hP1YtRi1KOiJjZW50ZXIiPT09YT9WLShGK0kvMikrZWwvMjoiZW5kIj09PWE/Vi1xK1ArZWw6WChGLHEsSSxKLFArZWwsVixWK1QsVCk7bGV0e3Njcm9sbExlZnQ6ZWksc2Nyb2xsVG9wOmVkfT1PO2VlPU1hdGgubWF4KDAsTWF0aC5taW4oZWQrZWUvZXIsTy5zY3JvbGxIZWlnaHQtai9lcitlbykpLGV0PU1hdGgubWF4KDAsTWF0aC5taW4oZWkrZXQvZW4sTy5zY3JvbGxXaWR0aC1JL2VuK2VsKSksUis9ZWQtZWUsVis9ZWktZXR9Qi5wdXNoKHtlbDpPLHRvcDplZSxsZWZ0OmV0fSl9cmV0dXJuIEJ9LGY9ZT0+e3ZhciB0O3JldHVybiExPT09ZT97YmxvY2s6ImVuZCIsaW5saW5lOiJuZWFyZXN0In06KHQ9ZSk9PT1PYmplY3QodCkmJjAhPT1PYmplY3Qua2V5cyh0KS5sZW5ndGg/ZTp7YmxvY2s6InN0YXJ0IixpbmxpbmU6Im5lYXJlc3QifX07ZnVuY3Rpb24gYyhlLHQpe3ZhciBsO2lmKCFlLmlzQ29ubmVjdGVkfHwhKGU9PntsZXQgdD1lO2Zvcig7dCYmdC5wYXJlbnROb2RlOyl7aWYodC5wYXJlbnROb2RlPT09ZG9jdW1lbnQpcmV0dXJuITA7dD10LnBhcmVudE5vZGUgaW5zdGFuY2VvZiBTaGFkb3dSb290P3QucGFyZW50Tm9kZS5ob3N0OnQucGFyZW50Tm9kZX1yZXR1cm4hMX0pKGUpKXJldHVybjtpZigib2JqZWN0Ij09dHlwZW9mKGw9dCkmJiJmdW5jdGlvbiI9PXR5cGVvZiBsLmJlaGF2aW9yKXJldHVybiB0LmJlaGF2aW9yKHR0KGUsdCkpO2xldCBvPSJib29sZWFuIj09dHlwZW9mIHR8fG51bGw9PXQ/dm9pZCAwOnQuYmVoYXZpb3I7Zm9yKGxldHtlbDpuLHRvcDpyLGxlZnQ6aX1vZiB0dChlLGYodCkpKW4uc2Nyb2xsKHt0b3A6cixsZWZ0OmksYmVoYXZpb3I6b30pfXZhciBkLHA9KCk9PihkfHwoZD0icGVyZm9ybWFuY2UiaW4gd2luZG93P3BlcmZvcm1hbmNlLm5vdy5iaW5kKHBlcmZvcm1hbmNlKTpEYXRlLm5vdyksZCgpKTtmdW5jdGlvbiBiKGUpe2xldCB0PU1hdGgubWluKChwKCktZS5zdGFydFRpbWUpL2UuZHVyYXRpb24sMSksbD1lLmVhc2UodCksbz1lLnN0YXJ0WCsoZS54LWUuc3RhcnRYKSpsLG49ZS5zdGFydFkrKGUueS1lLnN0YXJ0WSkqbDtlLm1ldGhvZChvLG4sdCxsKSxvIT09ZS54fHxuIT09ZS55P3JlcXVlc3RBbmltYXRpb25GcmFtZSgoKT0+YihlKSk6ZS5jYigpfWZ1bmN0aW9uIHkoZSx0LGwpe2xldCBvPWFyZ3VtZW50cy5sZW5ndGg+MyYmdm9pZCAwIT09YXJndW1lbnRzWzNdP2FyZ3VtZW50c1szXTo2MDAsbj1hcmd1bWVudHMubGVuZ3RoPjQmJnZvaWQgMCE9PWFyZ3VtZW50c1s0XT9hcmd1bWVudHNbNF06ZT0+MSstLWUqZSplKmUqZSxyPWFyZ3VtZW50cy5sZW5ndGg+NT9hcmd1bWVudHNbNV06dm9pZCAwLGk9YXJndW1lbnRzLmxlbmd0aD42P2FyZ3VtZW50c1s2XTp2b2lkIDAscz1lLnNjcm9sbExlZnQsYT1lLnNjcm9sbFRvcDtiKHtzY3JvbGxhYmxlOmUsbWV0aG9kKHQsbCxvLG4pe2xldCByPU1hdGguY2VpbCh0KSxzPU1hdGguY2VpbChsKTtlLnNjcm9sbExlZnQ9cixlLnNjcm9sbFRvcD1zLGk/Lih7dGFyZ2V0OmUsZWxhcHNlZDpvLHZhbHVlOm4sbGVmdDpyLHRvcDpzfSl9LHN0YXJ0VGltZTpwKCksc3RhcnRYOnMsc3RhcnRZOmEseDp0LHk6bCxkdXJhdGlvbjpvLGVhc2U6bixjYjpyfSl9dmFyIE09ZT0+ZSYmIWUuYmVoYXZpb3J8fCJzbW9vdGgiPT09ZS5iZWhhdmlvcixrPWZ1bmN0aW9uKGUsdCl7bGV0IGw9dHx8e307cmV0dXJuIE0obCk/YyhlLHtibG9jazpsLmJsb2NrLGlubGluZTpsLmlubGluZSxzY3JvbGxNb2RlOmwuc2Nyb2xsTW9kZSxib3VuZGFyeTpsLmJvdW5kYXJ5LHNraXBPdmVyZmxvd0hpZGRlbkVsZW1lbnRzOmwuc2tpcE92ZXJmbG93SGlkZGVuRWxlbWVudHMsYmVoYXZpb3I6ZT0+UHJvbWlzZS5hbGwoZS5yZWR1Y2UoKGUsdCk9PntsZXR7ZWw6byxsZWZ0Om4sdG9wOnJ9PXQsaT1vLnNjcm9sbExlZnQscz1vLnNjcm9sbFRvcDtyZXR1cm4gaT09PW4mJnM9PT1yP2U6Wy4uLmUsbmV3IFByb21pc2UoZT0+eShvLG4scixsLmR1cmF0aW9uLGwuZWFzZSwoKT0+ZSh7ZWw6byxsZWZ0OltpLG5dLHRvcDpbcyxyXX0pLGwub25TY3JvbGxDaGFuZ2UpKV19LFtdKSl9KTpQcm9taXNlLnJlc29sdmUoYyhlLHQpKX07ZXhwb3J0e2sgYXMgZGVmYXVsdH07") const indent = true const aside = true const title_text = "Table of Contents" const include_definitions = false const tocNode = html`` tocNode.classList.toggle("aside", aside) tocNode.classList.toggle("indent", indent) const getParentCell = el => el.closest("pluto-cell") const getHeaders = () => { const depth = Math.max(1, Math.min(6, 3)) // should be in range 1:6 const range = Array.from({length: depth}, (x, i) => i+1) // [1, ..., depth] const selector = [ ...(include_definitions ? [ `pluto-notebook pluto-cell .pluto-docs-binding`, `pluto-notebook pluto-cell assignee:not(:empty)`, ] : []), ...range.map(i => `pluto-notebook pluto-cell h${i}`) ].join(",") return Array.from(document.querySelectorAll(selector)).filter(el => // exclude headers inside of a pluto-docs-binding block !(el.nodeName.startsWith("H") && el.closest(".pluto-docs-binding")) && !el.classList.contains("no-toc") ) } const document_click_handler = (event) => { const path = (event.path || event.composedPath()) const toc = path.find(elem => elem?.classList?.contains?.("toc-toggle")) if (toc) { event.stopImmediatePropagation() toc.closest(".plutoui-toc").classList.toggle("hide") } } document.addEventListener("click", document_click_handler) const header_to_index_entry_map = new Map() const currently_highlighted_set = new Set() const last_toc_element_click_time = { current: 0 } const intersection_callback = (ixs) => { let on_top = ixs.filter(ix => ix.intersectionRatio > 0 && ix.intersectionRect.y < ix.rootBounds.height / 2) if(on_top.length > 0){ currently_highlighted_set.forEach(a => a.classList.remove("in-view")) currently_highlighted_set.clear() on_top.slice(0,1).forEach(i => { let div = header_to_index_entry_map.get(i.target) div.classList.add("in-view") currently_highlighted_set.add(div) /// scroll into view /* const toc_height = tocNode.offsetHeight const div_pos = div.offsetTop const div_height = div.offsetHeight const current_scroll = tocNode.scrollTop const header_height = tocNode.querySelector("header").offsetHeight const scroll_to_top = div_pos - header_height const scroll_to_bottom = div_pos + div_height - toc_height // if we set a scrollTop, then the browser will stop any currently ongoing smoothscroll animation. So let's only do this if you are not currently in a smoothscroll. if(Date.now() - last_toc_element_click_time.current >= 2000) if(current_scroll < scroll_to_bottom){ tocNode.scrollTop = scroll_to_bottom } else if(current_scroll > scroll_to_top){ tocNode.scrollTop = scroll_to_top } */ }) } } let intersection_observer_1 = new IntersectionObserver(intersection_callback, { root: null, // i.e. the viewport threshold: 1, rootMargin: "-15px", // slightly smaller than the viewport // delay: 100, }) let intersection_observer_2 = new IntersectionObserver(intersection_callback, { root: null, // i.e. the viewport threshold: 1, rootMargin: "15px", // slightly larger than the viewport // delay: 100, }) const render = (elements) => { header_to_index_entry_map.clear() currently_highlighted_set.clear() intersection_observer_1.disconnect() intersection_observer_2.disconnect() let last_level = `H1` return html`${elements.map(h => { const parent_cell = getParentCell(h) let [className, title_el] = h.matches(`.pluto-docs-binding`) ? ["pluto-docs-binding-el", h.firstElementChild] : [h.nodeName, h] const id = title_el.matches("assignee") ? title_el.innerText.replace(/^const /, "") : title_el.id ? title_el.id : parent_cell.id const inner_html = title_el.innerHTML const a = html`${inner_html}` /* a.onmouseover=()=>{ parent_cell.firstElementChild.classList.add( 'highlight-pluto-cell-shoulder' ) } a.onmouseout=() => { parent_cell.firstElementChild.classList.remove( 'highlight-pluto-cell-shoulder' ) } */ a.onclick=(e) => { e.preventDefault(); history.replaceState(null, null, a.href) last_toc_element_click_time.current = Date.now() scrollIntoView(h, { behavior: 'smooth', block: 'start', }).then(() => // sometimes it doesn't scroll to the right place // solution: try a second time! scrollIntoView(h, { behavior: 'smooth', block: 'start', }) ) } // Remove any `id` attributes recursively, because they may interfere with linking-to-id using `#` const removeIdAttributes = (el) => { if (el && el.nodeType === 1) { // Element node if (el.hasAttribute?.("id")) el.removeAttribute?.("id") el.childNodes.forEach(removeIdAttributes) } } removeIdAttributes(a) // Remove Click-To-Copy-Header-ID feature a.querySelectorAll("pluto-header-id-copy-wrapper").forEach(el => el.remove()) const row = html`
${a}
` intersection_observer_1.observe(title_el) intersection_observer_2.observe(title_el) header_to_index_entry_map.set(title_el, row) if(className.startsWith("H")) last_level = className return row })}` } const invalidated = { current: false } const updateCallback = () => { if (!invalidated.current) { tocNode.querySelector("section").replaceWith( html`
${render(getHeaders())}
` ) } } updateCallback() setTimeout(updateCallback, 100) setTimeout(updateCallback, 1000) setTimeout(updateCallback, 5000) const notebook = document.querySelector("pluto-notebook") // We have a mutationobserver for each cell: const mut_observers = { current: [], } const createCellObservers = () => { mut_observers.current.forEach((o) => o.disconnect()) mut_observers.current = Array.from(notebook.querySelectorAll("pluto-cell")).map(el => { const o = new MutationObserver(updateCallback) o.observe(el, {attributeFilter: ["class"]}) return o }) } createCellObservers() // And one for the notebook's child list, which updates our cell observers: const notebookObserver = new MutationObserver(() => { updateCallback() createCellObservers() }) notebookObserver.observe(notebook, {childList: true}) // And finally, an observer for the document.body classList, to make sure that the toc also works when it is loaded during notebook initialization const bodyClassObserver = new MutationObserver(updateCallback) bodyClassObserver.observe(document.body, {attributeFilter: ["class"]}) // Hide/show the ToC when the screen gets small let match_listener = () => { const small = (tocNode.closest("pluto-editor") ?? document.body).scrollWidth < 1000 tocNode.classList.toggle("smallscreen", small) tocNode.classList.toggle("hide", small) } for(let s of [1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) { let m = matchMedia(`(max-width: ${s}px)`) m.addListener(match_listener) invalidation.then(() => m.removeListener(match_listener)) } match_listener() invalidation.then(() => { invalidated.current = true intersection_observer_1.disconnect() intersection_observer_2.disconnect() notebookObserver.disconnect() bodyClassObserver.disconnect() mut_observers.current.forEach((o) => o.disconnect()) document.removeEventListener("click", document_click_handler) }) return tocNode mimetext/htmlrootassigneelast_run_timestampAڪu;,persist_js_state·has_pluto_hook_features$1231b832-47b1-4ccb-9b56-a67838598cc7running§runtime&depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$1231b832-47b1-4ccb-9b56-a67838598cc7depends_on_disabled_cells¦queued¤logsoutputbody,
mimetext/htmlrootassigneelast_run_timestampAڪuD{xpersist_js_state·has_pluto_hook_features$41d14dec-b852-4316-aefb-c3d08fa43216running§runtime ̸depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$41d14dec-b852-4316-aefb-c3d08fa43216depends_on_disabled_cells¦queued¤logsoutputbodyG
mimetext/htmlrootassigneelast_run_timestampAڪuGJ`persist_js_state·has_pluto_hook_features$ab8dc1ce-d1ef-43a0-9495-dac931b52aecrunning§runtime*ldepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$ab8dc1ce-d1ef-43a0-9495-dac931b52aecdepends_on_disabled_cells¦queued¤logsoutputbodytruemimetext/plainrootassigneeactivity_finishedlast_run_timestampAڪuH*4persist_js_state·has_pluto_hook_features$58be4150-2b7a-4f9e-a7d7-40a086fd3a53running§runtimeO1depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$58be4150-2b7a-4f9e-a7d7-40a086fd3a53depends_on_disabled_cells¦queued¤logsoutputbodyt mimetext/htmlrootassigneelast_run_timestampAڪuH3Epersist_js_state·has_pluto_hook_features$d16efa62-dce7-4ec3-9e3c-b5e1677377fcrunning§runtime?depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$d16efa62-dce7-4ec3-9e3c-b5e1677377fcdepends_on_disabled_cells¦queued¤logsoutputbodymimetext/plainrootassigneelast_run_timestampAڪuB"wްpersist_js_state·has_pluto_hook_features$c02f3898-10cb-4f1e-b5ef-eb42b803baedrunning§runtimeI׸depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$c02f3898-10cb-4f1e-b5ef-eb42b803baeddepends_on_disabled_cells¦queued¤logsoutputbodyt
mimetext/htmlrootassigneelast_run_timestampAڪuH Mpersist_js_state·has_pluto_hook_features$3357a283-a234-4d15-8fdf-7fbec58b33a7running§runtimeMdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$3357a283-a234-4d15-8fdf-7fbec58b33a7depends_on_disabled_cells¦queued¤logsoutputbodyB

4. Spin Echo

The spin echo experiment has the advantage that the echo signal amplitud it is modulated by $\exp(-t/T_2)$ and not $\exp(-t/T_2^{*})$.

For this section we will use the phantom obj_t2star and a new sequence seq_se.

For this sequence we will need:

  • (4.1) A 90deg hard RF pulse

  • (4.2) A Delay of $\mathrm{TE}/2$ with a positive gradient (area Ax)

  • (4.3) A 180deg hard RF pulse

  • (4.4) A readout gradient of area 2Ax with an ADC (similar to (2.2)), such that the middle of the gradient and ADC are in $\mathrm{TE}$

  • (4.5) Create concatenating these blocks into a sequence called seq_se

  • (4.6) Plot seq_se and its k-space. Is the k-space the same as seq_gre in (2.3)?

mimetext/htmlrootassigneelast_run_timestampAڪuG3߰persist_js_state·has_pluto_hook_features$f11a2fa2-eff9-4979-b739-3da2b24a9a45running§runtime depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$f11a2fa2-eff9-4979-b739-3da2b24a9a45depends_on_disabled_cells¦queued¤logsoutputbody.

Generate a virtual object:

  • (1.4) A Phantom with 20 spins, with properties:

    • obj.x = [-1, 1] mm (20 spins along the $x$-axis)

    • obj.ρ .= 1

    • obj.T1 .= 500 ms

    • obj.T2 .= 50 ms

  • (1.5) Plot the generated Phantom (check plot_phantom_map's docs)

mimetext/htmlrootassigneelast_run_timestampAڪu7persist_js_state·has_pluto_hook_features$9179aa40-bb40-4a36-ae1e-00ae42935a5frunning§runtime0depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$9179aa40-bb40-4a36-ae1e-00ae42935a5fdepends_on_disabled_cells¦queued¤logsoutputbodyRSequence[ τ = 30.587 ms | blocks: 3 | ADC: 1 | GR: 2 | RF: 1 | EXT: 0 | DEF: 11 ]mimetext/plainrootassigneelast_run_timestampAڪuEJpersist_js_state·has_pluto_hook_features$e4c80c24-20fd-42e5-9dcd-a65958569c01running§runtimefdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$e4c80c24-20fd-42e5-9dcd-a65958569c01depends_on_disabled_cells¦queued¤logsoutputbody

2. Gradient Echo

The gradient echo is one of the first steps to create an image. The big breakthrough was the addition of linearly increasing magnetic fields, or gradients, to encode the spin's positions in their frequency (Mmmh, someone said Fourier?). This works due to the fact that the frequency $f$ of a spin is

$$f(x) = \frac{\gamma}{2\pi} B_z(x) = \frac{\gamma}{2\pi} G_x x.$$

Let's create a different sequence.

  • Create a 90-deg hard RF pulse and put it in a variable seq_gre

  • (2.1) Create a gradient with area -Ax using gx_pre = Grad(A,T,rise,fall) append to seq_gre. As an optional challenge, put gx_pre.rise and gx_pre.fall so the satisfy the sys requierements

  • (2.2) Append a Sequence block called readout that includes:

    • A gradient of twice the area, or 2Ax. Call it gx

    • An ADC with adc2.delay = gx.rise and adc2.T = gx.T

  • (2.3) Plot seq_gre and its k-space

  • (2.4) Plot the $k$-space with the plot_kspace function

mimetext/htmlrootassigneelast_run_timestampAڪuDpersist_js_state·has_pluto_hook_features$9a88a54b-bcc7-41ad-8e60-f4d450dccb2drunning§runtime$s*depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$9a88a54b-bcc7-41ad-8e60-f4d450dccb2ddepends_on_disabled_cells¦queued¤logsoutputbody$)
mimetext/htmlrootassigneelast_run_timestampAڪuG@_persist_js_state·has_pluto_hook_features$27e65680-22a0-4079-b6df-d60a3218e52erunning§runtime depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$27e65680-22a0-4079-b6df-d60a3218e52edepends_on_disabled_cells¦queued¤logsoutputbodyRSequence[ τ = 31.174 ms | blocks: 4 | ADC: 1 | GR: 2 | RF: 2 | EXT: 0 | DEF: 11 ]mimetext/plainrootassigneelast_run_timestampAڪuGgpersist_js_state·has_pluto_hook_features$1c79b37e-d4e0-490f-9466-20ce28f017aerunning§runtime.Ddepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$1c79b37e-d4e0-490f-9466-20ce28f017aedepends_on_disabled_cells¦queued¤logsoutputbodyڜ
mimetext/htmlrootassigneelast_run_timestampAڪuHIpersist_js_state·has_pluto_hook_features$ea542271-01c2-4962-a708-804b23a861b9running§runtime/depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$ea542271-01c2-4962-a708-804b23a861b9depends_on_disabled_cells¦queued¤logsoutputbody
  • (1.6) Finally, use the generated seq, obj, and sys to simulate the FID (check simulate's docs)

  • (1.7) Plot the resulting raw data with plot_signal.

  • (1.8) Is the signal the same as Plot(t, exp.(-t ./ T2))?

mimetext/htmlrootassigneelast_run_timestampAڪu7>)persist_js_state·has_pluto_hook_features$ee7e81e7-484c-44a8-a191-f73e24707ce9running§runtime depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$ee7e81e7-484c-44a8-a191-f73e24707ce9depends_on_disabled_cells¦queued¤logsoutputbody"T2 star phantom"mimetext/plainrootassigneelast_run_timestampAڪuGoͼpersist_js_state·has_pluto_hook_features$0266632d-5ca4-4196-a523-33a66dd70e0crunning§runtimeKtdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$0266632d-5ca4-4196-a523-33a66dd70e0cdepends_on_disabled_cells¦queued¤logsoutputbodyprefixADCelementsN100text/plainT0.05text/plaindelay0.0text/plainΔf0.0text/plainϕ0.0text/plaintypestructprefix_shortADCobjectid69e1e9d703d429b0mime!application/vnd.pluto.tree+objectrootassigneeadclast_run_timestampAڪu=ܰpersist_js_state·has_pluto_hook_features$5df97874-f09c-4173-a2f6-893db322ccafrunning§runtimeܟdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$5df97874-f09c-4173-a2f6-893db322ccafdepends_on_disabled_cells¦queued¤logsoutputbodyn

Understanding basic MRI sequences

mimetext/htmlrootassigneelast_run_timestampAڪu7persist_js_state·has_pluto_hook_features$d6b1729a-874d-11ee-151a-9b0fcce2c4fdrunning§runtime΁Zdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$d6b1729a-874d-11ee-151a-9b0fcce2c4fddepends_on_disabled_cells¦queued¤logsoutputbodymimetext/plainrootassigneelast_run_timestampAڪu:Űpersist_js_state·has_pluto_hook_features$6dfe338d-de85-4adb-b030-09455fae78a0running§runtimedepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$6dfe338d-de85-4adb-b030-09455fae78a0depends_on_disabled_cells¦queued¤logsoutputbody

Welcome to the hands-on session on MRI simulation. Let's have some fun!

If you have any doubts about how to use a function, please search in the Live Docs at the bottom right.

mimetext/htmlrootassigneelast_run_timestampAڪu7@persist_js_state·has_pluto_hook_features$3abca406-2e6b-4b37-8835-65cfad9d0caarunning§runtime0Xdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$3abca406-2e6b-4b37-8835-65cfad9d0caadepends_on_disabled_cells¦queued¤logsoutputbodyK
mimetext/htmlrootassigneekspace_grelast_run_timestampAڪuF߰persist_js_state·has_pluto_hook_features$c47a50b8-c930-4c96-9b34-2772186634d9running§runtime~Idepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$c47a50b8-c930-4c96-9b34-2772186634d9depends_on_disabled_cells¦queued¤logsgroupGPUFunctionslinemsg The GPU functionality is being called but no GPU backend is loaded to access it. Add 'using CUDA / Metal / AMDGPU / oneAPI' to your code. Defaulting back to the CPU. (No action is required if you want to run on the CPU). oneAPI support is experimental. text/plainlevelInfoidKomaMRICore_991108fecell_id$c47a50b8-c930-4c96-9b34-2772186634d9kwargsfileM/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/GPUFunctions.jlgroupSimulatorCorelinemsg.Running simulation in the CPU with 4 thread(s)text/plainlevelInfoidKomaMRICore_618da742cell_id$c47a50b8-c930-4c96-9b34-2772186634d9kwargskoma_versionv"0.13.0"text/plainsim_methodprefixKomaMRICore.Blochelementstypestructprefix_shortBlochobjectidfffffffff9162225!application/vnd.pluto.tree+objectspins20text/plaintime_points115text/plainadc_points100text/plainfileN/home/runner/.julia/packages/KomaMRICore/iTdyz/src/simulation/SimulatorCore.jlgroupstdoutlinemsg Running simulation... 67%|████████████████████ | ETA: 0:00:01  simulated_blocks: 2  rf_blocks: 1  acq_samples: 0       Running simulation... 100%|██████████████████████████████| Time: 0:00:02  simulated_blocks: 3  rf_blocks: 1  acq_samples: 100 2.083184 seconds (4.70 M allocations: 290.157 MiB, 3.57% gc time, 108.78% compilation time: 85% of which was recompilation) text/plainlevelLogLevel(-555)idPlutoRunner_40f9f5d1cell_id$c47a50b8-c930-4c96-9b34-2772186634d9kwargsfileP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jloutputbody

Congratulations! you finished the simulation hands-on session 🥳!

mimetext/htmlrootassigneelast_run_timestampAڪu79persist_js_state·has_pluto_hook_features$abea2c43-d83e-4438-8cd3-4be06b8174b3running§runtimedepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$abea2c43-d83e-4438-8cd3-4be06b8174b3depends_on_disabled_cells¦queued¤logsoutputbody7

Reproducibility

This Pluto notebook is reproducible by default, as it has an embedded Project.toml and Manifest.toml, that store the exact package versions used to create the notebook.

mimetext/htmlrootassigneelast_run_timestampAڪu7ðpersist_js_state·has_pluto_hook_features$f1f3b700-5916-496f-b938-46f7f08b4eb6running§runtime#depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$f1f3b700-5916-496f-b938-46f7f08b4eb6depends_on_disabled_cells¦queued¤logsoutputbody-v
mimetext/htmlrootassigneelast_run_timestampAڪuHKpersist_js_state·has_pluto_hook_features$0f96a83d-96ef-4768-9330-87c466e35c93running§runtime gdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$0f96a83d-96ef-4768-9330-87c466e35c93depends_on_disabled_cells¦queued¤logsoutputbody_mimetext/htmlrootassigneelast_run_timestampAڪuEpersist_js_state·has_pluto_hook_features$8e474add-8651-431b-b481-7a139037dbd2running§runtime&Mdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$8e474add-8651-431b-b481-7a139037dbd2depends_on_disabled_cells¦queued¤logsoutputbody&

1. Free Induction Decay (FID)

The free induction decay is the simplest observable NMR signal. This signal is the one that follows a single tipping RF pulse.

To recreate this experiment, we will need to define a Sequence:

  • (1.1) A 90-deg block RF pulse, put it in a variable seq (check PulseDesigner.RF_hard's docs using the Live Docs)

  • (1.2) An ADC to capture the signal in a variable adc, concatenate with (1.1) using seq += adc

  • (1.3) Plot the generated Sequence (check plot_seq's docs)

For the hardware limits use the default scanner sys = Scanner().

mimetext/htmlrootassigneelast_run_timestampAڪu;`gpersist_js_state·has_pluto_hook_features$4e1434e1-673f-4206-a271-9edec10ebd6arunning§runtime \depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$4e1434e1-673f-4206-a271-9edec10ebd6adepends_on_disabled_cells¦queued¤logsoutputbodyLf
mimetext/htmlrootassigneekspace_selast_run_timestampAڪuH4persist_js_state·has_pluto_hook_features$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195running§runtimeGdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195depends_on_disabled_cells¦queued¤logsoutputbody+
mimetext/htmlrootassigneelast_run_timestampAڪuF(w\persist_js_state·has_pluto_hook_features$c6e33cb8-f42c-4643-9257-124d2804d3darunning§runtimeέ(Gdepends_on_skipped_cellsµpublished_object_keyserrored§cell_id$c6e33cb8-f42c-4643-9257-124d2804d3dadepends_on_disabled_cells¦queued¤logsoutputbodyQSequence[ τ = 0.587 ms | blocks: 1 | ADC: 0 | GR: 0 | RF: 1 | EXT: 0 | DEF: 11 ]mimetext/plainrootassigneelast_run_timestampAڪu<]persist_js_state·has_pluto_hook_features$7deadd58-b202-4508-b4c7-686f742cb713running§runtime\¸depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$7deadd58-b202-4508-b4c7-686f742cb713depends_on_disabled_cells¦queued¤logsgroupstdoutlinemsg[OS x86_64-linux-gnu Julia 1.13.0 KomaMRIBase 0.14.0 KomaMRICore 0.13.0 KomaMRIPlots 0.13.1 text/plainlevelLogLevel(-555)idPlutoRunner_40f9f5d1cell_id$7deadd58-b202-4508-b4c7-686f742cb713kwargsfileP/home/runner/.julia/packages/Pluto/F6SNP/src/runner/PlutoRunner/src/io/stdout.jloutputbodymimetext/plainrootassigneelast_run_timestampAڪu9Opersist_js_state·has_pluto_hook_features$0975547d-67d9-4e6b-88ff-a9dd06a7f9efrunning§runtimek,depends_on_skipped_cellsµpublished_object_keyserrored§cell_id$0975547d-67d9-4e6b-88ff-a9dd06a7f9efdepends_on_disabled_cells¦queued¤logsoutputbody*w
mimetext/htmlrootassigneelast_run_timestampAڪuB persist_js_state·has_pluto_hook_features±published_objectsbondscell_execution_order0$7deadd58-b202-4508-b4c7-686f742cb713$d6b1729a-874d-11ee-151a-9b0fcce2c4fd$5df97874-f09c-4173-a2f6-893db322ccaf$8529f36d-2d39-4b45-a821-01c8346539fd$6dfe338d-de85-4adb-b030-09455fae78a0$8e474add-8651-431b-b481-7a139037dbd2$c6e33cb8-f42c-4643-9257-124d2804d3da$0266632d-5ca4-4196-a523-33a66dd70e0c$0975547d-67d9-4e6b-88ff-a9dd06a7f9ef$f11a2fa2-eff9-4979-b739-3da2b24a9a45$d16efa62-dce7-4ec3-9e3c-b5e1677377fc$35ff3402-dc36-4b91-bec9-b4d21faf3e68$ea542271-01c2-4962-a708-804b23a861b9$c47a50b8-c930-4c96-9b34-2772186634d9$7a66ab47-918f-4582-895f-1b4690562051$1231b832-47b1-4ccb-9b56-a67838598cc7$e4c80c24-20fd-42e5-9dcd-a65958569c01$74666c1a-2673-4936-982b-6229bf92af66$0f96a83d-96ef-4768-9330-87c466e35c93$9179aa40-bb40-4a36-ae1e-00ae42935a5f$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195$3abca406-2e6b-4b37-8835-65cfad9d0caa$ada602d2-4f4b-4fb4-a763-8a639e05ff38$9a88a54b-bcc7-41ad-8e60-f4d450dccb2d$41d14dec-b852-4316-aefb-c3d08fa43216$97104c46-e81f-444a-957f-0bbb1b02f1b8$ee7e81e7-484c-44a8-a191-f73e24707ce9$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7b$27686262-1a1e-45fa-b4ee-90ae1d9ee34e$e4ef5145-a63c-4f91-ac04-3b5bf16c0842$1a83d897-705b-443d-89a4-ea5e3e6a3c07$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7c$4a4a6bd3-b820-479c-89e3-f3ce79a316db$964404f6-7f46-4df9-ad98-921948c3be69$3357a283-a234-4d15-8fdf-7fbec58b33a7$27e65680-22a0-4079-b6df-d60a3218e52e$f1f3b700-5916-496f-b938-46f7f08b4eb6$4e1434e1-673f-4206-a271-9edec10ebd6a$c02f3898-10cb-4f1e-b5ef-eb42b803baed$45952512-aaf1-43d8-a95e-c32bb2633f42$97479437-9ce3-4b33-9134-0f2af89bccb5$1c79b37e-d4e0-490f-9466-20ce28f017ae$2e65ae31-f50a-462b-9744-80bf6cdb388e$34824db7-13c4-45e2-befa-f027b9b585c0$fe8bbcd2-e8f5-4225-80c3-47e73176fb3d$ab8dc1ce-d1ef-43a0-9495-dac931b52aec$58be4150-2b7a-4f9e-a7d7-40a086fd3a53$abea2c43-d83e-4438-8cd3-4be06b8174b3process_statusreadyjulia_versionv1.13.0cell_order0$5df97874-f09c-4173-a2f6-893db322ccaf$8529f36d-2d39-4b45-a821-01c8346539fd$6dfe338d-de85-4adb-b030-09455fae78a0$d6b1729a-874d-11ee-151a-9b0fcce2c4fd$8e474add-8651-431b-b481-7a139037dbd2$c6e33cb8-f42c-4643-9257-124d2804d3da$0266632d-5ca4-4196-a523-33a66dd70e0c$0975547d-67d9-4e6b-88ff-a9dd06a7f9ef$f11a2fa2-eff9-4979-b739-3da2b24a9a45$d16efa62-dce7-4ec3-9e3c-b5e1677377fc$35ff3402-dc36-4b91-bec9-b4d21faf3e68$ea542271-01c2-4962-a708-804b23a861b9$c47a50b8-c930-4c96-9b34-2772186634d9$7a66ab47-918f-4582-895f-1b4690562051$1231b832-47b1-4ccb-9b56-a67838598cc7$e4c80c24-20fd-42e5-9dcd-a65958569c01$9179aa40-bb40-4a36-ae1e-00ae42935a5f$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195$3abca406-2e6b-4b37-8835-65cfad9d0caa$74666c1a-2673-4936-982b-6229bf92af66$ada602d2-4f4b-4fb4-a763-8a639e05ff38$41d14dec-b852-4316-aefb-c3d08fa43216$9a88a54b-bcc7-41ad-8e60-f4d450dccb2d$0f96a83d-96ef-4768-9330-87c466e35c93$97104c46-e81f-444a-957f-0bbb1b02f1b8$ee7e81e7-484c-44a8-a191-f73e24707ce9$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7b$27686262-1a1e-45fa-b4ee-90ae1d9ee34e$e4ef5145-a63c-4f91-ac04-3b5bf16c0842$1a83d897-705b-443d-89a4-ea5e3e6a3c07$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7c$4a4a6bd3-b820-479c-89e3-f3ce79a316db$964404f6-7f46-4df9-ad98-921948c3be69$3357a283-a234-4d15-8fdf-7fbec58b33a7$27e65680-22a0-4079-b6df-d60a3218e52e$f1f3b700-5916-496f-b938-46f7f08b4eb6$4e1434e1-673f-4206-a271-9edec10ebd6a$c02f3898-10cb-4f1e-b5ef-eb42b803baed$45952512-aaf1-43d8-a95e-c32bb2633f42$97479437-9ce3-4b33-9134-0f2af89bccb5$1c79b37e-d4e0-490f-9466-20ce28f017ae$2e65ae31-f50a-462b-9744-80bf6cdb388e$34824db7-13c4-45e2-befa-f027b9b585c0$fe8bbcd2-e8f5-4225-80c3-47e73176fb3d$ab8dc1ce-d1ef-43a0-9495-dac931b52aec$58be4150-2b7a-4f9e-a7d7-40a086fd3a53$abea2c43-d83e-4438-8cd3-4be06b8174b3$7deadd58-b202-4508-b4c7-686f742cb713cell_inputs0$35ff3402-dc36-4b91-bec9-b4d21faf3e68metadatadisabled©show_logsîskip_as_script§cell_id$35ff3402-dc36-4b91-bec9-b4d21faf3e68code_folded¤code=# (1.5) Plot the generated Phantom plot_phantom_map(obj, :T1)$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7cmetadatadisabled©show_logsîskip_as_script§cell_id$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7ccode_folded¤codeG# (3.5) Compare the plot in (3.4) with (2.6) begin signal_layout = Layout(yaxis=attr(range=[-5, 16.5])) relayout!(signal_gre, signal_layout; title="GRE-T2") relayout!(signal_t2_star_gre, signal_layout; title="GRE-T2*") fig_signal_2 = [signal_gre signal_t2_star_gre] relayout(fig_signal_2, showlegend=false, height=400) end$2e65ae31-f50a-462b-9744-80bf6cdb388emetadatadisabled©show_logsîskip_as_script§cell_id$2e65ae31-f50a-462b-9744-80bf6cdb388ecode_folded¤codey# (4.9) Reconstruct the 1D image recon_t2_star_se = Plot(abs.(fftc(raw_t2_star_se.profiles[1].data)), Layout(height=400))$45952512-aaf1-43d8-a95e-c32bb2633f42metadatadisabled©show_logsîskip_as_script§cell_id$45952512-aaf1-43d8-a95e-c32bb2633f42code_foldedäcode١md""" - (4.7) Simulate using `seq_se` and `obj_t2star` - (4.8) Compare the signal obtained in (4.6) with the one at (3.5) - (4.9) Reconstruct the 1D image """$34824db7-13c4-45e2-befa-f027b9b585c0metadatadisabled©show_logsîskip_as_script§cell_id$34824db7-13c4-45e2-befa-f027b9b585c0code_folded¤codeٳbegin relayout!(recon_t2_star_se, recon_layout; title="SE") fig_recon_3 = [recon_gre recon_t2_star_gre recon_t2_star_se] relayout(fig_recon_3, showlegend=false, height=400) end$97104c46-e81f-444a-957f-0bbb1b02f1b8metadatadisabled©show_logsîskip_as_script§cell_id$97104c46-e81f-444a-957f-0bbb1b02f1b8code_foldedäcodeSmd""" # 3. $T_{2}^{*}$-decay The $$T_{2}^{*}$$-decay is the signal decay produced by microscopic distribution of off-resonance. $(Resource("https://raw.githubusercontent.com/LIBREhub/MRI-processing-2023/main/02-simulation/Figures/T2star.png", :width=>"400px")) The exact distribution of off-resonance is $$p_{\Delta w}(w) = \frac{T_2^{'}}{\pi(1+T_2^{'2} w^2)},\quad\text{with }\frac{1}{T_2^{*}} = \frac{1}{T_2} + \frac{1}{T_2^{'}}.$$ In this excercise we will simplify this distribution, but we will obtain a similar effect. - (3.1) Create a new phantom named `obj_t2star` with spins at the same positions as the original phantom `obj`, each having a linear distribution of off-resonance. To achieve this, follow these steps: * (3.1.1) Create an empty phantom called `obj_t2star`. * (3.1.2) Create a linear off-resonance distribution such that the range $$2\pi [-10, 10]\,\mathrm{rad/s}$$ is covered uniformly with $$N_{\mathrm{isochromats}} = 20$$ (use the function `range(start, stop, length)`). * (3.1.3) Iterate over the elements `off` of the linear distribution (`for` loop) and create copies of the original phantom (`obj_aux = copy(obj)`) and set the off-resonance of that copy to `off` with `obj_aux.Δw .= off`. * (3.1.4) Update `obj_t2star` by appending the modified copies `obj_aux` (`obj_t2star += obj_aux`). * (3.1.5) Finally, outside the loop, divide the proton density `obj_t2star.ρ` by $$N_{\mathrm{isochromats}} = 20$$ and rename the phantom `obj_t2star.name = "T2 star phantom"`. - (3.2) Plot `obj_t2star` with `plot_phantom_map(obj_t2star, :Δw)` and verify it is correct """$97479437-9ce3-4b33-9134-0f2af89bccb5metadatadisabled©show_logsîskip_as_script§cell_id$97479437-9ce3-4b33-9134-0f2af89bccb5code_folded¤code_# (4.7) Simulate using seq_se and obj_t2star raw_t2_star_se = simulate(obj_t2star, seq_se, sys)$7a66ab47-918f-4582-895f-1b4690562051metadatadisabled©show_logsîskip_as_script§cell_id$7a66ab47-918f-4582-895f-1b4690562051code_folded¤code_# (1.7) Plot the resulting raw data with plot_signal plot_signal(raw; slider=false, height=400)$964404f6-7f46-4df9-ad98-921948c3be69metadatadisabled©show_logsîskip_as_script§cell_id$964404f6-7f46-4df9-ad98-921948c3be69code_folded¤codebegin recon_layout = Layout(yaxis=attr(range=[0, 0.8])) relayout!(recon_gre, recon_layout; title="GRE-T2") relayout!(recon_t2_star_gre, recon_layout; title="GRE-T2*") fig_recon_2 = [recon_gre recon_t2_star_gre] relayout(fig_recon_2, showlegend=false, height=400) end$4a4a6bd3-b820-479c-89e3-f3ce79a316dbmetadatadisabled©show_logsîskip_as_script§cell_id$4a4a6bd3-b820-479c-89e3-f3ce79a316dbcode_folded¤code{# (3.6) Reconstruct the 1D image recon_t2_star_gre = Plot(abs.(fftc(raw_t2_star_gre.profiles[1].data)), Layout(height=400))$74666c1a-2673-4936-982b-6229bf92af66metadatadisabled©show_logsîskip_as_script§cell_id$74666c1a-2673-4936-982b-6229bf92af66code_foldedäcodemd""" - (2.5) Simulate the `seq_gre` sequence - (2.6) Plot the simulated signal - (2.7) Reconstruct the 1D image - (2.8) Do you notice anything weird? If the answer is yes, try adjusting `Ax` to change the `FOV` of the acquisition """$ada602d2-4f4b-4fb4-a763-8a639e05ff38metadatadisabled©show_logsîskip_as_script§cell_id$ada602d2-4f4b-4fb4-a763-8a639e05ff38code_folded¤codeK# (2.5) Simulate the seq_gre sequence raw_gre = simulate(obj, seq_gre, sys)$1a83d897-705b-443d-89a4-ea5e3e6a3c07metadatadisabled©show_logsîskip_as_script§cell_id$1a83d897-705b-443d-89a4-ea5e3e6a3c07code_folded¤code# (3.4) Plot the simulated signal begin signal_t2_star_gre = plot_signal(raw_t2_star_gre; slider=false, height=400) addtraces!(signal_t2_star_gre, t2_decay(t_adc_gre)) signal_t2_star_gre end$27686262-1a1e-45fa-b4ee-90ae1d9ee34emetadatadisabled©show_logsîskip_as_script§cell_id$27686262-1a1e-45fa-b4ee-90ae1d9ee34ecode_foldedäcode٥md""" - (3.3) Simulate the `seq_gre` sequence - (3.4) Plot the simulated signal - (3.5) Compare the plot in (3.5) with (2.6) - (3.6) Reconstruct the 1D image """$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7bmetadatadisabled©show_logsîskip_as_script§cell_id$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7bcode_folded¤code:# (3.2) Plot obj_t2star plot_phantom_map(obj_t2star, :Δw)$e4ef5145-a63c-4f91-ac04-3b5bf16c0842metadatadisabled©show_logsîskip_as_script§cell_id$e4ef5145-a63c-4f91-ac04-3b5bf16c0842code_folded¤codeZ# (3.3) Simulate the seq_gre sequence raw_t2_star_gre = simulate(obj_t2star, seq_gre, sys)$8529f36d-2d39-4b45-a821-01c8346539fdmetadatadisabled©show_logsîskip_as_script§cell_id$8529f36d-2d39-4b45-a821-01c8346539fdcode_foldedäcodeITableOfContents() # There should be a table of contents on the right --->$1231b832-47b1-4ccb-9b56-a67838598cc7metadatadisabled©show_logsîskip_as_script§cell_id$1231b832-47b1-4ccb-9b56-a67838598cc7code_folded¤code# (1.8) Is the signal the same as `Plot(t, exp.(-t ./ T2))`? begin t = range(0, 50, 100) t2_decay(t) = scatter(x=t, y=20.0.*exp.(-t ./ 50), name="T2-decay", marker_color="purple") Plot(t2_decay(t), Layout(yaxis_range=[0, 20.1], height=400)) end$41d14dec-b852-4316-aefb-c3d08fa43216metadatadisabled©show_logsîskip_as_script§cell_id$41d14dec-b852-4316-aefb-c3d08fa43216code_folded¤code# (2.6) Plot the simulated signal begin t_adc_gre = KomaMRICore.get_adc_sampling_times(seq_gre)*1e3 signal_gre = plot_signal(raw_gre; slider=false, height=400) addtraces!(signal_gre, t2_decay(t_adc_gre)) signal_gre end$ab8dc1ce-d1ef-43a0-9495-dac931b52aecmetadatadisabled©show_logsîskip_as_script§cell_id$ab8dc1ce-d1ef-43a0-9495-dac931b52aeccode_folded¤codeE# Set this boolean to `true` when you finish activity_finished = true$58be4150-2b7a-4f9e-a7d7-40a086fd3a53metadatadisabled©show_logsîskip_as_script§cell_id$58be4150-2b7a-4f9e-a7d7-40a086fd3a53code_foldedäcodeٰif activity_finished html""" """ end$d16efa62-dce7-4ec3-9e3c-b5e1677377fcmetadatadisabled©show_logsîskip_as_script§cell_id$d16efa62-dce7-4ec3-9e3c-b5e1677377fccode_folded¤codeْ# (1.4) A Phantom with 20 spins begin obj = Phantom(x=collect(range(-1e-3,1e-3,20))) obj.ρ .= 1 obj.T1 .= 500e-3 obj.T2 .= 50e-3 nothing end$c02f3898-10cb-4f1e-b5ef-eb42b803baedmetadatadisabled©show_logsîskip_as_script§cell_id$c02f3898-10cb-4f1e-b5ef-eb42b803baedcode_folded¤code٨begin relayout!(kspace_gre; title="GRE") relayout!(kspace_se; title="SE") fig_kspace = [kspace_gre kspace_se] relayout(fig_kspace, showlegend=false, height=400) end$3357a283-a234-4d15-8fdf-7fbec58b33a7metadatadisabled©show_logsîskip_as_script§cell_id$3357a283-a234-4d15-8fdf-7fbec58b33a7code_foldedäcodeWmd""" # 4. Spin Echo $(Resource("https://raw.githubusercontent.com/LIBREhub/MRI-processing-2023/main/02-simulation/Figures/SE.gif", :width=>"400px")) The spin echo experiment has the advantage that the echo signal amplitud it is modulated by $$\exp(-t/T_2)$$ and not $$\exp(-t/T_2^{*})$$. For this section we will use the phantom `obj_t2star` and a new sequence `seq_se`. For this sequence we will need: - (4.1) A 90deg hard RF pulse - (4.2) A `Delay` of $$\mathrm{TE}/2$$ with a positive gradient (area `Ax`) - (4.3) A 180deg hard RF pulse - (4.4) A readout gradient of area `2Ax` with an ADC (similar to (2.2)), such that the middle of the gradient and ADC are in $$\mathrm{TE}$$ - (4.5) Create concatenating these blocks into a sequence called `seq_se` - (4.6) Plot `seq_se` and its k-space. Is the k-space the same as `seq_gre` in (2.3)? """$f11a2fa2-eff9-4979-b739-3da2b24a9a45metadatadisabled©show_logsîskip_as_script§cell_id$f11a2fa2-eff9-4979-b739-3da2b24a9a45code_foldedäcodemd""" Generate a virtual object: - (1.4) A Phantom with 20 spins, with properties: - `obj.x` = [-1, 1] mm (20 spins along the $x$-axis) - `obj.ρ` .= 1 - `obj.T1` .= 500 ms - `obj.T2` .= 50 ms - (1.5) Plot the generated `Phantom` (check `plot_phantom_map`'s docs) """$9179aa40-bb40-4a36-ae1e-00ae42935a5fmetadatadisabled©show_logsîskip_as_script§cell_id$9179aa40-bb40-4a36-ae1e-00ae42935a5fcode_folded¤code~# (2.1) Create a gradient `gx_pre`, use the variable `Ax`!! begin T_gx_pre = 10e-3 gx_pre = Grad(-Ax/T_gx_pre, T_gx_pre, 0, 0) seq_gre = Sequence() seq_gre += rf seq_gre += gx_pre # (2.2) Append a `Sequence` block called `readout` gx = Grad(2*Ax/(2T_gx_pre), 2T_gx_pre, 0, 0) adc2 = ADC(100, 2T_gx_pre) readout = Sequence([gx;;], [RF(0,0);;], [adc2]) seq_gre += readout end$e4c80c24-20fd-42e5-9dcd-a65958569c01metadatadisabled©show_logsîskip_as_script§cell_id$e4c80c24-20fd-42e5-9dcd-a65958569c01code_foldedäcodehmd""" # 2. Gradient Echo $(Resource("https://raw.githubusercontent.com/LIBREhub/MRI-processing-2023/main/02-simulation/Figures/GRE.gif", :width=>"400px")) The gradient echo is one of the first steps to create an image. The big breakthrough was the addition of linearly increasing magnetic fields, or gradients, to encode the spin's positions in their frequency (Mmmh, someone said Fourier?). This works due to the fact that the frequency $$f$$ of a spin is $$f(x) = \frac{\gamma}{2\pi} B_z(x) = \frac{\gamma}{2\pi} G_x x.$$ Let's create a different sequence. - Create a 90-deg hard RF pulse and put it in a variable `seq_gre` - (2.1) Create a gradient with area `-Ax` using `gx_pre = Grad(A,T,rise,fall)` append to `seq_gre`. As an optional challenge, put `gx_pre.rise` and `gx_pre.fall` so the satisfy the `sys` requierements - (2.2) Append a `Sequence` block called `readout` that includes: - A gradient of twice the area, or `2Ax`. Call it `gx` - An `ADC` with `adc2.delay = gx.rise` and `adc2.T = gx.T` - (2.3) Plot `seq_gre` and its k-space - (2.4) Plot the $$k$$-space with the `plot_kspace` function """$9a88a54b-bcc7-41ad-8e60-f4d450dccb2dmetadatadisabled©show_logsîskip_as_script§cell_id$9a88a54b-bcc7-41ad-8e60-f4d450dccb2dcode_folded¤code# (2.7) Reconstruct the 1D image begin fftc(x; dims=[1,2]) = fftshift(fft(ifftshift(x, dims), dims), dims)/prod(size(x)[dims]) recon_gre = Plot(abs.(fftc(raw_gre.profiles[1].data)), Layout(height=400)) end$27e65680-22a0-4079-b6df-d60a3218e52emetadatadisabled©show_logsîskip_as_script§cell_id$27e65680-22a0-4079-b6df-d60a3218e52ecode_folded¤code# (4.5) Create concatenating these blocks into a sequence called `seq_se` begin # (4.1) A 90deg hard RF pulse seq_se = Sequence() seq_se += rf # (4.2) A `Delay` of TE/2 with a positive gradient (area `Ax`) seq_se += -1*gx_pre # (4.3) A 180deg hard RF pulse seq_se += (0.0+2.0im)*rf # (4.4) A readout gradient of area `2Ax` with an ADC (similar to (2.2)), such that the middle of the gradient and ADC are in $$\mathrm{TE}$$ seq_se += readout end$1c79b37e-d4e0-490f-9466-20ce28f017aemetadatadisabled©show_logsîskip_as_script§cell_id$1c79b37e-d4e0-490f-9466-20ce28f017aecode_folded¤code# (4.8) Compare the signal obtained in (4.7) with the one at (3.4) begin t_adc_se = KomaMRICore.get_adc_sampling_times(seq_se)*1e3 signal_t2_star_se = plot_signal(raw_t2_star_se; slider=false, height=400) addtraces!(signal_t2_star_se, t2_decay(t_adc_se)) relayout!(signal_t2_star_se, signal_layout; title="SE") fig_signal_3 = [signal_gre signal_t2_star_gre signal_t2_star_se] relayout(fig_signal_3, showlegend=false, height=400) end$ea542271-01c2-4962-a708-804b23a861b9metadatadisabled©show_logsîskip_as_script§cell_id$ea542271-01c2-4962-a708-804b23a861b9code_foldedäcodemd""" - (1.6) Finally, use the generated `seq`, `obj`, and `sys` to simulate the FID (check `simulate`'s docs) - (1.7) Plot the resulting raw data with `plot_signal`. - (1.8) Is the signal the same as `Plot(t, exp.(-t ./ T2))`? """$ee7e81e7-484c-44a8-a191-f73e24707ce9metadatadisabled©show_logsîskip_as_script§cell_id$ee7e81e7-484c-44a8-a191-f73e24707ce9code_folded¤code# (3.1) Create the new obj_t2star phantom begin # (3.1.1) Create an empty phantom obj_t2star = Phantom() # (3.1.2) Define the linear off-resonance distribution Niso = 20 linear_offresonance_distribution = 2π .* range(-10, 10, Niso) # (3.1.3) Iterate over the linear off-resonance distribution and ... for off = linear_offresonance_distribution # ... copy the original phantom and modify its off-resonance aux = copy(obj) aux.Δw .= off aux.y .+= off * 1e-6 # So the distribution is visible # (3.1.4) Update the phantom obj_t2star += aux end # (3.1.5) Divide the proton density and rename the phantom obj_t2star.ρ .= 1.0 / Niso obj_t2star.name = "T2 star phantom" end$0266632d-5ca4-4196-a523-33a66dd70e0cmetadatadisabled©show_logsîskip_as_script§cell_id$0266632d-5ca4-4196-a523-33a66dd70e0ccode_folded¤code:# (1.2) An ADC to capture the signal adc = ADC(100, 50e-3)$5df97874-f09c-4173-a2f6-893db322ccafmetadatadisabled©show_logsîskip_as_script§cell_id$5df97874-f09c-4173-a2f6-893db322ccafcode_foldedäcode'md"# Understanding basic MRI sequences"$d6b1729a-874d-11ee-151a-9b0fcce2c4fdmetadatadisabled©show_logsîskip_as_script§cell_id$d6b1729a-874d-11ee-151a-9b0fcce2c4fdcode_folded¤code:using KomaMRICore, KomaMRIPlots, FFTW, PlotlyBase, PlutoUI$6dfe338d-de85-4adb-b030-09455fae78a0metadatadisabled©show_logsîskip_as_script§cell_id$6dfe338d-de85-4adb-b030-09455fae78a0code_foldedäcodeپmd""" Welcome to the hands-on session on MRI simulation. Let's have some fun! If you have any doubts about how to use a function, please search in the **Live Docs** at the bottom right. """$3abca406-2e6b-4b37-8835-65cfad9d0caametadatadisabled©show_logsîskip_as_script§cell_id$3abca406-2e6b-4b37-8835-65cfad9d0caacode_folded¤codeh# (2.4) Plot the $k$-space with the `plot_kspace` function kspace_gre = plot_kspace(seq_gre; height=400)$c47a50b8-c930-4c96-9b34-2772186634d9metadatadisabled©show_logsîskip_as_script§cell_id$c47a50b8-c930-4c96-9b34-2772186634d9code_folded¤codef# (1.6) Finally, use the generated seq, obj, and sys to simulate the FID raw = simulate(obj, seq, sys)$fe8bbcd2-e8f5-4225-80c3-47e73176fb3dmetadatadisabled©show_logsîskip_as_script§cell_id$fe8bbcd2-e8f5-4225-80c3-47e73176fb3dcode_foldedäcodeMmd""" Congratulations! you finished the simulation hands-on session 🥳! """$abea2c43-d83e-4438-8cd3-4be06b8174b3metadatadisabled©show_logsîskip_as_script§cell_id$abea2c43-d83e-4438-8cd3-4be06b8174b3code_foldedäcodemd"""# Reproducibility This [Pluto notebook](https://plutojl.org/) is reproducible by default, as it has an embedded `Project.toml` and `Manifest.toml`, that store the exact package versions used to create the notebook."""$f1f3b700-5916-496f-b938-46f7f08b4eb6metadatadisabled©show_logsîskip_as_script§cell_id$f1f3b700-5916-496f-b938-46f7f08b4eb6code_folded¤code|# (4.6) Plot seq_se and its k-space. Is the k-space the same as seq_gre in (2.3)? plot_seq(seq_se; slider=false, height=400)$0f96a83d-96ef-4768-9330-87c466e35c93metadatadisabled©show_logsîskip_as_script§cell_id$0f96a83d-96ef-4768-9330-87c466e35c93code_folded¤codeك# (2.8) Do you notice anything weird? Change Ax! @bind Ax Slider(range(0, 20, 20)*1e-5, default=10e-5) # Gradient's area in [T/m s]$8e474add-8651-431b-b481-7a139037dbd2metadatadisabled©show_logsîskip_as_script§cell_id$8e474add-8651-431b-b481-7a139037dbd2code_foldedäcodemd"""# 1. Free Induction Decay (FID) The free induction decay is the simplest observable NMR signal. This signal is the one that follows a single tipping RF pulse. $(PlutoUI.Resource("https://raw.githubusercontent.com/LIBREhub/MRI-processing-2023/main/02-simulation/Figures/FID.png", :width=>"300px")) To recreate this experiment, we will need to define a `Sequence`: - (1.1) A 90-deg block RF pulse, put it in a variable `seq` (check `PulseDesigner.RF_hard`'s docs using the Live Docs) - (1.2) An ADC to capture the signal in a variable `adc`, concatenate with (1.1) using `seq += adc` - (1.3) Plot the generated `Sequence` (check `plot_seq`'s docs) For the hardware limits use the default scanner `sys = Scanner()`. """$4e1434e1-673f-4206-a271-9edec10ebd6ametadatadisabled©show_logsîskip_as_script§cell_id$4e1434e1-673f-4206-a271-9edec10ebd6acode_folded¤code+kspace_se = plot_kspace(seq_se; height=400)$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195metadatadisabled©show_logsîskip_as_script§cell_id$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195code_folded¤codeR# (2.3) Plot `seq_gre` and the k-space plot_seq(seq_gre; slider=false, height=400)$c6e33cb8-f42c-4643-9257-124d2804d3dametadatadisabled©show_logsîskip_as_script§cell_id$c6e33cb8-f42c-4643-9257-124d2804d3dacode_folded¤codeٸ# (1.1) A 90-deg block RF pulse begin sys = Scanner() durRF = π/2/(2π*γ*sys.limits.B1); #90-degree hard excitation pulse rf = PulseDesigner.RF_hard(sys.limits.B1, durRF, sys) end$7deadd58-b202-4508-b4c7-686f742cb713metadatadisabled©show_logsîskip_as_script§cell_id$7deadd58-b202-4508-b4c7-686f742cb713code_foldedäcode?begin begin using Pkg begin println("OS $(Base.Sys.MACHINE)") # OS println("Julia $VERSION") # Julia version # Koma sub-packages for (_, pkg) in filter(((_, pkg),) -> occursin("KomaMRI", pkg.name), Pkg.dependencies()) println("$(pkg.name) $(pkg.version)") end end end end$0975547d-67d9-4e6b-88ff-a9dd06a7f9efmetadatadisabled©show_logsîskip_as_script§cell_id$0975547d-67d9-4e6b-88ff-a9dd06a7f9efcode_folded¤code# (1.3) Plot the generated Sequence begin seq = Sequence() seq += rf seq += adc plot_seq(seq; slider=false, height=400) endlast_hot_reload_timecell_dependencies0$35ff3402-dc36-4b91-bec9-b4d21faf3e68precedence_heuristic cell_id$35ff3402-dc36-4b91-bec9-b4d21faf3e68downstream_cells_mapupstream_cells_mapplot_phantom_mapobj$d16efa62-dce7-4ec3-9e3c-b5e1677377fc$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7cprecedence_heuristic cell_id$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7cdownstream_cells_mapfig_signal_2signal_layout$1c79b37e-d4e0-490f-9466-20ce28f017aeupstream_cells_mapsignal_gre$41d14dec-b852-4316-aefb-c3d08fa43216Layoutrelayout!signal_t2_star_gre$1a83d897-705b-443d-89a4-ea5e3e6a3c07relayoutattr$2e65ae31-f50a-462b-9744-80bf6cdb388eprecedence_heuristic cell_id$2e65ae31-f50a-462b-9744-80bf6cdb388edownstream_cells_maprecon_t2_star_se$34824db7-13c4-45e2-befa-f027b9b585c0upstream_cells_mapPlotLayoutfftc$9a88a54b-bcc7-41ad-8e60-f4d450dccb2draw_t2_star_se$97479437-9ce3-4b33-9134-0f2af89bccb5abs$45952512-aaf1-43d8-a95e-c32bb2633f42precedence_heuristic cell_id$45952512-aaf1-43d8-a95e-c32bb2633f42downstream_cells_mapupstream_cells_map@md_strgetindex$34824db7-13c4-45e2-befa-f027b9b585c0precedence_heuristic cell_id$34824db7-13c4-45e2-befa-f027b9b585c0downstream_cells_mapfig_recon_3upstream_cells_maprecon_t2_star_gre$4a4a6bd3-b820-479c-89e3-f3ce79a316dbrecon_layout$964404f6-7f46-4df9-ad98-921948c3be69relayout!recon_t2_star_se$2e65ae31-f50a-462b-9744-80bf6cdb388erelayoutrecon_gre$9a88a54b-bcc7-41ad-8e60-f4d450dccb2d$97104c46-e81f-444a-957f-0bbb1b02f1b8precedence_heuristic cell_id$97104c46-e81f-444a-957f-0bbb1b02f1b8downstream_cells_mapupstream_cells_mapResource@md_strgetindex=>$97479437-9ce3-4b33-9134-0f2af89bccb5precedence_heuristic cell_id$97479437-9ce3-4b33-9134-0f2af89bccb5downstream_cells_mapraw_t2_star_se$1c79b37e-d4e0-490f-9466-20ce28f017ae$2e65ae31-f50a-462b-9744-80bf6cdb388eupstream_cells_mapseq_se$27e65680-22a0-4079-b6df-d60a3218e52esys$c6e33cb8-f42c-4643-9257-124d2804d3daobj_t2star$ee7e81e7-484c-44a8-a191-f73e24707ce9simulate$7a66ab47-918f-4582-895f-1b4690562051precedence_heuristic cell_id$7a66ab47-918f-4582-895f-1b4690562051downstream_cells_mapupstream_cells_mapplot_signalraw$c47a50b8-c930-4c96-9b34-2772186634d9$964404f6-7f46-4df9-ad98-921948c3be69precedence_heuristic cell_id$964404f6-7f46-4df9-ad98-921948c3be69downstream_cells_mapfig_recon_2recon_layout$34824db7-13c4-45e2-befa-f027b9b585c0upstream_cells_maprecon_t2_star_gre$4a4a6bd3-b820-479c-89e3-f3ce79a316dbLayoutrecon_gre$9a88a54b-bcc7-41ad-8e60-f4d450dccb2drelayout!relayoutattr$4a4a6bd3-b820-479c-89e3-f3ce79a316dbprecedence_heuristic cell_id$4a4a6bd3-b820-479c-89e3-f3ce79a316dbdownstream_cells_maprecon_t2_star_gre$964404f6-7f46-4df9-ad98-921948c3be69$34824db7-13c4-45e2-befa-f027b9b585c0upstream_cells_mapPlotLayoutfftc$9a88a54b-bcc7-41ad-8e60-f4d450dccb2draw_t2_star_gre$e4ef5145-a63c-4f91-ac04-3b5bf16c0842abs$74666c1a-2673-4936-982b-6229bf92af66precedence_heuristic cell_id$74666c1a-2673-4936-982b-6229bf92af66downstream_cells_mapupstream_cells_map@md_strgetindex$ada602d2-4f4b-4fb4-a763-8a639e05ff38precedence_heuristic cell_id$ada602d2-4f4b-4fb4-a763-8a639e05ff38downstream_cells_mapraw_gre$41d14dec-b852-4316-aefb-c3d08fa43216$9a88a54b-bcc7-41ad-8e60-f4d450dccb2dupstream_cells_mapobj$d16efa62-dce7-4ec3-9e3c-b5e1677377fcsys$c6e33cb8-f42c-4643-9257-124d2804d3dasimulateseq_gre$9179aa40-bb40-4a36-ae1e-00ae42935a5f$1a83d897-705b-443d-89a4-ea5e3e6a3c07precedence_heuristic cell_id$1a83d897-705b-443d-89a4-ea5e3e6a3c07downstream_cells_mapsignal_t2_star_gre$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7c$1c79b37e-d4e0-490f-9466-20ce28f017aeupstream_cells_mapplot_signalraw_t2_star_gre$e4ef5145-a63c-4f91-ac04-3b5bf16c0842addtraces!t2_decay$1231b832-47b1-4ccb-9b56-a67838598cc7t_adc_gre$41d14dec-b852-4316-aefb-c3d08fa43216$27686262-1a1e-45fa-b4ee-90ae1d9ee34eprecedence_heuristic cell_id$27686262-1a1e-45fa-b4ee-90ae1d9ee34edownstream_cells_mapupstream_cells_map@md_strgetindex$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7bprecedence_heuristic cell_id$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7bdownstream_cells_mapupstream_cells_mapobj_t2star$ee7e81e7-484c-44a8-a191-f73e24707ce9plot_phantom_map$e4ef5145-a63c-4f91-ac04-3b5bf16c0842precedence_heuristic cell_id$e4ef5145-a63c-4f91-ac04-3b5bf16c0842downstream_cells_mapraw_t2_star_gre$1a83d897-705b-443d-89a4-ea5e3e6a3c07$4a4a6bd3-b820-479c-89e3-f3ce79a316dbupstream_cells_mapsys$c6e33cb8-f42c-4643-9257-124d2804d3daobj_t2star$ee7e81e7-484c-44a8-a191-f73e24707ce9simulateseq_gre$9179aa40-bb40-4a36-ae1e-00ae42935a5f$8529f36d-2d39-4b45-a821-01c8346539fdprecedence_heuristic cell_id$8529f36d-2d39-4b45-a821-01c8346539fddownstream_cells_mapupstream_cells_mapTableOfContents$1231b832-47b1-4ccb-9b56-a67838598cc7precedence_heuristic cell_id$1231b832-47b1-4ccb-9b56-a67838598cc7downstream_cells_maptt2_decay$41d14dec-b852-4316-aefb-c3d08fa43216$1a83d897-705b-443d-89a4-ea5e3e6a3c07$1c79b37e-d4e0-490f-9466-20ce28f017aeupstream_cells_mapPlot/Layout-expscatter*range$41d14dec-b852-4316-aefb-c3d08fa43216precedence_heuristic cell_id$41d14dec-b852-4316-aefb-c3d08fa43216downstream_cells_mapsignal_gre$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7c$1c79b37e-d4e0-490f-9466-20ce28f017aet_adc_gre$1a83d897-705b-443d-89a4-ea5e3e6a3c07upstream_cells_mapKomaMRICore$d6b1729a-874d-11ee-151a-9b0fcce2c4fd"KomaMRICore.get_adc_sampling_timesplot_signaladdtraces!raw_gre$ada602d2-4f4b-4fb4-a763-8a639e05ff38*t2_decay$1231b832-47b1-4ccb-9b56-a67838598cc7seq_gre$9179aa40-bb40-4a36-ae1e-00ae42935a5f$ab8dc1ce-d1ef-43a0-9495-dac931b52aecprecedence_heuristic cell_id$ab8dc1ce-d1ef-43a0-9495-dac931b52aecdownstream_cells_mapactivity_finished$58be4150-2b7a-4f9e-a7d7-40a086fd3a53upstream_cells_map$58be4150-2b7a-4f9e-a7d7-40a086fd3a53precedence_heuristic cell_id$58be4150-2b7a-4f9e-a7d7-40a086fd3a53downstream_cells_mapupstream_cells_mapactivity_finished$ab8dc1ce-d1ef-43a0-9495-dac931b52aecBase@html_strBase.Docs.HTML$d16efa62-dce7-4ec3-9e3c-b5e1677377fcprecedence_heuristic cell_id$d16efa62-dce7-4ec3-9e3c-b5e1677377fcdownstream_cells_mapobj$35ff3402-dc36-4b91-bec9-b4d21faf3e68$c47a50b8-c930-4c96-9b34-2772186634d9$ada602d2-4f4b-4fb4-a763-8a639e05ff38$ee7e81e7-484c-44a8-a191-f73e24707ce9upstream_cells_mapcollectnothingPhantomrange$c02f3898-10cb-4f1e-b5ef-eb42b803baedprecedence_heuristic cell_id$c02f3898-10cb-4f1e-b5ef-eb42b803baeddownstream_cells_mapfig_kspaceupstream_cells_maprelayout!kspace_gre$3abca406-2e6b-4b37-8835-65cfad9d0caakspace_se$4e1434e1-673f-4206-a271-9edec10ebd6arelayout$3357a283-a234-4d15-8fdf-7fbec58b33a7precedence_heuristic cell_id$3357a283-a234-4d15-8fdf-7fbec58b33a7downstream_cells_mapupstream_cells_mapResource@md_strgetindex=>$f11a2fa2-eff9-4979-b739-3da2b24a9a45precedence_heuristic cell_id$f11a2fa2-eff9-4979-b739-3da2b24a9a45downstream_cells_mapupstream_cells_map@md_strgetindex$9179aa40-bb40-4a36-ae1e-00ae42935a5fprecedence_heuristic cell_id$9179aa40-bb40-4a36-ae1e-00ae42935a5fdownstream_cells_mapadc2T_gx_pregx_pre$27e65680-22a0-4079-b6df-d60a3218e52egxreadout$27e65680-22a0-4079-b6df-d60a3218e52eseq_gre$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195$3abca406-2e6b-4b37-8835-65cfad9d0caa$ada602d2-4f4b-4fb4-a763-8a639e05ff38$41d14dec-b852-4316-aefb-c3d08fa43216$e4ef5145-a63c-4f91-ac04-3b5bf16c0842upstream_cells_map/Gradrf$c6e33cb8-f42c-4643-9257-124d2804d3daADCAx$0f96a83d-96ef-4768-9330-87c466e35c93Sequence+-*RF$e4c80c24-20fd-42e5-9dcd-a65958569c01precedence_heuristic cell_id$e4c80c24-20fd-42e5-9dcd-a65958569c01downstream_cells_mapupstream_cells_mapResource@md_strgetindex=>$9a88a54b-bcc7-41ad-8e60-f4d450dccb2dprecedence_heuristic cell_id$9a88a54b-bcc7-41ad-8e60-f4d450dccb2ddownstream_cells_mapfftc$4a4a6bd3-b820-479c-89e3-f3ce79a316db$2e65ae31-f50a-462b-9744-80bf6cdb388erecon_gre$964404f6-7f46-4df9-ad98-921948c3be69$34824db7-13c4-45e2-befa-f027b9b585c0upstream_cells_mapprod/PlotLayoutabsfftshiftsizeraw_gre$ada602d2-4f4b-4fb4-a763-8a639e05ff38ifftshiftfft$27e65680-22a0-4079-b6df-d60a3218e52eprecedence_heuristic cell_id$27e65680-22a0-4079-b6df-d60a3218e52edownstream_cells_mapseq_se$f1f3b700-5916-496f-b938-46f7f08b4eb6$4e1434e1-673f-4206-a271-9edec10ebd6a$97479437-9ce3-4b33-9134-0f2af89bccb5$1c79b37e-d4e0-490f-9466-20ce28f017aeupstream_cells_maprf$c6e33cb8-f42c-4643-9257-124d2804d3daimSequence+gx_pre$9179aa40-bb40-4a36-ae1e-00ae42935a5f*readout$9179aa40-bb40-4a36-ae1e-00ae42935a5f$1c79b37e-d4e0-490f-9466-20ce28f017aeprecedence_heuristic cell_id$1c79b37e-d4e0-490f-9466-20ce28f017aedownstream_cells_mapfig_signal_3signal_t2_star_set_adc_seupstream_cells_mapKomaMRICore$d6b1729a-874d-11ee-151a-9b0fcce2c4fdseq_se$27e65680-22a0-4079-b6df-d60a3218e52eaddtraces!relayout!signal_layout$18c82ff1-0bde-4fa0-848c-d0eb73d1ac7csignal_t2_star_gre$1a83d897-705b-443d-89a4-ea5e3e6a3c07raw_t2_star_se$97479437-9ce3-4b33-9134-0f2af89bccb5signal_gre$41d14dec-b852-4316-aefb-c3d08fa43216"KomaMRICore.get_adc_sampling_timesplot_signal*t2_decay$1231b832-47b1-4ccb-9b56-a67838598cc7relayout$ea542271-01c2-4962-a708-804b23a861b9precedence_heuristic cell_id$ea542271-01c2-4962-a708-804b23a861b9downstream_cells_mapupstream_cells_map@md_strgetindex$ee7e81e7-484c-44a8-a191-f73e24707ce9precedence_heuristic cell_id$ee7e81e7-484c-44a8-a191-f73e24707ce9downstream_cells_mapobj_t2star$2ee7ba47-02e5-4b02-a162-ddbd5ed47c7b$e4ef5145-a63c-4f91-ac04-3b5bf16c0842$97479437-9ce3-4b33-9134-0f2af89bccb5 linear_offresonance_distributionNisoupstream_cells_mapcopy/obj$d16efa62-dce7-4ec3-9e3c-b5e1677377fcπ+Phantom*range$0266632d-5ca4-4196-a523-33a66dd70e0cprecedence_heuristic cell_id$0266632d-5ca4-4196-a523-33a66dd70e0cdownstream_cells_mapadc$0975547d-67d9-4e6b-88ff-a9dd06a7f9efupstream_cells_mapADC$5df97874-f09c-4173-a2f6-893db322ccafprecedence_heuristic cell_id$5df97874-f09c-4173-a2f6-893db322ccafdownstream_cells_mapupstream_cells_map@md_strgetindex$d6b1729a-874d-11ee-151a-9b0fcce2c4fdprecedence_heuristiccell_id$d6b1729a-874d-11ee-151a-9b0fcce2c4fddownstream_cells_mapKomaMRICore$41d14dec-b852-4316-aefb-c3d08fa43216$1c79b37e-d4e0-490f-9466-20ce28f017aeKomaMRIPlotsFFTWPlutoUI$8e474add-8651-431b-b481-7a139037dbd2PlotlyBaseupstream_cells_map$6dfe338d-de85-4adb-b030-09455fae78a0precedence_heuristic cell_id$6dfe338d-de85-4adb-b030-09455fae78a0downstream_cells_mapupstream_cells_map@md_strgetindex$3abca406-2e6b-4b37-8835-65cfad9d0caaprecedence_heuristic cell_id$3abca406-2e6b-4b37-8835-65cfad9d0caadownstream_cells_mapkspace_gre$c02f3898-10cb-4f1e-b5ef-eb42b803baedupstream_cells_mapplot_kspaceseq_gre$9179aa40-bb40-4a36-ae1e-00ae42935a5f$c47a50b8-c930-4c96-9b34-2772186634d9precedence_heuristic cell_id$c47a50b8-c930-4c96-9b34-2772186634d9downstream_cells_mapraw$7a66ab47-918f-4582-895f-1b4690562051upstream_cells_mapsys$c6e33cb8-f42c-4643-9257-124d2804d3daseq$0975547d-67d9-4e6b-88ff-a9dd06a7f9efsimulateobj$d16efa62-dce7-4ec3-9e3c-b5e1677377fc$fe8bbcd2-e8f5-4225-80c3-47e73176fb3dprecedence_heuristic cell_id$fe8bbcd2-e8f5-4225-80c3-47e73176fb3ddownstream_cells_mapupstream_cells_map@md_strgetindex$abea2c43-d83e-4438-8cd3-4be06b8174b3precedence_heuristic cell_id$abea2c43-d83e-4438-8cd3-4be06b8174b3downstream_cells_mapupstream_cells_map@md_strgetindex$f1f3b700-5916-496f-b938-46f7f08b4eb6precedence_heuristic cell_id$f1f3b700-5916-496f-b938-46f7f08b4eb6downstream_cells_mapupstream_cells_mapseq_se$27e65680-22a0-4079-b6df-d60a3218e52eplot_seq$0f96a83d-96ef-4768-9330-87c466e35c93precedence_heuristic cell_id$0f96a83d-96ef-4768-9330-87c466e35c93downstream_cells_mapAx$9179aa40-bb40-4a36-ae1e-00ae42935a5fupstream_cells_mapCoreBase@bindBase.getPlutoRunnerSliderCore.applicable*PlutoRunner.create_bondrange$8e474add-8651-431b-b481-7a139037dbd2precedence_heuristic cell_id$8e474add-8651-431b-b481-7a139037dbd2downstream_cells_mapupstream_cells_mapPlutoUI$d6b1729a-874d-11ee-151a-9b0fcce2c4fd@md_strgetindex=>PlutoUI.Resource$4e1434e1-673f-4206-a271-9edec10ebd6aprecedence_heuristic cell_id$4e1434e1-673f-4206-a271-9edec10ebd6adownstream_cells_mapkspace_se$c02f3898-10cb-4f1e-b5ef-eb42b803baedupstream_cells_mapseq_se$27e65680-22a0-4079-b6df-d60a3218e52eplot_kspace$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195precedence_heuristic cell_id$8b4a1ad9-2d6a-4c8f-bb8e-f43c2d058195downstream_cells_mapupstream_cells_mapplot_seqseq_gre$9179aa40-bb40-4a36-ae1e-00ae42935a5f$c6e33cb8-f42c-4643-9257-124d2804d3daprecedence_heuristic cell_id$c6e33cb8-f42c-4643-9257-124d2804d3dadownstream_cells_mapsys$c47a50b8-c930-4c96-9b34-2772186634d9$ada602d2-4f4b-4fb4-a763-8a639e05ff38$e4ef5145-a63c-4f91-ac04-3b5bf16c0842$97479437-9ce3-4b33-9134-0f2af89bccb5rf$0975547d-67d9-4e6b-88ff-a9dd06a7f9ef$9179aa40-bb40-4a36-ae1e-00ae42935a5f$27e65680-22a0-4079-b6df-d60a3218e52edurRFupstream_cells_map/PulseDesigner.RF_hardπγ*PulseDesignerScanner$7deadd58-b202-4508-b4c7-686f742cb713precedence_heuristiccell_id$7deadd58-b202-4508-b4c7-686f742cb713downstream_cells_mapPkg$7deadd58-b202-4508-b4c7-686f742cb713upstream_cells_mapBaseprintlnVERSIONoccursinfilterPkg$7deadd58-b202-4508-b4c7-686f742cb713Pkg.dependencies$0975547d-67d9-4e6b-88ff-a9dd06a7f9efprecedence_heuristic cell_id$0975547d-67d9-4e6b-88ff-a9dd06a7f9efdownstream_cells_mapseq$c47a50b8-c930-4c96-9b34-2772186634d9upstream_cells_maprf$c6e33cb8-f42c-4643-9257-124d2804d3daSequence+adc$0266632d-5ca4-4196-a523-33a66dd70e0cplot_seqshortpath01-gradient-echo-spin-echo.jllast_save_timeAڪu7 Anotebook_id$4efa9358-b15d-11f1-aed1-d90e2ac6eb10nbpkgbusy_packages,waiting_for_permission_but_probably_disabled§enabledðterminal_outputsKomaMRICore Resolving... ===  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Project.toml` [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Manifest.toml` [b27032c2] ↑ LibCURL v0.6.4 ⇒ v1.0.0 [37e2e46d] ↑ LinearAlgebra v1.12.0 ⇒ v1.13.0 [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0 [ea8e919c] ↑ SHA v0.7.0 ⇒ v1.0.0 [2f01184e] ↑ SparseArrays v1.12.0 ⇒ v1.13.0 [e66e0078] ↑ CompilerSupportLibraries_jll v1.3.0+1 ⇒ v1.5.5+2 [deac9b47] ↑ LibCURL_jll v8.15.0+0 ⇒ v8.18.0+1 [e37daf67] ↑ LibGit2_jll v1.9.0+0 ⇒ v1.9.1+0 [29816b5a] ↑ LibSSH2_jll v1.11.3+1 ⇒ v1.11.103+0 [14a3606d] ↑ MozillaCACerts_jll v2025.11.4 ⇒ v2026.8.13 [4536629a] ↑ OpenBLAS_jll v0.3.29+0 ⇒ v0.3.30+0 [458c3c95] ↑ OpenSSL_jll v3.5.4+0 ⇒ v3.5.6+0 [efcefdf7] + PCRE2_jll v10.46.0+0 [bea87d4a] ↑ SuiteSparse_jll v7.8.3+2 ⇒ v7.10.1+0 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850ede] ↑ nghttp2_jll v1.64.0+1 ⇒ v1.67.1+0 [3f19e933] ↑ p7zip_jll v17.7.0+0 ⇒ v17.8.2+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...KomaMRIPlots Resolving... ===  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Project.toml` [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Manifest.toml` [b27032c2] ↑ LibCURL v0.6.4 ⇒ v1.0.0 [37e2e46d] ↑ LinearAlgebra v1.12.0 ⇒ v1.13.0 [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0 [ea8e919c] ↑ SHA v0.7.0 ⇒ v1.0.0 [2f01184e] ↑ SparseArrays v1.12.0 ⇒ v1.13.0 [e66e0078] ↑ CompilerSupportLibraries_jll v1.3.0+1 ⇒ v1.5.5+2 [deac9b47] ↑ LibCURL_jll v8.15.0+0 ⇒ v8.18.0+1 [e37daf67] ↑ LibGit2_jll v1.9.0+0 ⇒ v1.9.1+0 [29816b5a] ↑ LibSSH2_jll v1.11.3+1 ⇒ v1.11.103+0 [14a3606d] ↑ MozillaCACerts_jll v2025.11.4 ⇒ v2026.8.13 [4536629a] ↑ OpenBLAS_jll v0.3.29+0 ⇒ v0.3.30+0 [458c3c95] ↑ OpenSSL_jll v3.5.4+0 ⇒ v3.5.6+0 [efcefdf7] + PCRE2_jll v10.46.0+0 [bea87d4a] ↑ SuiteSparse_jll v7.8.3+2 ⇒ v7.10.1+0 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850ede] ↑ nghttp2_jll v1.64.0+1 ⇒ v1.67.1+0 [3f19e933] ↑ p7zip_jll v17.7.0+0 ⇒ v17.8.2+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...FFTW Resolving... ===  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Project.toml` [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Manifest.toml` [b27032c2] ↑ LibCURL v0.6.4 ⇒ v1.0.0 [37e2e46d] ↑ LinearAlgebra v1.12.0 ⇒ v1.13.0 [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0 [ea8e919c] ↑ SHA v0.7.0 ⇒ v1.0.0 [2f01184e] ↑ SparseArrays v1.12.0 ⇒ v1.13.0 [e66e0078] ↑ CompilerSupportLibraries_jll v1.3.0+1 ⇒ v1.5.5+2 [deac9b47] ↑ LibCURL_jll v8.15.0+0 ⇒ v8.18.0+1 [e37daf67] ↑ LibGit2_jll v1.9.0+0 ⇒ v1.9.1+0 [29816b5a] ↑ LibSSH2_jll v1.11.3+1 ⇒ v1.11.103+0 [14a3606d] ↑ MozillaCACerts_jll v2025.11.4 ⇒ v2026.8.13 [4536629a] ↑ OpenBLAS_jll v0.3.29+0 ⇒ v0.3.30+0 [458c3c95] ↑ OpenSSL_jll v3.5.4+0 ⇒ v3.5.6+0 [efcefdf7] + PCRE2_jll v10.46.0+0 [bea87d4a] ↑ SuiteSparse_jll v7.8.3+2 ⇒ v7.10.1+0 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850ede] ↑ nghttp2_jll v1.64.0+1 ⇒ v1.67.1+0 [3f19e933] ↑ p7zip_jll v17.7.0+0 ⇒ v17.8.2+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...PlutoUI Resolving... ===  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Project.toml` [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Manifest.toml` [b27032c2] ↑ LibCURL v0.6.4 ⇒ v1.0.0 [37e2e46d] ↑ LinearAlgebra v1.12.0 ⇒ v1.13.0 [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0 [ea8e919c] ↑ SHA v0.7.0 ⇒ v1.0.0 [2f01184e] ↑ SparseArrays v1.12.0 ⇒ v1.13.0 [e66e0078] ↑ CompilerSupportLibraries_jll v1.3.0+1 ⇒ v1.5.5+2 [deac9b47] ↑ LibCURL_jll v8.15.0+0 ⇒ v8.18.0+1 [e37daf67] ↑ LibGit2_jll v1.9.0+0 ⇒ v1.9.1+0 [29816b5a] ↑ LibSSH2_jll v1.11.3+1 ⇒ v1.11.103+0 [14a3606d] ↑ MozillaCACerts_jll v2025.11.4 ⇒ v2026.8.13 [4536629a] ↑ OpenBLAS_jll v0.3.29+0 ⇒ v0.3.30+0 [458c3c95] ↑ OpenSSL_jll v3.5.4+0 ⇒ v3.5.6+0 [efcefdf7] + PCRE2_jll v10.46.0+0 [bea87d4a] ↑ SuiteSparse_jll v7.8.3+2 ⇒ v7.10.1+0 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850ede] ↑ nghttp2_jll v1.64.0+1 ⇒ v1.67.1+0 [3f19e933] ↑ p7zip_jll v17.7.0+0 ⇒ v17.8.2+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...nbpkg_sync Resolving... ===  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Project.toml` [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Manifest.toml` [b27032c2] ↑ LibCURL v0.6.4 ⇒ v1.0.0 [37e2e46d] ↑ LinearAlgebra v1.12.0 ⇒ v1.13.0 [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0 [ea8e919c] ↑ SHA v0.7.0 ⇒ v1.0.0 [2f01184e] ↑ SparseArrays v1.12.0 ⇒ v1.13.0 [e66e0078] ↑ CompilerSupportLibraries_jll v1.3.0+1 ⇒ v1.5.5+2 [deac9b47] ↑ LibCURL_jll v8.15.0+0 ⇒ v8.18.0+1 [e37daf67] ↑ LibGit2_jll v1.9.0+0 ⇒ v1.9.1+0 [29816b5a] ↑ LibSSH2_jll v1.11.3+1 ⇒ v1.11.103+0 [14a3606d] ↑ MozillaCACerts_jll v2025.11.4 ⇒ v2026.8.13 [4536629a] ↑ OpenBLAS_jll v0.3.29+0 ⇒ v0.3.30+0 [458c3c95] ↑ OpenSSL_jll v3.5.4+0 ⇒ v3.5.6+0 [efcefdf7] + PCRE2_jll v10.46.0+0 [bea87d4a] ↑ SuiteSparse_jll v7.8.3+2 ⇒ v7.10.1+0 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850ede] ↑ nghttp2_jll v1.64.0+1 ⇒ v1.67.1+0 [3f19e933] ↑ p7zip_jll v17.7.0+0 ⇒ v17.8.2+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...Pkg Resolving... ===  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Project.toml` [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Manifest.toml` [b27032c2] ↑ LibCURL v0.6.4 ⇒ v1.0.0 [37e2e46d] ↑ LinearAlgebra v1.12.0 ⇒ v1.13.0 [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0 [ea8e919c] ↑ SHA v0.7.0 ⇒ v1.0.0 [2f01184e] ↑ SparseArrays v1.12.0 ⇒ v1.13.0 [e66e0078] ↑ CompilerSupportLibraries_jll v1.3.0+1 ⇒ v1.5.5+2 [deac9b47] ↑ LibCURL_jll v8.15.0+0 ⇒ v8.18.0+1 [e37daf67] ↑ LibGit2_jll v1.9.0+0 ⇒ v1.9.1+0 [29816b5a] ↑ LibSSH2_jll v1.11.3+1 ⇒ v1.11.103+0 [14a3606d] ↑ MozillaCACerts_jll v2025.11.4 ⇒ v2026.8.13 [4536629a] ↑ OpenBLAS_jll v0.3.29+0 ⇒ v0.3.30+0 [458c3c95] ↑ OpenSSL_jll v3.5.4+0 ⇒ v3.5.6+0 [efcefdf7] + PCRE2_jll v10.46.0+0 [bea87d4a] ↑ SuiteSparse_jll v7.8.3+2 ⇒ v7.10.1+0 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850ede] ↑ nghttp2_jll v1.64.0+1 ⇒ v1.67.1+0 [3f19e933] ↑ p7zip_jll v17.7.0+0 ⇒ v17.8.2+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...PlotlyBase Resolving... ===  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Project.toml` [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0  Updating `~/.julia/scratchspaces/c3e4b0f8-55cb-11ea-2926-15256bba5781/pkg_envs/env_gbqkrtpflw/Manifest.toml` [b27032c2] ↑ LibCURL v0.6.4 ⇒ v1.0.0 [37e2e46d] ↑ LinearAlgebra v1.12.0 ⇒ v1.13.0 [44cfe95a] ↑ Pkg v1.12.1 ⇒ v1.13.0 [ea8e919c] ↑ SHA v0.7.0 ⇒ v1.0.0 [2f01184e] ↑ SparseArrays v1.12.0 ⇒ v1.13.0 [e66e0078] ↑ CompilerSupportLibraries_jll v1.3.0+1 ⇒ v1.5.5+2 [deac9b47] ↑ LibCURL_jll v8.15.0+0 ⇒ v8.18.0+1 [e37daf67] ↑ LibGit2_jll v1.9.0+0 ⇒ v1.9.1+0 [29816b5a] ↑ LibSSH2_jll v1.11.3+1 ⇒ v1.11.103+0 [14a3606d] ↑ MozillaCACerts_jll v2025.11.4 ⇒ v2026.8.13 [4536629a] ↑ OpenBLAS_jll v0.3.29+0 ⇒ v0.3.30+0 [458c3c95] ↑ OpenSSL_jll v3.5.4+0 ⇒ v3.5.6+0 [efcefdf7] + PCRE2_jll v10.46.0+0 [bea87d4a] ↑ SuiteSparse_jll v7.8.3+2 ⇒ v7.10.1+0 [3161d3a3] + Zstd_jll v1.5.7+1 [8e850ede] ↑ nghttp2_jll v1.64.0+1 ⇒ v1.67.1+0 [3f19e933] ↑ p7zip_jll v17.7.0+0 ⇒ v17.8.2+0 Instantiating... === Precompiling... === Waiting for notebook process to start... Done. Starting precompilation...waiting_for_permission·restart_recommended_msgrestart_required_msginstalled_versionsKomaMRICore0.13.0KomaMRIPlots0.13.1__internal_julia_version1.13.0FFTW1.10.0PlutoUI0.7.83PkgstdlibPlotlyBase0.8.23!__internal_julia_manifest_version1.13.0install_time_nsνFwinstantiatedípluto_versionv1.0.3in_temp_dir