A wrapper to the Python library `pyprismatic`, which is a library for simulating CBED, STEM, and HRTEM experiments using Multislice algorithms.
Project description
Prismatique
prismatique is a Python library that functions essentially as a wrapper to the
Python library pyprismatic, which itself is a thin wrapper to prismatic, a
CUDA/C++ package for fast image simulations in scanning transmission electron
microscopy and high-resolution transmission electron microscopy. You can find
more information about pyprismatic and prismatic
here.
Visit the prismatique website for a
web version of the installation instructions, the reference guide, and the
examples archive.
The source code can be found in the prismatique GitHub
repository.
Table of contents
Instructions for installing and uninstalling prismatique
Installing prismatique
For all installation scenarios, first open up the appropriate command line interface. On Unix-based systems, you could open e.g. a terminal. On Windows systems you could open e.g. an Anaconda Prompt as an administrator.
GPU acceleration is available for prismatique installed on Linux and Windows
machines that have NVIDIA GPUs. You will need to make sure that you have a
NVIDIA driver installed with CUDA version 10.2.89 or greater.
Installing prismatique using pip and conda together
The easiest way to install prismatique involves using both the conda package
manager and pip. While it is possible to install prismatique without the use
of the conda package manager, it is more difficult. Because of this, we discuss
only the simplest installation procedure below.
Of course, to use the conda package manager, one must install either anaconda3
or miniconda3. For installation instructions for anaconda3 click
here; for installation
instructions for miniconda3 click
here.
First, open up the appropriate command line interface. On Unix-based systems, you would open a terminal. On Windows systems you would open an Anaconda Prompt as an administrator.
Next, you can optionally update your conda package manager by issuing the following command:
conda update conda
It is recommended that you install prismatique and its dependencies in a
virtual environment: click
here
for a discussion on the creation and management of conda virtual
environments. The remaining instructions assumes that you activate the conda
(virtual) environment in which you intend to install prismatique and its
dependencies.
The first dependency that we need to install is pyprismatic. GPU acceleration
is available for pyprismatic (and thus prismatique) if the following
conditions are met:
- You are using a Linux or Windows machine that has NVIDIA GPUs.
- A NVIDIA driver is installed with CUDA version 10.2.89 or greater.
If the above conditions have been met, and you would like to be able to use GPUs
with prismatique, run the following command:
conda install -c conda-forge pyprismatic=2.\*=gpu\* cudatoolkit==<X>.<Y>.\*
where <X> and <Y> are the major and minor versions of CUDA installed on your
machine, e.g. CUDA version 10.2.89 has a major version of 10, and a minor
version of 2. Users can omit cudatoolkit==<X>.<Y>.\* if they do not require
a specific version of cudatoolkit, which should apply to most scenarios. For
CPU support only, run the following command instead:
conda install -c conda-forge pyprismatic=2.\*=cpu\*
The easiest way to install the remaining dependencies, along with prismatique
is to use pip by running the following command:
pip install prismatique
The above command will install the latest stable version of
prismatique. Another option is to use conda:
conda install -c conda-forge prismatique
As yet another option, you can install the latest development version of
prismatique from the main branch of the prismatique GitHub
repository. To do so, one must first
clone the repository by running the following command:
git clone https://github.com/mrfitzpa/prismatique.git
then subsequently change into the root of the cloned repository, and then run the following command:
pip install .
Note that you must include the period as well.
Optionally, for additional features in prismatique, one can install additional
dependencies upon installing prismatique via pip. To install a subset of
additional dependencies (along with the standard installation), run the
following command from the root of the repository:
pip install .[<selector>]
where <selector> can be one of the following:
tests: to install the dependencies necessary for running unit tests;examples: to install the dependencies necessary for executing files stored in<root>/examples, where<root>is the root of the repository;docs: to install the dependencies necessary for documentation generation;all: to install all of the above optional dependencies.
Alternatively, one can run:
pip install prismatique[<selector>]
elsewhere in order to install the latest stable version of prismatique, along
with the subset of additional dependencies specified by <selector>.
Uninstalling prismatique
If prismatique was installed using pip, then to uninstall, run the following
command:
pip uninstall prismatique
If prismatique was installed using conda, then to uninstall, run the
following command:
conda remove prismatique
Learning how to use prismatique
For those new to the prismatique library, it is recommended that they take a
look at the Examples
page, which contain code examples that show how one can use the prismatique
library. While going through the examples, readers can consult the prismatique
reference
guide to
understand what each line of code is doing.
Project details
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 prismatique-0.0.4.tar.gz.
File metadata
- Download URL: prismatique-0.0.4.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff3f303095eb2b703d5bd18ee599cba112fb085cd37f78c8dd0290c93cabf543
|
|
| MD5 |
9cc091f45d7016aae1e09b36593e738c
|
|
| BLAKE2b-256 |
c049faec73bdaf60ce4e9ee63ef3cb52ba3abbd15d02fd6987710b5ee685105b
|
Provenance
The following attestation bundles were made for prismatique-0.0.4.tar.gz:
Publisher:
publish_release_to_pypi.yml on mrfitzpa/prismatique
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prismatique-0.0.4.tar.gz -
Subject digest:
ff3f303095eb2b703d5bd18ee599cba112fb085cd37f78c8dd0290c93cabf543 - Sigstore transparency entry: 834315174
- Sigstore integration time:
-
Permalink:
mrfitzpa/prismatique@fb217b3ce9033a8607c5f7ab4b2ae2b4bf518e9d -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/mrfitzpa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_release_to_pypi.yml@fb217b3ce9033a8607c5f7ab4b2ae2b4bf518e9d -
Trigger Event:
release
-
Statement type:
File details
Details for the file prismatique-0.0.4-py3-none-any.whl.
File metadata
- Download URL: prismatique-0.0.4-py3-none-any.whl
- Upload date:
- Size: 181.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a20ef8beeb619659cfa67696d93137a2f821d49f939cfee9f7d30294164b8aab
|
|
| MD5 |
225c5e4ec77234bf12bf7023e3f4dc15
|
|
| BLAKE2b-256 |
d0de46a26e52a74e743197ecb6d199144276eb63c1b5645c6186b339bce7ea85
|
Provenance
The following attestation bundles were made for prismatique-0.0.4-py3-none-any.whl:
Publisher:
publish_release_to_pypi.yml on mrfitzpa/prismatique
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prismatique-0.0.4-py3-none-any.whl -
Subject digest:
a20ef8beeb619659cfa67696d93137a2f821d49f939cfee9f7d30294164b8aab - Sigstore transparency entry: 834315175
- Sigstore integration time:
-
Permalink:
mrfitzpa/prismatique@fb217b3ce9033a8607c5f7ab4b2ae2b4bf518e9d -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/mrfitzpa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_release_to_pypi.yml@fb217b3ce9033a8607c5f7ab4b2ae2b4bf518e9d -
Trigger Event:
release
-
Statement type: