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

update documentation #838

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
25 changes: 16 additions & 9 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# -- Project information -----------------------------------------------------

project = "PHARE"
copyright = "2018-2023, Nicolas Aunai, Roch Smets, Philip Deegan"
copyright = "2018-2024, Nicolas Aunai, Roch Smets, Philip Deegan"
author = "Nicolas Aunai, Roch Smets, Philip Deegan"

# The short X.Y version
Expand All @@ -43,22 +43,28 @@
"sphinx.ext.autodoc",
"sphinx.ext.mathjax",
"sphinx.ext.githubpages",
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.autosectionlabel",
"sphinx_gallery.load_style",
"sphinx_codeautolink",
"sphinxcontrib.apidoc",
# "sphinxcontrib.apidoc",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torm or tokeep?

"nbsphinx",
"numpydoc",
# "numpydoc",
]
apidoc_module_dir = "../../pyphare"
apidoc_output_dir = "development"
apidoc_separate_modules = True
apidoc_module_first = True
# apidoc_module_dir = "../../pyphare"
# apidoc_output_dir = "development"
# apidoc_separate_modules = True
# apidoc_module_first = True

# autosummary_generate = False

autodoc_default_options = {
"members": True,
"private-members": False,
"special-members": False,
}

autosectionlabel_prefix_document = True
codeautolink_custom_blocks = {
Expand Down Expand Up @@ -104,7 +110,8 @@
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
# pygments_style = None
pygments_style = "sphinx"


# -- Options for HTML output -------------------------------------------------
Expand Down
20 changes: 0 additions & 20 deletions doc/source/development/tests.rst

This file was deleted.

11 changes: 2 additions & 9 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Using Adaptive Mesh Refinement, provided by the library SAMRAI, PHARE aims at
filling the gap between sub-ion scales and large "MHD" scales by increasing
the mesh resolution wherever the solution needs it.

Warning: This documentation is a work in progress. It is not complete and may contain errors.


.. raw:: html
Expand Down Expand Up @@ -76,9 +77,9 @@ the mesh resolution wherever the solution needs it.
:maxdepth: 1
:hidden:

usage/simulation_inputs
usage/run_from_python
usage/run_from_exe
usage/simulation_inputs
usage/examples


Expand All @@ -98,14 +99,6 @@ the mesh resolution wherever the solution needs it.



.. Development
.. -----------
.. toctree::
:caption: DEVELOPMENT
:maxdepth: 1
:hidden:

development/tests

.. Indices and tables
.. ------------------
Expand Down
8 changes: 0 additions & 8 deletions doc/source/modules.rst

This file was deleted.

87 changes: 83 additions & 4 deletions doc/source/pharesee/get_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,100 @@
Data analysis
=============

pharesee
--------

The data produced by phare is readable with the `pharesee` python package from
the `pyphare`. Make your `PYTHONPATH` includes the directory where `pyphare` is located.

.. code-block:: bash

export PYTHONPATH=$PYTHONPATH:/path/to/PHARE/pyphare


Then import the `pharesee` package should work:

.. code-block:: python

import pyphare.pharesee as pharesee



Reading the data
----------------

We will imagine a situation where you have run a simulation
for which `ElectromagDianostics` have been activated and you want to get the magnetic field. Assuming the data is in:

.. code-block:: bash

/data/scratch/phare_jobs/run001/


The first step to get the data is to create a `Run` object, that basically represents
your simulation and will let you interact with its data.

.. code-block:: python

from pyphare.pharesee.run import Run

path = "/data/scratch/phare_jobs/run001/"
run = Run(path)


Getting data is then done by calling methods of that `run` instance you just created.
Every data getters takes the same form:

.. code-block:: python

run.GetXXX(time)

where `XXX` is the name of a physical quantity available from `pharesee`,
and `time` is the time at which you want to get the data.

For example, to get the magnetic field at time 0.0:

.. code-block:: python

B = run.GetB(0.0)

Getting Data
============



Python Patch Hierarchy
======================
----------------------

Generalities
^^^^^^^^^^^^

The data read from a run most often takes the form of a `PatchHierarchy` instance.
This python object represents the hierarchy of levels of patches where the data lies.

.. code-block:: python

B = run.GetB(0.0) # B is a PatchHierarchy


See section :ref:
nicolasaunai marked this conversation as resolved.
Show resolved Hide resolved


Advanced usage
^^^^^^^^^^^^^



Using the finest field available
================================
--------------------------------




The Run methods
---------------

.. autoclass:: pyphare.pharesee.run.Run
:members:
:undoc-members:
:show-inheritance:


38 changes: 0 additions & 38 deletions doc/source/pyphare.core.rst

This file was deleted.

10 changes: 0 additions & 10 deletions doc/source/pyphare.cpp.rst

This file was deleted.

22 changes: 0 additions & 22 deletions doc/source/pyphare.data.rst

This file was deleted.

70 changes: 0 additions & 70 deletions doc/source/pyphare.pharein.rst

This file was deleted.

Loading
Loading