Skip to content

Commit

Permalink
Docs: fix reStructuredText syntax for figures
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Oct 12, 2024
1 parent f556879 commit 2b3cc17
Show file tree
Hide file tree
Showing 17 changed files with 55 additions and 36 deletions.
2 changes: 1 addition & 1 deletion Docs/source/dataanalysis/picviewer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PICViewer
=========

.. figure:: sample_image.png
:alt: picture
:alt: figure not found

PICViewer is a visualization GUI implemented on PyQt.
The toolkit provides various easy-to-use functions for data analysis of
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/dataanalysis/visit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Assuming that you ran a 2D simulation, here are instructions for making a simple
Your image should look similar to the one below

.. figure:: Ez.png
:alt: picture
:alt: figure not found


In 3D, you must apply the “Operators” -> “Slicing”
Expand Down
4 changes: 3 additions & 1 deletion Docs/source/dataanalysis/visualpic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ Example: ``vpic3d -s beam -rho -Ez diags/diag1/`` could be used to visualize the
Example: ``vpic3d -Ex diags/diag1/`` could be used to visualize the transverse focusing field :math:`E_x` in a plasma wake behind a laser pulse (linearly polarized in :math:`E_y`), see below:

.. figure:: https://user-images.githubusercontent.com/1353258/233236692-4d75b12f-de44-43dc-97bd-c96b04ee68ac.png
:alt: Example view of a 3D rendering with VisualPIC.
:alt: figure not found
:width: 100%

Example view of a 3D rendering with VisualPIC.

The **Python script** controlled rendering allows more flexible options, such as selecting and cutting views, rendering directly into an image file, looping for animations, etc.
As with matplotlib scripts, Python script scenes can also be used to open a GUI and then browse time series interactively.
The `VisualPIC examples <https://github.com/AngelFP/VisualPIC/tree/dev/examples>`__ provide showcases for scripting.
Expand Down
4 changes: 3 additions & 1 deletion Docs/source/dataanalysis/workflows/tunneling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ To close the connection down, do this:
* ``Ctrl+C`` the SSH tunnel in terminal B

.. figure:: https://user-images.githubusercontent.com/1353258/232120440-3965fa38-9ca6-4621-a100-2da74eb899cf.png
:alt: Example view of remote started Jupyter service, active SSH tunnel, and local browser connecting to the service.
:alt: figure not found
:width: 100%

Example view of remote started Jupyter service, active SSH tunnel, and local browser connecting to the service.
24 changes: 18 additions & 6 deletions Docs/source/developers/checksum.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,23 @@ Alternatively, the benchmarks can be reset using the output of the Azure continu
* On the Github page of the Pull Request, find (one of) the pipeline(s) failing due to benchmarks that need to be updated and click on "Details".

.. figure:: https://user-images.githubusercontent.com/49716072/135133589-1fd8a626-ff93-4b9e-983f-acee028e0e4e.png
:alt: Screen capture showing how to access Azure pipeline output on Github.
:alt: figure not found

Screen capture showing how to access Azure pipeline output on Github.

* Click on "View more details on Azure pipelines".

.. figure:: https://user-images.githubusercontent.com/49716072/135133596-8f73afa2-969e-49a4-b4a6-184a4f478a44.png
:alt: Screen capture showing how to access Azure pipeline output on Github.
:alt: figure not found

Screen capture showing how to access Azure pipeline output on Github.

* Click on "Build & test".

.. figure:: https://user-images.githubusercontent.com/49716072/135133607-87324124-6145-4589-9a92-dcc8ea9432e4.png
:alt: Screen capture showing how to access Azure pipeline output on Github.
:alt: figure not found

Screen capture showing how to access Azure pipeline output on Github.

From this output, there are two options to reset the benchmarks:

Expand All @@ -108,7 +114,9 @@ From this output, there are two options to reset the benchmarks:
For instance, if the failing test is ``LaserAcceleration_BTD``, this content can be pasted into the file ``Regression/Checksum/benchmarks_json/LaserAcceleration_BTD.json``.

.. figure:: https://user-images.githubusercontent.com/49716072/244415944-3199a933-990b-4bde-94b1-162b7e8e22be.png
:alt: Screen capture showing how to read new benchmark file from Azure pipeline output.
:alt: figure not found

