Skip to content

Commit

Permalink
Add demo (#15)
Browse files Browse the repository at this point in the history
* adding demo; update readme with typical installation time

* update demo briefly on how to run on own data; update readme for system requrements and system versions

* fix links

* Fine-tune notebook and add to docs

* Embed images

* Tweak styling

* Fix formatting and typos

Co-authored-by: BinWang <[email protected]>
  • Loading branch information
stefsmeets and asdfdsa authored May 9, 2022
1 parent 2fd52d1 commit a2c5344
Show file tree
Hide file tree
Showing 9 changed files with 1,048 additions and 10 deletions.
31 changes: 27 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,37 @@
*.bpc
*.c
*.dacs
*.egg-info
*.log
*.pptx
*.prefs
*.pyc
*.pyd
*.txt
*.zip
.coverage
.db

*.py[cod]
*.egg-info
*.eggs
.ipynb_checkpoints
*.vtk

build
dist
.cache
__pycache__

htmlcov
.coverage
coverage.xml
.pytest_cache

docs/_build
docs/apidocs
playground/

# ide
.idea
.eclipse
.vscode

# Mac
.DS_Store
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

Collection of tools for automated processing and clustering of single-crystal electron diffraction data.

Install using `pip install edtools`.
Install using `pip install edtools`. Installation should take less than 20 seconds on a normal desktop.

Find the latest [releases](https://github.com/instamatic-dev/edtools/releases) for the versions that have been tested on.

[The source for this project is available here][src].

Expand All @@ -32,7 +34,7 @@ Looks files matching `CORRECT.LP` in all subdirectories and extracts unit cell/i

### find_cell.py

This program a cells.yaml file and shows histogram plots with the unit cell parameters. This program mimicks `CELLPARM` (http://xds.mpimf-heidelberg.mpg.de/html_doc/cellparm_program.html) and calculates the weighted mean lattice parameters, where the weight is typically the number of observed reflections (defaults to 1.0). For each lattice parameter, the mean is calculated in a given range (default range = median+-2). The range can be changed by dragging the cursor on the histogram plots.
This program a cells.yaml file and shows histogram plots with the unit cell parameters. This program mimicks [`CELLPARM`](http://xds.mpimf-heidelberg.mpg.de/html_doc/cellparm_program.html) and calculates the weighted mean lattice parameters, where the weight is typically the number of observed reflections (defaults to 1.0). For each lattice parameter, the mean is calculated in a given range (default range = median+-2). The range can be changed by dragging the cursor on the histogram plots.

Alternatively, the unit cells can be clustered by giving the `--cluster` command, in which a dendrogram is shown. The cluster cutoff can be selected by clicking in the dendrogram. The clusters will be written to `cells_cluster_#.yaml`.

Expand Down Expand Up @@ -109,13 +111,19 @@ Usage:
edtools.find_rotation_axis [XDS.INP]
```

## OS Requirement

The package has been mainly developed and tested under windows 10.

## Requirements
## Software Requirements

- Python3.6 including `numpy`, `scipy`, `matplotlib`, and `pandas` libraries
- Python 3.6+ including `numpy`, `scipy`, `matplotlib`, and `pandas` libraries
- `sginfo` or `cctbx.python` must be available on the system path for `edtools.make_shelx`
- (Windows 10) Access to [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)
- (Windows 10) XDS and related tools must be available under WSL
- (Windows 10 or newer) Access to [WSL](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)
- (Windows 10 or newer) XDS and related tools must be available under WSL

## Package dependencies

Check [pyproject.toml](pyproject.toml) for the full dependency list and versions.

[src]: https://github.com/instamatic-dev/edtools
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def setup(app):
# 'nbsphinx_link',
# 'sphinx.ext.todo',
# 'sphinx.ext.viewcode',
'nbsphinx',
'autodocsumm',
]

Expand Down
995 changes: 995 additions & 0 deletions docs/examples/edtools_demo.ipynb

Large diffs are not rendered by default.

Binary file added docs/examples/find_cell_step3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/find_cell_step5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/examples/intensity_cluster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ API Reference
edtools


Examples
========
.. toctree::
:maxdepth: 1
:caption: Examples
:glob:

examples/*


Links
=====
.. toctree::
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sphinx
sphinx_rtd_theme
nbsphinx
readthedocs-sphinx-search
autodocsumm
lmfit
Expand Down

0 comments on commit a2c5344

Please sign in to comment.