
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "generated/gallery/16-zte/zte3D_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_16-zte_zte3D_sequence.py>`
        to download the full example code.

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

.. _sphx_glr_generated_gallery_16-zte_zte3D_sequence.py:


===================
3D zero echo time
===================

A short non-selective excitation is applied while the radial readout gradient is
already at amplitude. Acquisition begins after the transmit/receive dead time,
without gradient-echo formation; spoiling suppresses residual transverse
magnetisation between repetitions. Contrast depends on TR, flip angle, RF
bandwidth, and very short-T2 decay. ZTE is used for anatomical imaging of
short-T2 tissues and other minimal-TE applications.

.. GENERATED FROM PYTHON SOURCE LINES 13-33








.. GENERATED FROM PYTHON SOURCE LINES 34-39

Nyquist angular sampling
------------------------

``ceil(pi * n**2)`` half-spoke directions over the sphere, which sample its
surface at the Nyquist spacing.

.. GENERATED FROM PYTHON SOURCE LINES 39-50

.. code-block:: Python


    import pypulseqpp as pp
    from pypulseqpp.sequences import zte3D_sequence

    baseline = zte3D_sequence(n=64, n_dummy=0)
    print(f"{baseline.num_blocks} blocks, {baseline.duration()[0]:.2f} s")
    print(
        f"{int(baseline.get_definition('NumShots')[0])} shots, "
        f"TR {baseline.get_definition('TR')[0] * 1e6:.0f} us"
    )





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

 .. code-block:: none

    25938 blocks, 8.25 s
    198 shots, TR 640 us




.. GENERATED FROM PYTHON SOURCE LINES 51-58

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

The automatically detected repetition is one shell of half-spoke
directions. The readout gradient reaches amplitude before the hard RF event,
and the ADC window starts after the transmit/receive dead time. The solid trace is a
representative repetition; shaded traces show other gradient encodes.

.. GENERATED FROM PYTHON SOURCE LINES 58-61

.. code-block:: Python


    baseline.paper_plot()




.. image-sg:: /generated/gallery/16-zte/images/sphx_glr_zte3D_sequence_001.png
   :alt: zte3D sequence
   :srcset: /generated/gallery/16-zte/images/sphx_glr_zte3D_sequence_001.png
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 62-67

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

The half-spokes over the three k-space axes. Each starts at the centre of
k-space and runs outward to the surface of the sampled sphere.

.. GENERATED FROM PYTHON SOURCE LINES 67-70

.. code-block:: Python


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




.. image-sg:: /generated/gallery/16-zte/images/sphx_glr_zte3D_sequence_002.png
   :alt: zte3D sequence
   :srcset: /generated/gallery/16-zte/images/sphx_glr_zte3D_sequence_002.png
   :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 71-80

Angular undersampling
---------------------

The Nyquist set of directions is divided into shells, each a copy of the
first rotated about ``z``. ``r`` acquires one shell in every ``r``: at
``r = 2`` the number of acquisitions is halved and the azimuthal spacing
between acquired shells is doubled. Angular undersampling produces streak
artefacts from the k-space periphery rather than the fold-over of an
undersampled Cartesian acquisition.

.. GENERATED FROM PYTHON SOURCE LINES 80-92

.. code-block:: Python


    alternative = zte3D_sequence(n=64, r=2, n_dummy=0)






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

 .. code-block:: none

                       blocks  duration (s)  acquisitions
    every shell         25938          8.25         12870
    every second        12969          4.12          6435




.. GENERATED FROM PYTHON SOURCE LINES 93-95

.. code-block:: Python

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




.. image-sg:: /generated/gallery/16-zte/images/sphx_glr_zte3D_sequence_003.png
   :alt: zte3D sequence
   :srcset: /generated/gallery/16-zte/images/sphx_glr_zte3D_sequence_003.png
   :class: sphx-glr-single-img






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

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


.. _sphx_glr_download_generated_gallery_16-zte_zte3D_sequence.py:

.. only:: html

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

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

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

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

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

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

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


.. only:: html

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

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