# Prismatique
[](https://github.com/mrfitzpa/prismatique/actions/workflows/test_library.yml)
[](https://github.com/mrfitzpa/prismatique/actions/workflows/measure_code_coverage.yml)
[](https://mrfitzpa.github.io/prismatique)
[](https://pypi.org/project/prismatique)
[](https://anaconda.org/conda-forge/prismatique)
[](https://www.gnu.org/licenses/gpl-3.0)
`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](https://prism-em.com).
Visit the `prismatique` [website](https://mrfitzpa.github.io/prismatique) 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](https://github.com/mrfitzpa/prismatique).
## Table of contents
- [Instructions for installing and uninstalling
`prismatique`](#instructions-for-installing-and-uninstalling-prismatique)
- [Installing `prismatique`](#installing-prismatique)
- [Installing `prismatique` using
`pip`](#installing-prismatique-using-pip)
- [Installing `prismatique` using
`conda`](#installing-prismatique-using-conda)
- [Uninstalling `prismatique`](#uninstalling-prismatique)
- [Learning how to use `prismatique`](#learning-how-to-use-prismatique)
## 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](https://docs.anaconda.com/anaconda/install/index.html); for installation
instructions for `miniconda3` click
[here](https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/macos.html).
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](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
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:
1. You are using a Linux or Windows machine that has NVIDIA GPUs.
2. 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](https://github.com/mrfitzpa/prismatique). 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](https://mrfitzpa.github.io/prismatique/examples.html)
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](https://mrfitzpa.github.io/prismatique/_autosummary/prismatique.html) to
understand what each line of code is doing.
Raw data
{
"_id": null,
"home_page": null,
"name": "prismatique",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "hyperspy, multislice, CBED, STEM, HRTEM, GPU, prismatic, pyprismatic, microscopy, electron beam, electron probe",
"author": null,
"author_email": "Matthew Fitzpatrick <matthew.rc.fitzpatrick@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/37/ab/e8b468f97a13d1ad062ca7c5cc54d25ec3524ceac5b6a62817d33d1d2833/prismatique-0.0.2.tar.gz",
"platform": null,
"description": "# Prismatique\n\n[](https://github.com/mrfitzpa/prismatique/actions/workflows/test_library.yml)\n[](https://github.com/mrfitzpa/prismatique/actions/workflows/measure_code_coverage.yml)\n[](https://mrfitzpa.github.io/prismatique)\n[](https://pypi.org/project/prismatique)\n[](https://anaconda.org/conda-forge/prismatique)\n[](https://www.gnu.org/licenses/gpl-3.0)\n\n`prismatique` is a Python library that functions essentially as a wrapper to the\nPython library `pyprismatic`, which itself is a thin wrapper to `prismatic`, a\nCUDA/C++ package for fast image simulations in scanning transmission electron\nmicroscopy and high-resolution transmission electron microscopy. You can find\nmore information about `pyprismatic` and `prismatic`\n[here](https://prism-em.com).\n\nVisit the `prismatique` [website](https://mrfitzpa.github.io/prismatique) for a\nweb version of the installation instructions, the reference guide, and the\nexamples archive.\n\nThe source code can be found in the [`prismatique` GitHub\nrepository](https://github.com/mrfitzpa/prismatique).\n\n\n\n## Table of contents\n\n- [Instructions for installing and uninstalling\n `prismatique`](#instructions-for-installing-and-uninstalling-prismatique)\n - [Installing `prismatique`](#installing-prismatique)\n - [Installing `prismatique` using\n `pip`](#installing-prismatique-using-pip)\n - [Installing `prismatique` using\n `conda`](#installing-prismatique-using-conda)\n - [Uninstalling `prismatique`](#uninstalling-prismatique)\n- [Learning how to use `prismatique`](#learning-how-to-use-prismatique)\n\n\n\n## Instructions for installing and uninstalling `prismatique`\n\n\n\n### Installing `prismatique`\n\nFor all installation scenarios, first open up the appropriate command line\ninterface. On Unix-based systems, you could open e.g. a terminal. On Windows\nsystems you could open e.g. an Anaconda Prompt as an administrator.\n\nGPU acceleration is available for `prismatique` installed on Linux and Windows\nmachines that have NVIDIA GPUs. You will need to make sure that you have a\nNVIDIA driver installed with CUDA version 10.2.89 or greater.\n\n\n\n#### Installing `prismatique` using `pip` and `conda` together\n\nThe easiest way to install `prismatique` involves using both the conda package\nmanager and `pip`. While it is possible to install `prismatique` without the use\nof the conda package manager, it is more difficult. Because of this, we discuss\nonly the simplest installation procedure below.\n\nOf course, to use the conda package manager, one must install either `anaconda3`\nor `miniconda3`. For installation instructions for `anaconda3` click\n[here](https://docs.anaconda.com/anaconda/install/index.html); for installation\ninstructions for `miniconda3` click\n[here](https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/macos.html).\n\nFirst, open up the appropriate command line interface. On Unix-based systems,\nyou would open a terminal. On Windows systems you would open an Anaconda Prompt\nas an administrator.\n\nNext, you can optionally update your conda package manager by issuing the\nfollowing command:\n\n conda update conda\n\nIt is recommended that you install `prismatique` and its dependencies in a\nvirtual environment: click\n[here](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)\nfor a discussion on the creation and management of conda virtual\nenvironments. The remaining instructions assumes that you activate the conda\n(virtual) environment in which you intend to install `prismatique` and its\ndependencies.\n\nThe first dependency that we need to install is `pyprismatic`. GPU acceleration\nis available for `pyprismatic` (and thus `prismatique`) if the following\nconditions are met:\n\n1. You are using a Linux or Windows machine that has NVIDIA GPUs.\n2. A NVIDIA driver is installed with CUDA version 10.2.89 or greater.\n\nIf the above conditions have been met, and you would like to be able to use GPUs\nwith `prismatique`, run the following command:\n\n conda install -c conda-forge pyprismatic=2.\\*=gpu\\* cudatoolkit==<X>.<Y>.\\*\n\nwhere `<X>` and `<Y>` are the major and minor versions of CUDA installed on your\nmachine, e.g. CUDA version 10.2.89 has a major version of `10`, and a minor\nversion of `2`. Users can omit `cudatoolkit==<X>.<Y>.\\*` if they do not require\na specific version of `cudatoolkit`, which should apply to most scenarios. For\nCPU support only, run the following command instead:\n\n conda install -c conda-forge pyprismatic=2.\\*=cpu\\*\n\nThe easiest way to install the remaining dependencies, along with `prismatique`\nis to use `pip` by running the following command:\n\n pip install prismatique\n\nThe above command will install the latest stable version of\n`prismatique`. Another option is to use `conda`:\n\n conda install -c conda-forge prismatique\n\nAs yet another option, you can install the latest development version of\n`prismatique` from the main branch of the [prismatique GitHub\nrepository](https://github.com/mrfitzpa/prismatique). To do so, one must first\nclone the repository by running the following command:\n\n git clone https://github.com/mrfitzpa/prismatique.git\n\nthen subsequently change into the root of the cloned repository, and then run\nthe following command:\n\n pip install .\n\nNote that you must include the period as well.\n\nOptionally, for additional features in `prismatique`, one can install additional\ndependencies upon installing `prismatique` via `pip`. To install a subset of\nadditional dependencies (along with the standard installation), run the\nfollowing command from the root of the repository:\n\n pip install .[<selector>]\n\nwhere `<selector>` can be one of the following:\n\n* `tests`: to install the dependencies necessary for running unit tests;\n* `examples`: to install the dependencies necessary for executing files stored\n in `<root>/examples`, where `<root>` is the root of the repository;\n* `docs`: to install the dependencies necessary for documentation generation;\n* `all`: to install all of the above optional dependencies.\n\nAlternatively, one can run:\n\n pip install prismatique[<selector>]\n\nelsewhere in order to install the latest stable version of `prismatique`, along\nwith the subset of additional dependencies specified by `<selector>`.\n\n\n\n### Uninstalling `prismatique`\n\nIf `prismatique` was installed using `pip`, then to uninstall, run the following\ncommand:\n\n pip uninstall prismatique\n\nIf `prismatique` was installed using `conda`, then to uninstall, run the\nfollowing command:\n\n conda remove prismatique\n\n\n\n## Learning how to use `prismatique`\n\nFor those new to the `prismatique` library, it is recommended that they take a\nlook at the [Examples](https://mrfitzpa.github.io/prismatique/examples.html)\npage, which contain code examples that show how one can use the `prismatique`\nlibrary. While going through the examples, readers can consult the [prismatique\nreference\nguide](https://mrfitzpa.github.io/prismatique/_autosummary/prismatique.html) to\nunderstand what each line of code is doing.\n",
"bugtrack_url": null,
"license": null,
"summary": "A wrapper to the Python library `pyprismatic`, which is a library for simulating CBED, STEM, and HRTEM experiments using Multislice algorithms.",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://mrfitzpa.github.io/prismatique",
"Repository": "https://github.com/mrfitzpa/prismatique"
},
"split_keywords": [
"hyperspy",
" multislice",
" cbed",
" stem",
" hrtem",
" gpu",
" prismatic",
" pyprismatic",
" microscopy",
" electron beam",
" electron probe"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1f23aab14d0214388783c1eca3dded404347e232a6632e23e9e9318bfb1b294a",
"md5": "e0f49ab9db836c488b337c9435f6ef1c",
"sha256": "eeae9609a2593ed609c1f2005602bb71716bbcaf95e8f18dbed0397962c4f94d"
},
"downloads": -1,
"filename": "prismatique-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e0f49ab9db836c488b337c9435f6ef1c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 181758,
"upload_time": "2025-10-27T07:19:31",
"upload_time_iso_8601": "2025-10-27T07:19:31.421282Z",
"url": "https://files.pythonhosted.org/packages/1f/23/aab14d0214388783c1eca3dded404347e232a6632e23e9e9318bfb1b294a/prismatique-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "37abe8b468f97a13d1ad062ca7c5cc54d25ec3524ceac5b6a62817d33d1d2833",
"md5": "fe09f9bce3375eb13dbdbe6e5922758b",
"sha256": "c15d1a77a5e8764bb0d5a65c25c797e564f7d1ba6b42d32b8cfa58c9178cfefb"
},
"downloads": -1,
"filename": "prismatique-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "fe09f9bce3375eb13dbdbe6e5922758b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 1497681,
"upload_time": "2025-10-27T07:19:32",
"upload_time_iso_8601": "2025-10-27T07:19:32.955295Z",
"url": "https://files.pythonhosted.org/packages/37/ab/e8b468f97a13d1ad062ca7c5cc54d25ec3524ceac5b6a62817d33d1d2833/prismatique-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-27 07:19:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mrfitzpa",
"github_project": "prismatique",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "prismatique"
}