Screen capture showing how to read new benchmark file from Azure pipeline output.

#. If there are many tests failing in a single Azure pipeline, it might become more convenient to update the benchmarks automatically.
WarpX provides a script for this, located in ``Tools/DevUtils/update_benchmarks_from_azure_output.py``.
Expand All @@ -117,12 +125,16 @@ From this output, there are two options to reset the benchmarks:
* From the Azure output, click on "View raw log".

.. figure:: https://user-images.githubusercontent.com/49716072/135133617-764b6daf-a8e4-4a50-afae-d4b3a7568b2f.png
:alt: Screen capture showing how to download raw Azure pipeline output.
:alt: figure not found

Screen capture showing how to download raw Azure pipeline output.

* This should lead to a page that looks like the image below. Save it as a text file on your local computer.

.. figure:: https://user-images.githubusercontent.com/49716072/135133624-310df207-5f87-4260-9917-26d5af665d60.png
:alt: Screen capture showing how to download raw Azure pipeline output.
:alt: figure not found

Screen capture showing how to download raw Azure pipeline output.

* On your local computer, go to the WarpX folder and cd to the ``Tools/DevUtils`` folder.

Expand Down
6 changes: 3 additions & 3 deletions Docs/source/theory/amr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Mesh refinement
.. _fig_ESAMR:

.. figure:: ICNSP_2011_Vay_fig1.png
:alt: Sketches of the implementation of mesh refinement in WarpX with the electrostatic (left) and electromagnetic (right) solvers. In both cases, the charge/current from particles are deposited at the finest levels first, then interpolated recursively to coarser levels. In the electrostatic case, the potential is calculated first at the coarsest level :math:`L_0`, the solution interpolated to the boundaries of the refined patch :math:`r` at the next level :math:`L_{1}` and the potential calculated at :math:`L_1`. The procedure is repeated iteratively up to the highest level. In the electromagnetic case, the fields are computed independently on each grid and patch without interpolation at boundaries. Patches are terminated by absorbing layers (PML) to prevent the reflection of electromagnetic waves. Additional coarse patch :math:`c` and fine grid :math:`a` are needed so that the full solution is obtained by substitution on :math:`a` as :math:`F_{n+1}(a)=F_{n+1}(r)+I[F_n( s )-F_{n+1}( c )]` where :math:`F` is the field, and :math:`I` is a coarse-to-fine interpolation operator. In both cases, the field solution at a given level :math:`L_n` is unaffected by the solution at higher levels :math:`L_{n+1}` and up, allowing for mitigation of some spurious effects (see text) by providing a transition zone via extension of the patches by a few cells beyond the desired refined area (red & orange rectangles) in which the field is interpolated onto particles from the coarser parent level only.
:alt: figure not found
:width: 95%

