fakecbed 0.5.0__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fakecbed-0.5.0 → fakecbed-0.5.2}/.gitignore +2 -2
- fakecbed-0.5.2/.zenodo.json +38 -0
- fakecbed-0.5.2/CITATION.cff +26 -0
- fakecbed-0.5.2/PKG-INFO +177 -0
- fakecbed-0.5.2/README.md +137 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/INSTALL.rst +36 -19
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/build_docs.py +19 -7
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/conf.py +34 -13
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/index.rst +22 -5
- fakecbed-0.5.2/examples/basic_usage.ipynb +4817 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed/discretized.py +42 -28
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed/shapes.py +149 -74
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed/tds.py +6 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed/version.py +3 -3
- fakecbed-0.5.2/fakecbed.egg-info/PKG-INFO +177 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed.egg-info/SOURCES.txt +3 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed.egg-info/requires.txt +1 -2
- {fakecbed-0.5.0 → fakecbed-0.5.2}/pyproject.toml +1 -2
- fakecbed-0.5.2/run_tests.sh +34 -0
- fakecbed-0.5.0/PKG-INFO +0 -61
- fakecbed-0.5.0/README.md +0 -20
- fakecbed-0.5.0/examples/basic_usage.ipynb +0 -1871
- fakecbed-0.5.0/fakecbed.egg-info/PKG-INFO +0 -61
- {fakecbed-0.5.0 → fakecbed-0.5.2}/.coveragerc +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/.github/workflows/measure_code_coverage.yml +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/.github/workflows/publish_documentation_website.yml +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/.github/workflows/publish_release_to_pypi.yml +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/.github/workflows/test_library.yml +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/LICENSE +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/Makefile +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/_static/readthedocs_custom.css +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/_templates/custom_class_template.rst +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/_templates/custom_module_template.rst +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/_templates/versions.html +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/api.rst +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/examples.rst +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/license.rst +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/literature.rst +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/make.bat +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/docs/private_members_to_publish_to_docs.rst +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed/__init__.py +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed.egg-info/dependency_links.txt +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/fakecbed.egg-info/top_level.txt +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/setup.cfg +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/setup.py +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/tests/test_discretized.py +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/tests/test_shapes.py +0 -0
- {fakecbed-0.5.0 → fakecbed-0.5.2}/tox.ini +0 -0
|
@@ -13,7 +13,6 @@ pages/
|
|
|
13
13
|
.python-version
|
|
14
14
|
fakecbed/version.py
|
|
15
15
|
tests/coverage.json
|
|
16
|
-
run_tests.sh
|
|
17
16
|
|
|
18
17
|
# Ignore generated output coverage files.
|
|
19
18
|
tests/coverage*
|
|
@@ -22,8 +21,9 @@ tests/.coverage*
|
|
|
22
21
|
# Ignore .pyc files.
|
|
23
22
|
*.pyc
|
|
24
23
|
|
|
25
|
-
# Ignore JSON files.
|
|
24
|
+
# Ignore most JSON files.
|
|
26
25
|
*.json
|
|
26
|
+
!.zenodo.json
|
|
27
27
|
|
|
28
28
|
# Ignore backup files.
|
|
29
29
|
\#*#
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"creators": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Fitzpatrick, Matthew R. C.",
|
|
5
|
+
"affiliation": "University of Victoria",
|
|
6
|
+
"orcid": "0000-0001-5347-0629"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"contributors": [
|
|
10
|
+
{
|
|
11
|
+
"name": "Blackburn, Arthur",
|
|
12
|
+
"affiliation": "University of Victoria",
|
|
13
|
+
"type": "Supervisor",
|
|
14
|
+
"orcid": "0000-0001-6874-9729"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"description": "<p>FakeCBED is Python library for generating quickly images that imitate convergent beam electron diffraction patterns.</p><p>This work was part-funded by the Natural Sciences and Engineering Research Council of Canada (NSERC), from Collaborative Research and Development grant (CRDPJ 543431), partnering with Hitachi High-Tech Canada.</p>",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"pytorch",
|
|
20
|
+
"microscopy",
|
|
21
|
+
"diffraction",
|
|
22
|
+
"cbed",
|
|
23
|
+
"gpu"
|
|
24
|
+
],
|
|
25
|
+
"license": {
|
|
26
|
+
"id": "GPL-3.0"
|
|
27
|
+
},
|
|
28
|
+
"publication_date": "2026-01-18",
|
|
29
|
+
"title": "FakeCBED",
|
|
30
|
+
"version": "0.5.2",
|
|
31
|
+
"access_right": "open",
|
|
32
|
+
"upload_type": "software",
|
|
33
|
+
"language": "eng",
|
|
34
|
+
"communities": [
|
|
35
|
+
{"identifier": "tem"},
|
|
36
|
+
{"identifier": "4d-stem"}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: FakeCBED
|
|
3
|
+
message: >-
|
|
4
|
+
If you use this software, please cite it using the
|
|
5
|
+
metadata from this file.
|
|
6
|
+
type: software
|
|
7
|
+
authors:
|
|
8
|
+
- given-names: Matthew R. C.
|
|
9
|
+
family-names: Fitzpatrick
|
|
10
|
+
email: matthew.rc.fitzpatrick@gmail.com
|
|
11
|
+
affiliation: University of Victoria
|
|
12
|
+
orcid: 'https://orcid.org/0000-0001-5347-0629'
|
|
13
|
+
repository-code: 'https://github.com/mrfitzpa/fakecbed'
|
|
14
|
+
url: 'https://mrfitzpa.github.io/fakecbed/'
|
|
15
|
+
abstract: >-
|
|
16
|
+
FakeCBED is Python library for generating quickly images that imitate
|
|
17
|
+
convergent beam electron diffraction patterns.
|
|
18
|
+
keywords:
|
|
19
|
+
- pytorch
|
|
20
|
+
- microscopy
|
|
21
|
+
- diffraction
|
|
22
|
+
- cbed
|
|
23
|
+
- gpu
|
|
24
|
+
license: GPL-3.0
|
|
25
|
+
version: 0.5.2
|
|
26
|
+
date-released: '2026-01-18'
|
fakecbed-0.5.2/PKG-INFO
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fakecbed
|
|
3
|
+
Version: 0.5.2
|
|
4
|
+
Summary: A Python library for generating quickly images that imitate convergent beam electron diffraction patterns.
|
|
5
|
+
Author-email: Matthew Fitzpatrick <matthew.rc.fitzpatrick@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://mrfitzpa.github.io/fakecbed
|
|
7
|
+
Project-URL: Repository, https://github.com/mrfitzpa/fakecbed
|
|
8
|
+
Keywords: pytorch,microscopy,diffraction,cbed
|
|
9
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Classifier: Natural Language :: English
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: distoptica>=0.4.0
|
|
25
|
+
Requires-Dist: empix>=0.0.6
|
|
26
|
+
Provides-Extra: tests
|
|
27
|
+
Requires-Dist: pytest-cov; extra == "tests"
|
|
28
|
+
Provides-Extra: examples
|
|
29
|
+
Requires-Dist: jupyter; extra == "examples"
|
|
30
|
+
Requires-Dist: ipympl; extra == "examples"
|
|
31
|
+
Provides-Extra: docs
|
|
32
|
+
Requires-Dist: sphinx<7; extra == "docs"
|
|
33
|
+
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
34
|
+
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
|
|
35
|
+
Requires-Dist: numpydoc; extra == "docs"
|
|
36
|
+
Requires-Dist: docutils; extra == "docs"
|
|
37
|
+
Provides-Extra: all
|
|
38
|
+
Requires-Dist: fakecbed[docs,examples,tests]; extra == "all"
|
|
39
|
+
Dynamic: license-file
|
|
40
|
+
|
|
41
|
+
# Fake Convergence Beam Electron Diffraction (FakeCBED)
|
|
42
|
+
|
|
43
|
+
[](https://github.com/mrfitzpa/fakecbed/actions/workflows/test_library.yml)
|
|
44
|
+
[](https://github.com/mrfitzpa/fakecbed/actions/workflows/measure_code_coverage.yml)
|
|
45
|
+
[](https://mrfitzpa.github.io/fakecbed)
|
|
46
|
+
[](https://pypi.org/project/fakecbed)
|
|
47
|
+
[](https://anaconda.org/conda-forge/fakecbed)
|
|
48
|
+
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
49
|
+
|
|
50
|
+
`fakecbed` is a Python library for generating quickly images that imitate
|
|
51
|
+
convergent beam electron diffraction patterns.
|
|
52
|
+
|
|
53
|
+
Visit the `fakecbed` [website](https://mrfitzpa.github.io/fakecbed) for a web
|
|
54
|
+
version of the installation instructions, the reference guide, and the examples
|
|
55
|
+
archive.
|
|
56
|
+
|
|
57
|
+
The source code can be found in the [`fakecbed` GitHub
|
|
58
|
+
repository](https://github.com/mrfitzpa/fakecbed).
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Table of contents
|
|
63
|
+
|
|
64
|
+
- [Instructions for installing and uninstalling
|
|
65
|
+
`fakecbed`](#instructions-for-installing-and-uninstalling-fakecbed)
|
|
66
|
+
- [Installing `fakecbed`](#installing-fakecbed)
|
|
67
|
+
- [Installing `fakecbed` using `pip`](#installing-fakecbed-using-pip)
|
|
68
|
+
- [Installing `fakecbed` using
|
|
69
|
+
`conda`](#installing-fakecbed-using-conda)
|
|
70
|
+
- [Uninstalling `fakecbed`](#uninstalling-fakecbed)
|
|
71
|
+
- [Learning how to use `fakecbed`](#learning-how-to-use-fakecbed)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
## Instructions for installing and uninstalling `fakecbed`
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### Installing `fakecbed`
|
|
80
|
+
|
|
81
|
+
For all installation scenarios, first open up the appropriate command line
|
|
82
|
+
interface. On Unix-based systems, you could open e.g. a terminal. On Windows
|
|
83
|
+
systems you could open e.g. an Anaconda Prompt as an administrator.
|
|
84
|
+
|
|
85
|
+
Before installing `fakecbed`, it is recommended that users install `PyTorch` in
|
|
86
|
+
the same environment that they intend to install `fakecbed` according to the
|
|
87
|
+
instructions given [here](https://pytorch.org/get-started/locally/) for their
|
|
88
|
+
preferred PyTorch installation option.
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
#### Installing `fakecbed` using `pip`
|
|
93
|
+
|
|
94
|
+
Before installing `fakecbed`, make sure that you have activated the (virtual)
|
|
95
|
+
environment in which you intend to install said package. After which, simply run
|
|
96
|
+
the following command:
|
|
97
|
+
|
|
98
|
+
pip install fakecbed
|
|
99
|
+
|
|
100
|
+
The above command will install the latest stable version of `fakecbed`.
|
|
101
|
+
|
|
102
|
+
To install the latest development version from the main branch of the [fakecbed
|
|
103
|
+
GitHub repository](https://github.com/mrfitzpa/fakecbed), one must first clone
|
|
104
|
+
the repository by running the following command:
|
|
105
|
+
|
|
106
|
+
git clone https://github.com/mrfitzpa/fakecbed.git
|
|
107
|
+
|
|
108
|
+
Next, change into the root of the cloned repository, and then run the following
|
|
109
|
+
command:
|
|
110
|
+
|
|
111
|
+
pip install .
|
|
112
|
+
|
|
113
|
+
Note that you must include the period as well. The above command executes a
|
|
114
|
+
standard installation of `fakecbed`.
|
|
115
|
+
|
|
116
|
+
Optionally, for additional features in `fakecbed`, one can install additional
|
|
117
|
+
dependencies upon installing `fakecbed`. To install a subset of additional
|
|
118
|
+
dependencies (along with the standard installation), run the following command
|
|
119
|
+
from the root of the repository:
|
|
120
|
+
|
|
121
|
+
pip install .[<selector>]
|
|
122
|
+
|
|
123
|
+
where `<selector>` can be one of the following:
|
|
124
|
+
|
|
125
|
+
* `tests`: to install the dependencies necessary for running unit tests;
|
|
126
|
+
* `examples`: to install the dependencies necessary for executing files stored
|
|
127
|
+
in `<root>/examples`, where `<root>` is the root of the repository;
|
|
128
|
+
* `docs`: to install the dependencies necessary for documentation generation;
|
|
129
|
+
* `all`: to install all of the above optional dependencies.
|
|
130
|
+
|
|
131
|
+
Alternatively, one can run:
|
|
132
|
+
|
|
133
|
+
pip install fakecbed[<selector>]
|
|
134
|
+
|
|
135
|
+
elsewhere in order to install the latest stable version of `fakecbed`, along
|
|
136
|
+
with the subset of additional dependencies specified by `<selector>`.
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
#### Installing `fakecbed` using `conda`
|
|
141
|
+
|
|
142
|
+
Before proceeding, make sure that you have activated the (virtual) `conda`
|
|
143
|
+
environment in which you intend to install said package. For Windows systems,
|
|
144
|
+
users must install `PyTorch` separately prior to following the remaining
|
|
145
|
+
instructions below.
|
|
146
|
+
|
|
147
|
+
To install `fakecbed` using the `conda` package manager, run the following
|
|
148
|
+
command:
|
|
149
|
+
|
|
150
|
+
conda install -c conda-forge fakecbed
|
|
151
|
+
|
|
152
|
+
The above command will install the latest stable version of `fakecbed`.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
### Uninstalling `fakecbed`
|
|
157
|
+
|
|
158
|
+
If `fakecbed` was installed using `pip`, then to uninstall, run the following
|
|
159
|
+
command:
|
|
160
|
+
|
|
161
|
+
pip uninstall fakecbed
|
|
162
|
+
|
|
163
|
+
If `fakecbed` was installed using `conda`, then to uninstall, run the following
|
|
164
|
+
command:
|
|
165
|
+
|
|
166
|
+
conda remove fakecbed
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## Learning how to use `fakecbed`
|
|
171
|
+
|
|
172
|
+
For those new to the `fakecbed` library, it is recommended that they take a look
|
|
173
|
+
at the [Examples](https://mrfitzpa.github.io/fakecbed/examples.html) page, which
|
|
174
|
+
contain code examples that show how one can use the `fakecbed` library. While
|
|
175
|
+
going through the examples, readers can consult the [fakecbed reference
|
|
176
|
+
guide](https://mrfitzpa.github.io/fakecbed/_autosummary/fakecbed.html) to
|
|
177
|
+
understand what each line of code is doing.
|
fakecbed-0.5.2/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Fake Convergence Beam Electron Diffraction (FakeCBED)
|
|
2
|
+
|
|
3
|
+
[](https://github.com/mrfitzpa/fakecbed/actions/workflows/test_library.yml)
|
|
4
|
+
[](https://github.com/mrfitzpa/fakecbed/actions/workflows/measure_code_coverage.yml)
|
|
5
|
+
[](https://mrfitzpa.github.io/fakecbed)
|
|
6
|
+
[](https://pypi.org/project/fakecbed)
|
|
7
|
+
[](https://anaconda.org/conda-forge/fakecbed)
|
|
8
|
+
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
9
|
+
|
|
10
|
+
`fakecbed` is a Python library for generating quickly images that imitate
|
|
11
|
+
convergent beam electron diffraction patterns.
|
|
12
|
+
|
|
13
|
+
Visit the `fakecbed` [website](https://mrfitzpa.github.io/fakecbed) for a web
|
|
14
|
+
version of the installation instructions, the reference guide, and the examples
|
|
15
|
+
archive.
|
|
16
|
+
|
|
17
|
+
The source code can be found in the [`fakecbed` GitHub
|
|
18
|
+
repository](https://github.com/mrfitzpa/fakecbed).
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Table of contents
|
|
23
|
+
|
|
24
|
+
- [Instructions for installing and uninstalling
|
|
25
|
+
`fakecbed`](#instructions-for-installing-and-uninstalling-fakecbed)
|
|
26
|
+
- [Installing `fakecbed`](#installing-fakecbed)
|
|
27
|
+
- [Installing `fakecbed` using `pip`](#installing-fakecbed-using-pip)
|
|
28
|
+
- [Installing `fakecbed` using
|
|
29
|
+
`conda`](#installing-fakecbed-using-conda)
|
|
30
|
+
- [Uninstalling `fakecbed`](#uninstalling-fakecbed)
|
|
31
|
+
- [Learning how to use `fakecbed`](#learning-how-to-use-fakecbed)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Instructions for installing and uninstalling `fakecbed`
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Installing `fakecbed`
|
|
40
|
+
|
|
41
|
+
For all installation scenarios, first open up the appropriate command line
|
|
42
|
+
interface. On Unix-based systems, you could open e.g. a terminal. On Windows
|
|
43
|
+
systems you could open e.g. an Anaconda Prompt as an administrator.
|
|
44
|
+
|
|
45
|
+
Before installing `fakecbed`, it is recommended that users install `PyTorch` in
|
|
46
|
+
the same environment that they intend to install `fakecbed` according to the
|
|
47
|
+
instructions given [here](https://pytorch.org/get-started/locally/) for their
|
|
48
|
+
preferred PyTorch installation option.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
#### Installing `fakecbed` using `pip`
|
|
53
|
+
|
|
54
|
+
Before installing `fakecbed`, make sure that you have activated the (virtual)
|
|
55
|
+
environment in which you intend to install said package. After which, simply run
|
|
56
|
+
the following command:
|
|
57
|
+
|
|
58
|
+
pip install fakecbed
|
|
59
|
+
|
|
60
|
+
The above command will install the latest stable version of `fakecbed`.
|
|
61
|
+
|
|
62
|
+
To install the latest development version from the main branch of the [fakecbed
|
|
63
|
+
GitHub repository](https://github.com/mrfitzpa/fakecbed), one must first clone
|
|
64
|
+
the repository by running the following command:
|
|
65
|
+
|
|
66
|
+
git clone https://github.com/mrfitzpa/fakecbed.git
|
|
67
|
+
|
|
68
|
+
Next, change into the root of the cloned repository, and then run the following
|
|
69
|
+
command:
|
|
70
|
+
|
|
71
|
+
pip install .
|
|
72
|
+
|
|
73
|
+
Note that you must include the period as well. The above command executes a
|
|
74
|
+
standard installation of `fakecbed`.
|
|
75
|
+
|
|
76
|
+
Optionally, for additional features in `fakecbed`, one can install additional
|
|
77
|
+
dependencies upon installing `fakecbed`. To install a subset of additional
|
|
78
|
+
dependencies (along with the standard installation), run the following command
|
|
79
|
+
from the root of the repository:
|
|
80
|
+
|
|
81
|
+
pip install .[<selector>]
|
|
82
|
+
|
|
83
|
+
where `<selector>` can be one of the following:
|
|
84
|
+
|
|
85
|
+
* `tests`: to install the dependencies necessary for running unit tests;
|
|
86
|
+
* `examples`: to install the dependencies necessary for executing files stored
|
|
87
|
+
in `<root>/examples`, where `<root>` is the root of the repository;
|
|
88
|
+
* `docs`: to install the dependencies necessary for documentation generation;
|
|
89
|
+
* `all`: to install all of the above optional dependencies.
|
|
90
|
+
|
|
91
|
+
Alternatively, one can run:
|
|
92
|
+
|
|
93
|
+
pip install fakecbed[<selector>]
|
|
94
|
+
|
|
95
|
+
elsewhere in order to install the latest stable version of `fakecbed`, along
|
|
96
|
+
with the subset of additional dependencies specified by `<selector>`.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
#### Installing `fakecbed` using `conda`
|
|
101
|
+
|
|
102
|
+
Before proceeding, make sure that you have activated the (virtual) `conda`
|
|
103
|
+
environment in which you intend to install said package. For Windows systems,
|
|
104
|
+
users must install `PyTorch` separately prior to following the remaining
|
|
105
|
+
instructions below.
|
|
106
|
+
|
|
107
|
+
To install `fakecbed` using the `conda` package manager, run the following
|
|
108
|
+
command:
|
|
109
|
+
|
|
110
|
+
conda install -c conda-forge fakecbed
|
|
111
|
+
|
|
112
|
+
The above command will install the latest stable version of `fakecbed`.
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
### Uninstalling `fakecbed`
|
|
117
|
+
|
|
118
|
+
If `fakecbed` was installed using `pip`, then to uninstall, run the following
|
|
119
|
+
command:
|
|
120
|
+
|
|
121
|
+
pip uninstall fakecbed
|
|
122
|
+
|
|
123
|
+
If `fakecbed` was installed using `conda`, then to uninstall, run the following
|
|
124
|
+
command:
|
|
125
|
+
|
|
126
|
+
conda remove fakecbed
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## Learning how to use `fakecbed`
|
|
131
|
+
|
|
132
|
+
For those new to the `fakecbed` library, it is recommended that they take a look
|
|
133
|
+
at the [Examples](https://mrfitzpa.github.io/fakecbed/examples.html) page, which
|
|
134
|
+
contain code examples that show how one can use the `fakecbed` library. While
|
|
135
|
+
going through the examples, readers can consult the [fakecbed reference
|
|
136
|
+
guide](https://mrfitzpa.github.io/fakecbed/_autosummary/fakecbed.html) to
|
|
137
|
+
understand what each line of code is doing.
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
.. _installation_instructions_sec:
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Instructions for installing and uninstalling ``fakecbed``
|
|
4
|
+
=========================================================
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Installing ``fakecbed``
|
|
9
|
+
-----------------------
|
|
8
10
|
|
|
9
11
|
For all installation scenarios, first open up the appropriate command line
|
|
10
12
|
interface. On Unix-based systems, you would open a terminal. On Windows systems
|
|
@@ -15,11 +17,14 @@ in the same environment that they intend to install ``fakecbed`` according to
|
|
|
15
17
|
the instructions given `here <https://pytorch.org/get-started/locally/>`_ for
|
|
16
18
|
their preferred PyTorch installation option.
|
|
17
19
|
|
|
18
|
-
Installing fakecbed using pip
|
|
19
|
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
|
|
22
|
+
Installing ``fakecbed`` using ``pip``
|
|
23
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
24
|
+
|
|
25
|
+
Before installing ``fakecbed``, make sure that you have activated the (virtual)
|
|
26
|
+
environment in which you intend to install said package. After which, simply run
|
|
27
|
+
the following command::
|
|
23
28
|
|
|
24
29
|
pip install fakecbed
|
|
25
30
|
|
|
@@ -49,17 +54,27 @@ from the root of the repository::
|
|
|
49
54
|
where ``<selector>`` can be one of the following:
|
|
50
55
|
|
|
51
56
|
* ``tests``: to install the dependencies necessary for running unit tests;
|
|
52
|
-
* ``examples``: to install the dependencies necessary for
|
|
53
|
-
|
|
54
|
-
repository;
|
|
57
|
+
* ``examples``: to install the dependencies necessary for executing files stored
|
|
58
|
+
in ``<root>/examples``, where ``<root>`` is the root of the repository;
|
|
55
59
|
* ``docs``: to install the dependencies necessary for documentation generation;
|
|
56
60
|
* ``all``: to install all of the above optional dependencies.
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
Alternatively, one can run::
|
|
63
|
+
|
|
64
|
+
pip install fakecbed[<selector>]
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
elsewhere in order to install the latest stable version of ``fakecbed``, along
|
|
67
|
+
with the subset of additional dependencies specified by ``<selector>``.
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Installing ``fakecbed`` using ``conda``
|
|
72
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
73
|
+
|
|
74
|
+
Before proceeding, make sure that you have activated the (virtual) ``conda``
|
|
75
|
+
environment in which you intend to install said package. For Windows systems,
|
|
76
|
+
users must install ``PyTorch`` separately prior to following the remaining
|
|
77
|
+
instructions below.
|
|
63
78
|
|
|
64
79
|
To install ``fakecbed`` using the ``conda`` package manager, run the following
|
|
65
80
|
command::
|
|
@@ -68,15 +83,17 @@ command::
|
|
|
68
83
|
|
|
69
84
|
The above command will install the latest stable version of ``fakecbed``.
|
|
70
85
|
|
|
71
|
-
|
|
72
|
-
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
Uninstalling ``fakecbed``
|
|
89
|
+
-------------------------
|
|
73
90
|
|
|
74
91
|
If ``fakecbed`` was installed using ``pip``, then to uninstall, run the
|
|
75
|
-
following command
|
|
92
|
+
following command::
|
|
76
93
|
|
|
77
94
|
pip uninstall fakecbed
|
|
78
95
|
|
|
79
96
|
If ``fakecbed`` was installed using ``conda``, then to uninstall, run the
|
|
80
|
-
following command
|
|
97
|
+
following command::
|
|
81
98
|
|
|
82
99
|
conda remove fakecbed
|
|
@@ -98,16 +98,28 @@ _mvdir("./_build/html/", "./pages/")
|
|
|
98
98
|
|
|
99
99
|
cmd_output_as_bytes = subprocess.check_output("git tag", shell=True)
|
|
100
100
|
cmd_output = cmd_output_as_bytes.decode("utf-8")
|
|
101
|
-
|
|
101
|
+
tag_set = cmd_output.rstrip("\n").split("\n")
|
|
102
102
|
|
|
103
|
-
pattern = r"v[0-9]+\.[0
|
|
104
|
-
|
|
103
|
+
pattern = r"v[0-9]+\.[0-9]+\.[0-9]+"
|
|
104
|
+
release_tag_set = tuple(tag for tag in tag_set if re.fullmatch(pattern, tag))
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
version_subset = dict()
|
|
107
|
+
for tag in release_tag_set:
|
|
107
108
|
version = tag[1:]
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
major, minor, patch = [int(int_as_str) for int_as_str in version.split(".")]
|
|
110
|
+
version_subset.setdefault(major, dict())
|
|
111
|
+
version_subset[major].setdefault(minor, 0)
|
|
112
|
+
version_subset[major][minor] = max(version_subset[major][minor], patch)
|
|
113
|
+
|
|
114
|
+
for major in sorted(version_subset.keys()):
|
|
115
|
+
for minor in sorted(version_subset[major].keys()):
|
|
116
|
+
patch = version_subset[major][minor]
|
|
117
|
+
version = "{}.{}.{}".format(major, minor, patch)
|
|
118
|
+
tag = "v"+version
|
|
119
|
+
major_minor = "{}.{}".format(major, minor)
|
|
120
|
+
language = "en"
|
|
121
|
+
_build_doc(version, language, tag)
|
|
122
|
+
_mvdir("./_build/html/", "./pages/"+major_minor+"/"+language+"/")
|
|
111
123
|
|
|
112
124
|
subprocess.run("cd ..; pip install .; cd docs", shell=True)
|
|
113
125
|
_mvdir("./pages/", "../pages/")
|
|
@@ -172,33 +172,54 @@ build_all_docs = os.environ.get("build_all_docs", None)
|
|
|
172
172
|
pages_root = os.environ.get("pages_root", "")
|
|
173
173
|
|
|
174
174
|
if build_all_docs is not None:
|
|
175
|
-
current_language = os.environ.get("current_language")
|
|
175
|
+
current_language = os.environ.get("current_language")
|
|
176
176
|
current_version = os.environ.get("current_version")
|
|
177
177
|
|
|
178
|
+
major, minor, patch = ((None, None, None)
|
|
179
|
+
if (current_version == "latest")
|
|
180
|
+
else current_version.split("."))
|
|
181
|
+
current_major_minor = ("latest"
|
|
182
|
+
if (major is None)
|
|
183
|
+
else "{}.{}".format(major, minor))
|
|
184
|
+
|
|
178
185
|
html_context = {"current_language" : current_language,
|
|
179
186
|
"languages" : [],
|
|
180
|
-
"current_version" :
|
|
187
|
+
"current_version" : current_major_minor,
|
|
181
188
|
"versions" : []}
|
|
182
189
|
|
|
183
|
-
if
|
|
190
|
+
if current_version == "latest":
|
|
184
191
|
html_context["languages"].append(["en", pages_root])
|
|
185
192
|
|
|
186
|
-
if
|
|
193
|
+
if current_language == "en":
|
|
187
194
|
html_context["versions"].append(["latest", pages_root])
|
|
188
195
|
|
|
189
196
|
cmd_output_as_bytes = subprocess.check_output("git tag", shell=True)
|
|
190
197
|
cmd_output = cmd_output_as_bytes.decode("utf-8")
|
|
191
|
-
|
|
198
|
+
tag_set = cmd_output.rstrip("\n").split("\n")
|
|
192
199
|
|
|
193
|
-
pattern = r"v[0-9]+\.[0
|
|
194
|
-
|
|
200
|
+
pattern = r"v[0-9]+\.[0-9]+\.[0-9]+"
|
|
201
|
+
release_tag_set = tuple(tag
|
|
202
|
+
for tag
|
|
203
|
+
in tag_set
|
|
204
|
+
if re.fullmatch(pattern, tag))
|
|
195
205
|
|
|
196
|
-
|
|
206
|
+
version_subset = dict()
|
|
207
|
+
for tag in release_tag_set:
|
|
208
|
+
version = tag[1:]
|
|
209
|
+
major, minor, patch = [int(int_as_str)
|
|
210
|
+
for int_as_str
|
|
211
|
+
in version.split(".")]
|
|
212
|
+
version_subset.setdefault(major, dict())
|
|
213
|
+
version_subset[major].setdefault(minor, 0)
|
|
214
|
+
version_subset[major][minor] = max(version_subset[major][minor], patch)
|
|
215
|
+
|
|
216
|
+
if current_version != "latest":
|
|
197
217
|
language = "en"
|
|
198
|
-
path = pages_root+"/"+
|
|
218
|
+
path = pages_root+"/"+current_major_minor+"/"+language
|
|
199
219
|
html_context["languages"].append([language, path])
|
|
200
220
|
|
|
201
|
-
for
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
221
|
+
for major in sorted(version_subset.keys()):
|
|
222
|
+
for minor in sorted(version_subset[major].keys()):
|
|
223
|
+
major_minor = "{}.{}".format(major, minor)
|
|
224
|
+
path = pages_root+"/"+major_minor+"/"+current_language
|
|
225
|
+
html_context["versions"].append([major_minor, path])
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
.. meta::
|
|
2
|
+
:google-site-verification: kxE4d_wW0ikuxlKuVCgIxNZT81VDOxKWJ7R9mbTnvKA
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
Fake Convergence Beam Electron Diffraction (FakeCBED)
|
|
2
7
|
=====================================================
|
|
3
8
|
|
|
4
9
|
``fakecbed`` is a Python library for generating quickly images that imitate
|
|
5
10
|
convergent beam electron diffraction patterns.
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
The source code can be found in the `fakecbed GitHub repository
|
|
13
|
+
<https://github.com/mrfitzpa/fakecbed>`_.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Instructions for installing and uninstalling ``fakecbed``
|
|
18
|
+
---------------------------------------------------------
|
|
9
19
|
|
|
10
20
|
For instructions on installing the ``fakecbed`` library, see the
|
|
11
21
|
:ref:`installation_instructions_sec` page.
|
|
12
22
|
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
Learning how to use ``fakecbed``
|
|
26
|
+
--------------------------------
|
|
15
27
|
|
|
16
28
|
For those new to the ``fakecbed`` library, it is recommended that they take a
|
|
17
29
|
look at the :ref:`examples_sec` page, which contain code examples that show how
|
|
@@ -19,8 +31,11 @@ one can use the ``fakecbed`` library. While going through the examples, readers
|
|
|
19
31
|
can consult the :ref:`reference_guide_sec` to understand what each line of code
|
|
20
32
|
is doing.
|
|
21
33
|
|
|
34
|
+
|
|
35
|
+
|
|
22
36
|
Contents
|
|
23
37
|
--------
|
|
38
|
+
|
|
24
39
|
.. toctree::
|
|
25
40
|
:maxdepth: 6
|
|
26
41
|
:numbered:
|
|
@@ -32,6 +47,8 @@ Contents
|
|
|
32
47
|
literature
|
|
33
48
|
license
|
|
34
49
|
|
|
50
|
+
|
|
51
|
+
|
|
35
52
|
Indices and tables
|
|
36
53
|
==================
|
|
37
54
|
|