Skip to content

Commit e4c3311

Browse files
authored
Update to pty-chi 1.1 (#110)
- Update to pty-chi v1.1 api - Enable loading bad pixels masks from file - Add sphinx documentation - Add file readers for APS Polar (4-ID), Ptycho-SAXS (12-ID-E), and ISN (19-ID) instruments - Update file reader names to be more consistent - Add support for transposing diffraction patterns - Bundle xdrlib so MDA file readers work with python 3.13+
1 parent 2362eec commit e4c3311

File tree

102 files changed

+2532
-1036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2532
-1036
lines changed

README.rst

Lines changed: 16 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,51 @@
11
Ptychodus
22
=========
33

4-
`ptychodus`_ is a ptychography analysis application that supports multiple reconstruction libraries.
4+
`Ptychodus <https://github.com/AdvancedPhotonSource/ptychodus>`_
5+
is a ptychography data analysis application that reads instrument data,
6+
prepares the data for processing, and supports calling several reconstruction
7+
libraries for phase retrieval. Ptychodus can be used interactively or
8+
integrated into a data pipeline.
59

610

711
Standard Installation
812
---------------------
913

10-
1. Install `miniforge <https://github.com/conda-forge/miniforge>`_.
14+
To install ptychodus from PyPI with the most common optional dependencies:
1115

12-
2. Install ptychodus.
13-
14-
* To install `ptychodus` with the GUI and all optional packages:
15-
16-
.. code-block:: shell
17-
18-
$ conda create -c conda-forge -n ptychodus ptychodus-all
19-
20-
* To install `ptychodus` with the GUI and no optional packages:
21-
22-
.. code-block:: shell
23-
24-
$ conda create -c conda-forge -n ptychodus ptychodus
25-
26-
* To install `ptychodus` without the GUI or optional packages:
27-
28-
.. code-block:: shell
29-
30-
$ conda create -c conda-forge -n ptychodus ptychodus-core
31-
32-
3. Activate the `ptychodus` conda environment to run ptychodus.
33-
34-
.. code-block:: shell
35-
36-
$ conda activate ptychodus
37-
$ ptychodus -h
38-
39-
usage: ptychodus [-h] [-b {reconstruct,train}] [-f FILE_PREFIX] [-s SETTINGS_FILE] [-v] [-w OUTPUT_DIR]
40-
41-
ptychodus is a ptychography analysis application
16+
.. code-block:: shell
4217
43-
options:
44-
-h, --help show this help message and exit
45-
-b {reconstruct,train}, --batch {reconstruct,train}
46-
run action non-interactively
47-
-f FILE_PREFIX, --file-prefix FILE_PREFIX
48-
replace file path prefix in settings
49-
-s SETTINGS_FILE, --settings SETTINGS_FILE
50-
use settings from file
51-
-v, --version show program's version number and exit
52-
-w OUTPUT_DIR, --write OUTPUT_DIR
53-
stage reconstruction inputs to directory
18+
$ python -m pip install ptychodus[globus,gui,ptychi]
5419
55-
$ ptychodus
20+
Instructions for installing in containers and from conda-forge are provided in
21+
the ``docs`` directory.
5622

5723

5824
Developer Installation
5925
----------------------
6026

61-
* For a developer installation:
27+
- For a developer installation:
6228

6329
.. code-block:: shell
6430
6531
$ git clone https://github.com/AdvancedPhotonSource/ptychodus.git
66-
$ conda create -c conda-forge -n ptychodus --file ptychodus/requirements-dev.txt
32+
$ conda create -n ptychodus --file ptychodus/requirements-dev.txt
6733
$ conda activate ptychodus
6834
$ pip install -e ./ptychodus
6935
70-
* To install the `pty-chi`_ backend:
36+
- To install `pty-chi <https://github.com/AdvancedPhotonSource/pty-chi>`_
7137

7238
.. code-block:: shell
7339
7440
$ pip install ptychi
7541
76-
* To install the `PtychoNN`_ backend:
42+
- To install `PtychoNN <https://github.com/mcherukara/PtychoNN>`_
7743

7844
.. code-block:: shell
7945
80-
$ conda install -n ptychodus -c conda-forge ptychonn
46+
$ conda install -n ptychodus ptychonn
8147
82-
* Launch `ptychodus`:
48+
- Launch `ptychodus`:
8349

8450
.. code-block:: shell
8551
@@ -91,8 +57,3 @@ Reporting Bugs
9157
--------------
9258

9359
Open a bug at https://github.com/AdvancedPhotonSource/ptychodus/issues.
94-
95-
.. _`ptychodus`: https://github.com/AdvancedPhotonSource/ptychodus
96-
.. _`pty-chi`: https://github.com/AdvancedPhotonSource/pty-chi
97-
.. _`PtychoNN`: https://github.com/mcherukara/PtychoNN
98-
.. _`PvaPy`: https://github.com/epics-base/pvaPy

doc/api.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

doc/dist.rst

Lines changed: 0 additions & 36 deletions
This file was deleted.

doc/globus.rst

Lines changed: 0 additions & 52 deletions
This file was deleted.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

0 commit comments

Comments
 (0)