fakecbed 0.3.3__tar.gz → 0.3.5__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.3.3 → fakecbed-0.3.5}/PKG-INFO +1 -1
- {fakecbed-0.3.3 → fakecbed-0.3.5}/examples/basic_usage.ipynb +1 -1
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed/discretized.py +13 -6
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed/version.py +2 -2
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed.egg-info/PKG-INFO +1 -1
- {fakecbed-0.3.3 → fakecbed-0.3.5}/tests/test_discretized.py +18 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/.coveragerc +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/.github/workflows/measure_code_coverage.yml +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/.github/workflows/publish_documentation_website.yml +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/.github/workflows/publish_release_to_pypi.yml +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/.github/workflows/test_library.yml +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/.gitignore +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/LICENSE +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/README.md +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/INSTALL.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/Makefile +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/_static/readthedocs_custom.css +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/_templates/custom_class_template.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/_templates/custom_module_template.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/_templates/versions.html +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/api.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/build_docs.py +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/conf.py +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/examples.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/index.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/license.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/literature.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/make.bat +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/docs/private_members_to_publish_to_docs.rst +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed/__init__.py +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed/shapes.py +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed/tds.py +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed.egg-info/SOURCES.txt +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed.egg-info/dependency_links.txt +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed.egg-info/requires.txt +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/fakecbed.egg-info/top_level.txt +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/pyproject.toml +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/setup.cfg +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/setup.py +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/tests/test_shapes.py +0 -0
- {fakecbed-0.3.3 → fakecbed-0.3.5}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fakecbed
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: A Python library for generating quickly images that imitate convergent beam electron diffraction patterns.
|
|
5
5
|
Author-email: Matthew Fitzpatrick <matthew.rc.fitzpatrick@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://mrfitzpa.github.io/fakecbed
|
|
@@ -1482,6 +1482,11 @@ class CBEDPattern(fancytypes.PreSerializableAndUpdatable):
|
|
|
1482
1482
|
illumination_support = self._illumination_support.cpu().detach().clone()
|
|
1483
1483
|
illumination_support = illumination_support.numpy(force=True)
|
|
1484
1484
|
|
|
1485
|
+
if self._disk_supports is None:
|
|
1486
|
+
method_name = ("_calc_disk_supports"
|
|
1487
|
+
"_and_cache_select_intermediates")
|
|
1488
|
+
method_alias = getattr(self, method_name)
|
|
1489
|
+
self._disk_supports = method_alias(u_x, u_y)
|
|
1485
1490
|
disk_supports = self._disk_supports.numpy(force=True)
|
|
1486
1491
|
|
|
1487
1492
|
num_disks = self._num_disks
|
|
@@ -1701,11 +1706,13 @@ class CBEDPattern(fancytypes.PreSerializableAndUpdatable):
|
|
|
1701
1706
|
|
|
1702
1707
|
apply_shot_noise = self._apply_shot_noise
|
|
1703
1708
|
if apply_shot_noise == True:
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
image =
|
|
1709
|
+
# ``torch.poisson`` was occasionally causing CUDA errors.
|
|
1710
|
+
rng = np.random.default_rng(self._rng_seed)
|
|
1711
|
+
image_dtype = image.dtype
|
|
1712
|
+
image = image.numpy(force=True)
|
|
1713
|
+
image = rng.poisson(image)
|
|
1714
|
+
image = torch.from_numpy(image)
|
|
1715
|
+
image = image.to(device=self._device, dtype=image_dtype)
|
|
1709
1716
|
|
|
1710
1717
|
image = self._apply_detector_partition_inpainting(input_image=image)
|
|
1711
1718
|
|
|
@@ -1715,7 +1722,7 @@ class CBEDPattern(fancytypes.PreSerializableAndUpdatable):
|
|
|
1715
1722
|
self._illumination_support = method_alias(u_x, u_y)
|
|
1716
1723
|
illumination_support = self._illumination_support
|
|
1717
1724
|
|
|
1718
|
-
image = image*illumination_support
|
|
1725
|
+
image = image*illumination_support
|
|
1719
1726
|
|
|
1720
1727
|
coords_of_cold_pixels = self._cold_pixels
|
|
1721
1728
|
L, R, B, T = self._mask_frame
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fakecbed
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: A Python library for generating quickly images that imitate convergent beam electron diffraction patterns.
|
|
5
5
|
Author-email: Matthew Fitzpatrick <matthew.rc.fitzpatrick@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://mrfitzpa.github.io/fakecbed
|
|
@@ -659,6 +659,24 @@ def test_8_of_CBEDPattern():
|
|
|
659
659
|
|
|
660
660
|
|
|
661
661
|
|
|
662
|
+
def test_9_of_CBEDPattern():
|
|
663
|
+
cbed_pattern = fakecbed.discretized.CBEDPattern()
|
|
664
|
+
|
|
665
|
+
num_pixels_across_pattern = \
|
|
666
|
+
cbed_pattern.core_attrs["num_pixels_across_pattern"]
|
|
667
|
+
|
|
668
|
+
overriding_image = np.zeros(2*(num_pixels_across_pattern,))
|
|
669
|
+
|
|
670
|
+
kwargs = {"overriding_image": overriding_image,
|
|
671
|
+
"skip_validation_and_conversion": False}
|
|
672
|
+
cbed_pattern.override_image_then_reapply_mask(**kwargs)
|
|
673
|
+
|
|
674
|
+
cbed_pattern_signal = cbed_pattern.get_signal(deep_copy=False)
|
|
675
|
+
|
|
676
|
+
return None
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
662
680
|
###########################
|
|
663
681
|
## Define error messages ##
|
|
664
682
|
###########################
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|