
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "generated/gallery/10-gradient-echo/gre_stack_of_spirals3D_sequence.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_generated_gallery_10-gradient-echo_gre_stack_of_spirals3D_sequence.py>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_generated_gallery_10-gradient-echo_gre_stack_of_spirals3D_sequence.py:


===================================
3D stack-of-spirals gradient echo
===================================

A slab-selective spoiled excitation is followed by one spiral interleaf with
Cartesian partition encoding. Gradient and RF spoiling suppress residual
transverse coherence between repetitions. TR, flip angle, and TE determine
contrast. Stack-of-spirals SPGR supports rapid 3D structural and dynamic
imaging.

.. GENERATED FROM PYTHON SOURCE LINES 12-32








.. GENERATED FROM PYTHON SOURCE LINES 33-37

Sixteen interleaves
-------------------

Sixteen interleaves at every partition.

.. GENERATED FROM PYTHON SOURCE LINES 37-45

.. code-block:: Python


    import pypulseqpp as pp
    from pypulseqpp.sequences import gre_stack_of_spirals3D_sequence

    baseline = gre_stack_of_spirals3D_sequence(n=96, n_z=8, n_shots=16, tr=None, n_dummy=0)
    print(f"{baseline.num_blocks} blocks, {baseline.duration()[0]:.2f} s")






.. rst-class:: sphx-glr-script-out

 .. code-block:: none

    512 blocks, 0.91 s




.. GENERATED FROM PYTHON SOURCE LINES 46-48

Sequence diagram
----------------

.. GENERATED FROM PYTHON SOURCE LINES 48-51

.. code-block:: Python


    baseline.paper_plot()




.. image-sg:: /generated/gallery/10-gradient-echo/images/sphx_glr_gre_stack_of_spirals3D_sequence_001.png
   :alt: gre stack of spirals3D sequence
   :srcset: /generated/gallery/10-gradient-echo/images/sphx_glr_gre_stack_of_spirals3D_sequence_001.png
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 52-56

Sampling order
--------------

The interleaves of every partition, over the three k-space axes.

.. GENERATED FROM PYTHON SOURCE LINES 56-59

.. code-block:: Python


    pp.plot.plot_kspace(baseline, color_by="shot")




.. image-sg:: /generated/gallery/10-gradient-echo/images/sphx_glr_gre_stack_of_spirals3D_sequence_002.png
   :alt: gre stack of spirals3D sequence
   :srcset: /generated/gallery/10-gradient-echo/images/sphx_glr_gre_stack_of_spirals3D_sequence_002.png
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 60-65

Fewer interleaves
-----------------

Halving the interleaf count halves the number of repetitions and doubles
the spiral pitch. The resulting peripheral sampling is below the Nyquist rate.

.. GENERATED FROM PYTHON SOURCE LINES 65-79

.. code-block:: Python


    alternative = gre_stack_of_spirals3D_sequence(
        n=96, n_z=8, n_shots=8, tr=None, n_dummy=0
    )






.. rst-class:: sphx-glr-script-out

 .. code-block:: none

                       blocks  duration (s)  acquisitions
    16 interleaves        512          0.91           128
    8 interleaves         256          0.61            64




.. GENERATED FROM PYTHON SOURCE LINES 80-82

.. code-block:: Python

    pp.plot.plot_kspace(alternative, color_by="shot")




.. image-sg:: /generated/gallery/10-gradient-echo/images/sphx_glr_gre_stack_of_spirals3D_sequence_003.png
   :alt: gre stack of spirals3D sequence
   :srcset: /generated/gallery/10-gradient-echo/images/sphx_glr_gre_stack_of_spirals3D_sequence_003.png
   :class: sphx-glr-single-img






.. rst-class:: sphx-glr-timing

   **Total running time of the script:** (0 minutes 3.200 seconds)


.. _sphx_glr_download_generated_gallery_10-gradient-echo_gre_stack_of_spirals3D_sequence.py:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-jupyter

      :download:`Download Jupyter notebook: gre_stack_of_spirals3D_sequence.ipynb <gre_stack_of_spirals3D_sequence.ipynb>`

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download Python source code: gre_stack_of_spirals3D_sequence.py <gre_stack_of_spirals3D_sequence.py>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: gre_stack_of_spirals3D_sequence.zip <gre_stack_of_spirals3D_sequence.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