Sketches of the implementation of mesh refinement in WarpX with the electrostatic (left) and electromagnetic (right) solvers. In both cases, the charge/current from particles are deposited at the finest levels first, then interpolated recursively to coarser levels. In the electrostatic case, the potential is calculated first at the coarsest level :math:`L_0`, the solution interpolated to the boundaries of the refined patch :math:`r` at the next level :math:`L_{1}` and the potential calculated at :math:`L_1`. The procedure is repeated iteratively up to the highest level. In the electromagnetic case, the fields are computed independently on each grid and patch without interpolation at boundaries. Patches are terminated by absorbing layers (PML) to prevent the reflection of electromagnetic waves. Additional coarse patch :math:`c` and fine grid :math:`a` are needed so that the full solution is obtained by substitution on :math:`a` as :math:`F_{n+1}(a)=F_{n+1}(r)+I[F_n( s )-F_{n+1}( c )]` where :math:`F` is the field, and :math:`I` is a coarse-to-fine interpolation operator. In both cases, the field solution at a given level :math:`L_n` is unaffected by the solution at higher levels :math:`L_{n+1}` and up, allowing for mitigation of some spurious effects (see text) by providing a transition zone via extension of the patches by a few cells beyond the desired refined area (red & orange rectangles) in which the field is interpolated onto particles from the coarser parent level only.
Expand All @@ -25,7 +25,7 @@ A sketch of the implementation of mesh refinement in WarpX is given in :numref:`
.. _fig_ESselfforce:

.. figure:: ICNSP_2011_Vay_fig2.png
:alt: Position history of one charged particle attracted by its image induced by a nearby metallic (dirichlet) boundary. The particle is initialized at rest. Without refinement patch (reference case), the particle is accelerated by its image, is reflected specularly at the wall, then decelerates until it reaches its initial position at rest. If the particle is initialized inside a refinement patch, the particle is initially accelerated toward the wall but is spuriously reflected before it reaches the boundary of the patch whether using the method implemented in WarpX or the MC method. Providing a surrounding transition region 2 or 4 cells wide in which the potential is interpolated from the parent coarse solution reduces significantly the effect of the spurious self-force.
:alt: figure not found
:width: 95%

Position history of one charged particle attracted by its image induced by a nearby metallic (dirichlet) boundary. The particle is initialized at rest. Without refinement patch (reference case), the particle is accelerated by its image, is reflected specularly at the wall, then decelerates until it reaches its initial position at rest. If the particle is initialized inside a refinement patch, the particle is initially accelerated toward the wall but is spuriously reflected before it reaches the boundary of the patch whether using the method implemented in WarpX or the MC method. Providing a surrounding transition region 2 or 4 cells wide in which the potential is interpolated from the parent coarse solution reduces significantly the effect of the spurious self-force.
Expand All @@ -35,7 +35,7 @@ The presence of the self-force is illustrated on a simple test case that was int
.. _fig_ESselfforcemap:

.. figure:: ICNSP_2011_Vay_fig3.png
:alt: (left) Maps of the magnitude of the spurious self-force :math:`\epsilon` in arbitrary units within one quarter of the refined patch, defined as :math:`\epsilon=\sqrt{(E_x-E_x^{ref})^2+(E_y-E_y^{ref})^2}`, where :math:`E_x` and :math:`E_y` are the electric field components within the patch experienced by one particle at a given location and :math:`E_x^{ref}` and :math:`E_y^{ref}` are the electric field from a reference solution. The map is given for the WarpX and the MC mesh refinement algorithms and for linear and quadratic interpolation at the patch refinement boundary. (right) Lineouts of the maximum (taken over neighboring cells) of the spurious self-force. Close to the interface boundary (x=0), the spurious self-force decreases at a rate close to one order of magnitude per cell (red line), then at about one order of magnitude per six cells (green line).
:alt: figure not found
:width: 95%

(left) Maps of the magnitude of the spurious self-force :math:`\epsilon` in arbitrary units within one quarter of the refined patch, defined as :math:`\epsilon=\sqrt{(E_x-E_x^{ref})^2+(E_y-E_y^{ref})^2}`, where :math:`E_x` and :math:`E_y` are the electric field components within the patch experienced by one particle at a given location and :math:`E_x^{ref}` and :math:`E_y^{ref}` are the electric field from a reference solution. The map is given for the WarpX and the MC mesh refinement algorithms and for linear and quadratic interpolation at the patch refinement boundary. (right) Lineouts of the maximum (taken over neighboring cells) of the spurious self-force. Close to the interface boundary (x=0), the spurious self-force decreases at a rate close to one order of magnitude per cell (red line), then at about one order of magnitude per six cells (green line).
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/theory/boosted_frame.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The simulations of plasma accelerators from first principles are extremely compu
.. _fig_Boosted_frame:

.. figure:: Boosted_frame.png
:alt: [fig:Boosted-frame] A first principle simulation of a short driver beam (laser or charged particles) propagating through a plasma that is orders of magnitude longer necessitates a very large number of time steps. Recasting the simulation in a frame of reference that is moving close to the speed of light in the direction of the driver beam leads to simulating a driver beam that appears longer propagating through a plasma that appears shorter than in the laboratory. Thus, this relativistic transformation of space and time reduces the disparity of scales, and thereby the number of time steps to complete the simulation, by orders of magnitude.
:alt: figure not found

A first principle simulation of a short driver beam (laser or charged particles) propagating through a plasma that is orders of magnitude longer necessitates a very large number of time steps. Recasting the simulation in a frame of reference that is moving close to the speed of light in the direction of the driver beam leads to simulating a driver beam that appears longer propagating through a plasma that appears shorter than in the laboratory. Thus, this relativistic transformation of space and time reduces the disparity of scales, and thereby the number of time steps to complete the simulation, by orders of magnitude.

Expand Down
2 changes: 1 addition & 1 deletion Docs/source/theory/boosted_frame/input_output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Inputs and outputs in a boosted frame simulation
.. _fig_inputoutput:

.. figure:: Input_output.png
:alt: (top) Snapshot of a particle beam showing “frozen" (grey spheres) and “active" (colored spheres) macroparticles traversing the injection plane (red rectangle). (bottom) Snapshot of the beam macroparticles (colored spheres) passing through the background of electrons (dark brown streamlines) and the diagnostic stations (red rectangles). The electrons, the injection plane and the diagnostic stations are fixed in the laboratory plane, and are thus counter-propagating to the beam in a boosted frame.
:alt: figure not found
:width: 100%

(top) Snapshot of a particle beam showing “frozen" (grey spheres) and “active" (colored spheres) macroparticles traversing the injection plane (red rectangle). (bottom) Snapshot of the beam macroparticles (colored spheres) passing through the background of electrons (dark brown streamlines) and the diagnostic stations (red rectangles). The electrons, the injection plane and the diagnostic stations are fixed in the laboratory plane, and are thus counter-propagating to the beam in a boosted frame.
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/theory/boundary_conditions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ the right boundary is reflecting.
.. _fig_PEC_boundary_deposition:

.. figure:: https://user-images.githubusercontent.com/40245517/221491318-b0a2bcbc-b04f-4b8c-8ec5-e9c92e55ee53.png
:alt: Plot of PEC boundary current deposition showing current vs position along the ``x``-axis.
:alt: figure not found
:width: 100%

PEC boundary current deposition along the ``x``-axis. The left boundary is absorbing while the right boundary is reflecting.
Expand Down
4 changes: 2 additions & 2 deletions Docs/source/theory/cold_fluid_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Implementation details
.. _fig_fluid_loop:

.. figure:: https://github.com/ECP-WarpX/WarpX/assets/69021085/dcbcc0e4-7899-43e4-b580-f57eb359b457
:alt: Figure showing fluid Loop embedded within the overall PIC loop.
:alt: figure not found

Fluid Loop embedded within the overall PIC loop.
Fluid loop embedded within the overall PIC loop.

The fluid timeloop is embedded inside the standard PIC timeloop and consists of
the following steps: 1. Higuera and Cary push of the momentum 2. Non-inertial (momentum source)
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/theory/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Introduction
============

.. figure:: Plasma_acceleration_sim.png
:alt: Plasma laser-driven (top) and charged-particles-driven (bottom) acceleration (rendering from 3-D Particle-In-Cell simulations). A laser beam (red and blue disks in top picture) or a charged particle beam (red dots in bottom picture) propagating (from left to right) through an under-dense plasma (not represented) displaces electrons, creating a plasma wakefield that supports very high electric fields (pale blue and yellow). These electric fields, which can be orders of magnitude larger than with conventional techniques, can be used to accelerate a short charged particle beam (white) to high-energy over a very short distance.
:alt: figure not found

Plasma laser-driven (top) and charged-particles-driven (bottom) acceleration (rendering from 3-D Particle-In-Cell simulations). A laser beam (red and blue disks in top picture) or a charged particle beam (red dots in bottom picture) propagating (from left to right) through an under-dense plasma (not represented) displaces electrons, creating a plasma wakefield that supports very high electric fields (pale blue and yellow). These electric fields, which can be orders of magnitude larger than with conventional techniques, can be used to accelerate a short charged particle beam (white) to high-energy over a very short distance.

Expand Down
4 changes: 3 additions & 1 deletion Docs/source/theory/multiphysics/collisions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ See for example :cite:t:`b-Lim2007` for a derivation. The result is that given a
The impact of incorporating relativistic effects in the MCC routine can be seen in the plots below where high energy collisions are considered with both a classical and relativistic implementation of MCC. It is observed that the classical version of MCC reproduces the classical limit of the above equation but especially for ions, this result differs substantially from the fully relativistic result.

.. figure:: https://user-images.githubusercontent.com/40245517/170900079-74e505a5-2790-44f5-ac84-5847eda954e6.png
:alt: Classical v relativistic MCC
:alt: figure not found
:width: 96%

Classical vs relativistic MCC.

.. bibliography::
:keyprefix: b-
Loading

0 comments on commit 2b3cc17

Please sign in to comment.