.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/single/detector/HG01.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_single_detector_HG01.py: Hermite-Gauss 01 Mode Detector ============================== This example demonstrates the initialization and visualization of HG01 Mode detector using PyMieSim. .. GENERATED FROM PYTHON SOURCE LINES 9-10 Importing the package: PyMieSim .. GENERATED FROM PYTHON SOURCE LINES 10-13 .. code-block:: Python from PyMieSim.single.detector import CoherentMode from PyMieSim.units import AU, degree .. GENERATED FROM PYTHON SOURCE LINES 14-15 Initializing the detector .. GENERATED FROM PYTHON SOURCE LINES 15-23 .. code-block:: Python detector = CoherentMode( mode_number="HG01", # Specifying LP01 mode sampling=500 * AU, # Number of sampling points NA=0.5 * AU, # Numerical Aperture gamma_offset=0 * degree, # Gamma offset phi_offset=40 * degree, # Phi offset in degrees ) .. rst-class:: sphx-glr-script-out .. code-block:: none WARNING:root:High values of NA: 0.5 do not comply with the paraxial approximation. Values under 0.3 are preferred. .. GENERATED FROM PYTHON SOURCE LINES 24-25 Plotting the detector .. GENERATED FROM PYTHON SOURCE LINES 25-26 .. code-block:: Python detector.plot() .. image-sg:: /gallery/single/detector/images/sphx_glr_HG01_001.png :alt: HG01 :srcset: /gallery/single/detector/images/sphx_glr_HG01_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.592 seconds) .. _sphx_glr_download_gallery_single_detector_HG01.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: HG01.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: HG01.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: HG01.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_