Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
carnisj committed Jan 26, 2022
1 parent d3e1493 commit 83f2432
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 44 deletions.
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,22 @@ Download & Installation

BCDI is available from:

* Python Package Index: ``pip install bcdi``
* `Most updated version on GitHub <https://github.com/carnisj/bcdi>`_
* the Python Package Index: ``python -m pip install bcdi``
* or on `GitHub <https://github.com/carnisj/bcdi>`_, where you will find the latest
version:

- Upgrade your version with the latest changes from GitHub (main branch):
``pip install --upgrade git+https://github.com/carnisj/bcdi.git``
- Test a specific branch from GitHub:
``pip install --upgrade git+https://github.com/carnisj/bcdi.git@branch_name``
| - to install the main branch, type:
| ``python -m pip install git+https://github.com/carnisj/bcdi.git``
| - to install a specific branch, type:
| ``python -m pip install git+https://github.com/carnisj/bcdi.git@branch_name``
Add the flag ``--upgrade`` to the commands above in order to update an existing
installation.

Note that there are issues with installing scikit-image within an Anaconda environment.
In such situation, the workaround is to create instead a virtual environment using pip.

Please send feedback in `GitHub <https://github.com/carnisj/bcdi/issues>`_.
Please send feedback in `GitHub issues <https://github.com/carnisj/bcdi/issues>`_.

Documentation
=============
Expand Down
30 changes: 8 additions & 22 deletions doc/EXAMPLE_POSTPROCESSING.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Example: postprocessing
-----------------------

This example will guide you throught the post-processing of an experimental BCDI dataset
This example will guide you through the post-processing of an experimental BCDI dataset
measured at the European Synchrotron Radiation Facility, beamline ID01. Postprocessing
occurs after phase retrieval, and typically include the following steps: phase ramp
removal, refraction correction, interpolation of the object from the detector frame to
an orthonormal frame etc...
occurs after phase retrieval, and typically includes the following steps: interpolation
of the object from the detector frame to an orthonormal frame, refraction correction,
phase ramp and phase offset removal, displacement and strain calculation etc...

It is assumed that the phase retrieval of this dataset has been realized
(e.g. using PyNX), and that the data provided as input is in direct space. If it is
still in the detector frame, the first axis is expected to correspond to the rocking
dimension, the second axis corresponds to the detector vertical axis and the third axis
to the detector horizontal axis.
dimension, the second axis to the detector vertical axis and the third axis to the
detector horizontal axis.

The most usefull script is ``bcdi_strain.py``. It requires a YAML config
file, which for this example is ``bcdi/examples/S11_config_postprocessing.yml``.
Expand All @@ -20,7 +20,7 @@ output of the decomposition into orthogonal modes after phase retrieval with PyN
convenience, copy ``S11_modes.h5`` to the data folder "path_to/CXIDB-I182/CH4760/S11/".

In order to have it running correctly on your machine, you will have to modify the paths
corresponding to the following parameters::
for the following parameters::

root_folder: "path_to/CXIDB-I182/CH4760/"
save_dir: "path_to_saving_directory"
Expand All @@ -33,21 +33,7 @@ practice), run:

``python path_to/bcdi_strain.py --conf path_to/S11_config_postprocessing.yml``

If you installed the package, the scripts and configuration files will be located at the
following location (example with the ``bcdi`` package installed in a Python3.8 conda
virtual environment named ``myenv``):

- on Windows:

- scripts in ``path_to\anaconda3\envs\myenv\Scripts``
- config files in ``path_to\anaconda3\envs\myenv\Lib\site-packages\bcdi\examples``

- on Linux:

- scripts in ``/path_to/anaconda3/envs/myenv/bin``
- config files in ``/path_to/anaconda3/envs/myenv/lib/python3.8/site-packages/bcdi/examples``

After launching the script, a pop-up window opens, so that you can select the files to
After launching the script, a pop-up window opens, allowing you to select the files to
load. By default this window opens at the location defined by ``data_dir``, but you can
navigate to any location on your computer.

Expand Down
16 changes: 1 addition & 15 deletions doc/EXAMPLE_PREPROCESSING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The most usefull script is ``bcdi_preprocessing_BCDI.py``. It requires a YAML co
file, which for this example is ``bcdi/examples/S11_config_preprocessing.yml``.

In order to have it running correctly on your machine, you will have to modify the paths
corresponding to the following parameters::
for the following parameters::

root_folder: "path_to/CXIDB-I182/CH4760/"
save_dir: "path_to_saving_directory"
Expand All @@ -21,20 +21,6 @@ practice), run:

``python path_to/bcdi_preprocessing_BCDI.py --conf path_to/S11_config_preprocessing.yml``

If you installed the package, the scripts and configuration files will be located at the
following location (example with the ``bcdi`` package installed in a Python3.8 conda
virtual environment named ``myenv``):

- on Windows:

- scripts in ``path_to\anaconda3\envs\myenv\Scripts``
- config files in ``path_to\anaconda3\envs\myenv\Lib\site-packages\bcdi\examples``

- on Linux:

- scripts in ``/path_to/anaconda3/envs/myenv/bin``
- config files in ``/path_to/anaconda3/envs/myenv/lib/python3.8/site-packages/bcdi/examples``

The data will be loaded and a plot is opened. This allows you to check whether, e.g.,
the region of interest provided is correct. Click on the plot to resume the execution
of the script.
Expand Down
18 changes: 18 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@ Extract the files, you should get the following::
For the demonstration, we will use the scan ``S11`` from the experiment ``CH4760``.
The spec file for this scan is ``l5.spec``.

If you installed the package, the scripts and configuration files will be located at the
following location (example with the ``bcdi`` package installed in a Python3.8 conda
virtual environment named ``myenv``):

- on Windows:

| - scripts in:
| ``path_to\anaconda3\envs\myenv\Scripts``
| - config files in:
| ``path_to\anaconda3\envs\myenv\Lib\site-packages\bcdi\examples``
- on Linux:

| - scripts in:
| ``/path_to/anaconda3/envs/myenv/bin``
| - config files in:
| ``/path_to/anaconda3/envs/myenv/lib/python3.8/site-packages/bcdi/examples``
.. include:: EXAMPLE_PREPROCESSING.rst

.. include:: EXAMPLE_POSTPROCESSING.rst
Expand Down

0 comments on commit 83f2432

Please sign in to comment.