fakecbed 0.3.3__py3-none-any.whl → 0.3.5__py3-none-any.whl
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/discretized.py +13 -6
- fakecbed/version.py +2 -2
- {fakecbed-0.3.3.dist-info → fakecbed-0.3.5.dist-info}/METADATA +1 -1
- fakecbed-0.3.5.dist-info/RECORD +10 -0
- fakecbed-0.3.3.dist-info/RECORD +0 -10
- {fakecbed-0.3.3.dist-info → fakecbed-0.3.5.dist-info}/WHEEL +0 -0
- {fakecbed-0.3.3.dist-info → fakecbed-0.3.5.dist-info}/licenses/LICENSE +0 -0
- {fakecbed-0.3.3.dist-info → fakecbed-0.3.5.dist-info}/top_level.txt +0 -0
fakecbed/discretized.py
CHANGED
|
@@ -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
|
fakecbed/version.py
CHANGED
|
@@ -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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
fakecbed/__init__.py,sha256=iP73WNV_HZgxiVUVdesbJqlrhDGESooh1hlBs8kox9M,1342
|
|
2
|
+
fakecbed/discretized.py,sha256=qqI_F4Ax9oH6nAdXEOTTKji9CH52oEIrURAopSGauu8,99688
|
|
3
|
+
fakecbed/shapes.py,sha256=TiqJBZI4JZib0Q6zfO0e-dh7ACjYhvAYUvEtIedoo74,116471
|
|
4
|
+
fakecbed/tds.py,sha256=mk5359ErIhdpCoTdHq9r1-foKb8t3qCOHqNoabx3bQw,8066
|
|
5
|
+
fakecbed/version.py,sha256=qmTn4w-xTKk8dVv-032b430C-ilxMTkr9Q0HieU18N8,511
|
|
6
|
+
fakecbed-0.3.5.dist-info/licenses/LICENSE,sha256=N0P3pKtRMvfb64jmgJdlerg3TnS0a2QC776AzPsbZIg,35128
|
|
7
|
+
fakecbed-0.3.5.dist-info/METADATA,sha256=PkGdAdfTboRbWK_BEvcMt4DoiUAxIN_Nd1IDe_--6dU,3023
|
|
8
|
+
fakecbed-0.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
+
fakecbed-0.3.5.dist-info/top_level.txt,sha256=l0jL8P0CjRiCSznYLnq7riaAnOmYaV3zjjjIJx9vjSQ,9
|
|
10
|
+
fakecbed-0.3.5.dist-info/RECORD,,
|
fakecbed-0.3.3.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
fakecbed/__init__.py,sha256=iP73WNV_HZgxiVUVdesbJqlrhDGESooh1hlBs8kox9M,1342
|
|
2
|
-
fakecbed/discretized.py,sha256=zniskVmHRyxnR-P_O7qvyHuk2nnujUx1zDI99QDN53U,99379
|
|
3
|
-
fakecbed/shapes.py,sha256=TiqJBZI4JZib0Q6zfO0e-dh7ACjYhvAYUvEtIedoo74,116471
|
|
4
|
-
fakecbed/tds.py,sha256=mk5359ErIhdpCoTdHq9r1-foKb8t3qCOHqNoabx3bQw,8066
|
|
5
|
-
fakecbed/version.py,sha256=cRYgYV4ttw-FMlrA4-5pzcSpTjS7X8uVa-nRTEADKW4,511
|
|
6
|
-
fakecbed-0.3.3.dist-info/licenses/LICENSE,sha256=N0P3pKtRMvfb64jmgJdlerg3TnS0a2QC776AzPsbZIg,35128
|
|
7
|
-
fakecbed-0.3.3.dist-info/METADATA,sha256=ntsj55iN8Ddoe9FtuB5FsY_tmvHzjB40iCoRtyrm35U,3023
|
|
8
|
-
fakecbed-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
9
|
-
fakecbed-0.3.3.dist-info/top_level.txt,sha256=l0jL8P0CjRiCSznYLnq7riaAnOmYaV3zjjjIJx9vjSQ,9
|
|
10
|
-
fakecbed-0.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|