Utilities for TEM data analysis and simulation.
Project description
wsp_tools
Utilities for TEM data analysis and simulation.
Features:
- Single Image TIE
- Lorentz TEM simulations
- spatial modes
- a
matplotlib.pyplotwrapper - an implementation of the CIELAB colorspace
- a
scipy.constantswrapper that allows arbitrary units (i.e., using nanometers instead of meters)
Installation
Pip
As of version 1.3.1, wsp_tools is available on PyPi, and can be installed with pip:
python -m pip install wsp-tools
GitHub
wsp_tools can also be installed directly from GitHub via
pip install -e git+https://github.com/McMorranLab/wsp_tools#egg=wsp-tools
Installing in editable mode -e ensures that pip freeze records the install url, not just the version.
You can specify the commit or tag to install, via
pip install -e git+https://github.com/McMorranLab/wsp_tools@{commit id or tag number}#egg=wsp_tools
Documentation
As of version 1.3.1, documentation is available at https://mcmorranlab.github.io/wsp_tools/.
As of version 1.0.94, wsp_tools includes a helper function docs(outdir="."), which uses pdoc3 to auto-generate html documentation and save it to an outdir of your choice, thus avoiding the need to clone this repository just to see the documentation. For example:
import wsp_tools
wsp_tools.docs("~/Desktop") # generates docs in the folder ~/Desktop/wsp_tools
Tests
Tests are split into two subdirectories:
testsThese are typical unit tests, that assert that functions return the right shape, beam parameters return the right values, etc. Run withpytest.devtestsThese are tests of the actual functionality, that require a trained eye to evaluate. For example, a functiontest_bessel()will generate a bessel beam usingwsp_tools.bessel(), but rather than asserting a unit test, will just plot the bessel beam so the developer can manually assert whether it looks correct. Run as normal.pyscripts.
The rationale for devtests is that this package is math-heavy, so it's highly possible for the code to run fine, but be wrong. The easiest way to test for this is to check base cases where the developer knows what to look for.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wsp_tools-1.4.1.tar.gz.
File metadata
- Download URL: wsp_tools-1.4.1.tar.gz
- Upload date:
- Size: 33.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faf24fe6fd1fddef5b216190f50ef5031a1537114bfb79e1d8b78be42da1fb26
|
|
| MD5 |
c529f5a69b484e89b32b7426a47fe62a
|
|
| BLAKE2b-256 |
edd5ac32de67d1364fbc4a4c62665ee8f7d20bbe153110bdc3cfd6a0a1431a32
|
File details
Details for the file wsp_tools-1.4.1-py3-none-any.whl.
File metadata
- Download URL: wsp_tools-1.4.1-py3-none-any.whl
- Upload date:
- Size: 39.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
051b23f23bbd77d6f6d1879906ea7554a4ae34df2b494492000e63efbe0fd0b1
|
|
| MD5 |
9f103b2ef0bac66e430a8904eb9868b2
|
|
| BLAKE2b-256 |
0e61c415666abb11627ee2a603a9ecd35fd115c71633b9fd94ab6d6ec34ca49f
|