Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphinx: Fix Errors/Warnings #784

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/usage/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ This module provides elements for the accelerator lattice.
:param ds: Segment length in m.
:param k: focusing strength in m^(-2) (if unit = 0)
= (azimuthal magnetic field gradient in T/m) / (rigidity in T-m)
OR azimuthal magnetic field gradient in T/m (if unit = 1)
OR azimuthal magnetic field gradient in T/m (if unit = 1)
:param unit: specification of units for plasma lens focusing strength
:param dx: horizontal translation error in m
:param dy: vertical translation error in m
Expand Down Expand Up @@ -901,7 +901,7 @@ This module provides elements for the accelerator lattice.
:param ds: Segment length in m.
:param bscale: Scaling factor for on-axis magnetic field Bz in inverse meters (if unit = 0)
= (magnetic field Bz in T) / (rigidity in T-m)
OR Magnetic field Bz in T (SI units, if unit = 1)
OR Magnetic field Bz in T (SI units, if unit = 1)
:param cos_coefficients: array of ``float`` cosine coefficients in Fourier expansion of on-axis magnetic field Bz
(optional); default is a thin-shell model from `DOI:10.1016/J.NIMA.2022.166706 <https://doi.org/10.1016/j.nima.2022.166706>`__
:param sin_coefficients: array of ``float`` sine coefficients in Fourier expansion of on-axis magnetic field Bz
Expand Down
30 changes: 22 additions & 8 deletions examples/cfchannel/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,42 @@ The initial distribution used is a 6D waterbag.
The beam second moments should remain nearly unchanged, except for some small emittance growth due to nonlinear space charge.
This is tested using the second moments of the distribution.

In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`
In this test, the initial and final values of :math:`\sigma_x`, :math:`\sigma_y`, :math:`\sigma_t`, :math:`\epsilon_x`, :math:`\epsilon_y`, and :math:`\epsilon_t` must agree with nominal values.


Run
---

This example can be run as a Python script (``python3 run_cfchannel_10nC.py``) or as an app with an input file (``impactx input_cfchannel_10nC.in``).
This example can be run as a Python script (``python3 run_cfchannel_10nC_fft.py``) or as an app with an input file (``impactx input_cfchannel_10nC_fft.in``).
Each can also be prefixed with an `MPI executor <https://www.mpi-forum.org>`__, such as ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

We also provide the same example with the multi-grid (MLMG) Poisson solver.

.. tab-set::

.. tab-item:: Python Script
.. tab-item:: Python Script (FFT)

.. literalinclude:: run_cfchannel_10nC_fft.py
:language: python3
:caption: You can copy this file from ``examples/cfchannel/run_cfchannel_10nC_fft.py``.

.. tab-item:: Python Script (MLMG)

.. literalinclude:: run_cfchannel_10nC.py
.. literalinclude:: run_cfchannel_10nC_mlmg.py
:language: python3
:caption: You can copy this file from ``examples/cfchannel/run_cfchannel_10nC.py``.
:caption: You can copy this file from ``examples/cfchannel/run_cfchannel_10nC_mlmg.py``.

.. tab-item:: App Input File (FFT)

.. literalinclude:: input_cfchannel_10nC_fft.in
:language: ini
:caption: You can copy this file from ``examples/cfchannel/input_cfchannel_10nC_fft.in``.

.. tab-item:: App Input File
.. tab-item:: App Input File (MLMG)

.. literalinclude:: input_cfchannel_10nC.in
.. literalinclude:: input_cfchannel_10nC_mlmg.in
:language: ini
:caption: You can copy this file from ``examples/cfchannel/input_cfchannel_10nC.in``.
:caption: You can copy this file from ``examples/cfchannel/input_cfchannel_10nC_mlmg.in``.


Analyze
Expand Down
30 changes: 22 additions & 8 deletions examples/expanding_beam/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,38 @@ Run

This example can be run **either** as:

* **Python** script: ``python3 run_expanding.py`` or
* ImpactX **executable** using an input file: ``impactx input_expanding.in``
* **Python** script: ``python3 run_expanding_fft.py`` or
* ImpactX **executable** using an input file: ``impactx input_expanding_fft.in``

For `MPI-parallel <https://www.mpi-forum.org>`__ runs, prefix these lines with ``mpiexec -n 4 ...`` or ``srun -n 4 ...``, depending on the system.

We also provide the same example with the multi-grid (MLMG) Poisson solver.

.. tab-set::

.. tab-item:: Python: Script
.. tab-item:: Python: Script (FFT)

.. literalinclude:: run_expanding_fft.py
:language: python3
:caption: You can copy this file from ``examples/expanding/run_expanding_fft.py``.

.. tab-item:: Python: Script (MLMG)

.. literalinclude:: run_expanding.py
.. literalinclude:: run_expanding_mlmg.py
:language: python3
:caption: You can copy this file from ``examples/expanding/run_expanding.py``.
:caption: You can copy this file from ``examples/expanding/run_expanding_mlmg.py``.

.. tab-item:: Executable: Input File (FFT)

.. literalinclude:: input_expanding_fft.in
:language: ini
:caption: You can copy this file from ``examples/expanding/input_expanding_fft.in``.

.. tab-item:: Executable: Input File
.. tab-item:: Executable: Input File (MLMG)

.. literalinclude:: input_expanding.in
.. literalinclude:: input_expanding_mlmg.in
:language: ini
:caption: You can copy this file from ``examples/expanding/input_expanding.in``.
:caption: You can copy this file from ``examples/expanding/input_expanding_mlmg.in``.


Analyze
Expand Down
Loading