PyCosmoMMF 0.1.2__py3-none-any.whl → 0.2.0__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.
pycosmommf/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.1.2'
16
- __version_tuple__ = version_tuple = (0, 1, 2)
15
+ __version__ = version = '0.2.0'
16
+ __version_tuple__ = version_tuple = (0, 2, 0)
pycosmommf/filter.py CHANGED
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
  import numba as nb
4
4
  import numpy as np
5
5
 
6
- jit_compiler = nb.njit(fastmath=True)
6
+ jit_compiler = nb.njit(parallel=True, fastmath=True)
7
7
 
8
8
 
9
9
  def wavevectors3D(dims, box_size=(2 * np.pi, 2 * np.pi, 2 * np.pi)):
@@ -36,7 +36,7 @@ def wavevectors3D(dims, box_size=(2 * np.pi, 2 * np.pi, 2 * np.pi)):
36
36
 
37
37
 
38
38
  @jit_compiler
39
- def kspace_gaussian_filter(R_S, kv):
39
+ def kspace_gaussian_filter(R_S, kv): # pragma: no cover
40
40
  """
41
41
  create a Gaussian filter in k-space.
42
42
 
@@ -65,7 +65,7 @@ def kspace_gaussian_filter(R_S, kv):
65
65
 
66
66
 
67
67
  @jit_compiler
68
- def kspace_top_hat_filter(R_S, kv):
68
+ def kspace_top_hat_filter(R_S, kv): # pragma: no cover
69
69
  """
70
70
  create a top-hat filter in k-space.
71
71
 
pycosmommf/hessian.py CHANGED
@@ -3,7 +3,7 @@ from __future__ import annotations
3
3
  import numba as nb
4
4
  import numpy as np
5
5
 
6
- jit_compiler = nb.njit(fastmath=True)
6
+ jit_compiler = nb.njit(parallel=True, fastmath=True)
7
7
 
8
8
 
9
9
  def fast_hessian_from_smoothed(f_Rn, R_S, kv):
@@ -31,7 +31,7 @@ def fast_hessian_from_smoothed(f_Rn, R_S, kv):
31
31
  kx, ky, kz = kv[0], kv[1], kv[2]
32
32
 
33
33
  @jit_compiler
34
- def perform_loop(hessian):
34
+ def perform_loop(hessian): # pragma: no cover
35
35
  """
36
36
  This function is a loop that calculates the hessian matrix
37
37
  for each point in the 3D array.
pycosmommf/signatures.py CHANGED
@@ -6,11 +6,11 @@ import numpy as np
6
6
  from .filter import smooth_gauss, smooth_loggauss, wavevectors3D
7
7
  from .hessian import fast_hessian_from_smoothed
8
8
 
9
- jit_compiler = nb.njit
9
+ jit_compiler = nb.njit(parallel=True, fastmath=True)
10
10
 
11
11
 
12
12
  @jit_compiler
13
- def signatures_from_hessian(hessian):
13
+ def signatures_from_hessian(hessian): # pragma: no cover
14
14
  """
15
15
  Function to calculate the signatures from a given hessian.
16
16
 
@@ -115,7 +115,7 @@ def maximum_signature(Rs, field, alg="NEXUSPLUS", eps=1e-8):
115
115
  sigmax = np.ones((nx, ny, nz, 3), dtype=np.float32) * eps
116
116
 
117
117
  @jit_compiler
118
- def perform_loop(sigmax, sigs_Rn, nx, ny, nz):
118
+ def perform_loop(sigmax, sigs_Rn, nx, ny, nz): # pragma: no cover
119
119
  for ix in nb.prange(nx):
120
120
  for iy in range(ny):
121
121
  for iz in range(nz):
pycosmommf/tagging.py CHANGED
@@ -2,14 +2,11 @@ from __future__ import annotations
2
2
 
3
3
  import functools
4
4
 
5
- import numba as nb
6
5
  import numpy as np
7
6
  import skimage.measure
8
7
 
9
- jit_compiler = nb.njit(fastmath=True)
10
8
 
11
-
12
- def make_the_clusbool(delta, max_sigs, verbose, Δ):
9
+ def make_the_clusbool(delta, max_sigs, Δ): # pragma: no cover
13
10
  """
14
11
  make_the_clusbool() - Documentation
15
12
 
@@ -60,9 +57,7 @@ def make_the_clusbool(delta, max_sigs, verbose, Δ):
60
57
  S_th = signature_thresholds[np.abs(virialized_fractions - 0.5).argmin()]
61
58
  clusbool = max_sigs[:, :, :, 0] > S_th
62
59
 
63
- if verbose:
64
- return clusbool, S_th, signature_thresholds, virialized_fractions
65
- return clusbool
60
+ return clusbool, S_th, signature_thresholds, virialized_fractions
66
61
 
67
62
 
68
63
  def calc_mass_change(sig_vec, delta_vec, Smin, Smax):
@@ -141,12 +136,13 @@ def calc_structure_bools(
141
136
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
142
137
 
143
138
  if clusbool is None:
144
- if verbose:
145
- clusbool, cluster_thresh, S_clus, f_vir_clus = make_the_clusbool(
146
- delta, max_sigs, verbose, Δ
147
- )
148
- else:
149
- clusbool = make_the_clusbool(delta, max_sigs, verbose, Δ)
139
+ clusbool, cluster_thresh, S_clus, f_vir_clus = make_the_clusbool(
140
+ delta, max_sigs, Δ
141
+ )
142
+ else:
143
+ cluster_thresh = None
144
+ S_clus = None
145
+ f_vir_clus = None
150
146
 
151
147
  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
152
148
  # Step 2. Create Filament Boolean Filter
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pycosmommf
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: A package for identifying structures in the cosmic web.
5
5
  Project-URL: Homepage, https://github.com/James11222/pycosmommf
6
6
  Project-URL: Bug Tracker, https://github.com/James11222/pycosmommf/issues
@@ -0,0 +1,13 @@
1
+ pycosmommf/__init__.py,sha256=pmN6TzcwQ_VkHOjiSTmPvrNjA-uFQYQmTH1tiE4BNNU,356
2
+ pycosmommf/_version.py,sha256=H-qsvrxCpdhaQzyddR-yajEqI71hPxLa4KxzpP3uS1g,411
3
+ pycosmommf/_version.pyi,sha256=j5kbzfm6lOn8BzASXWjGIA1yT0OlHTWqlbyZ8Si_o0E,118
4
+ pycosmommf/filter.py,sha256=UjkwIA22uhWPKTPq_r9bXrQzEv8_xBcwl9GQQcMffjg,4502
5
+ pycosmommf/hessian.py,sha256=WiNPcfmxU3MG2D0w0bRf3iRL-2RJBWvgsXI-ZxBIrFU,1853
6
+ pycosmommf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ pycosmommf/signatures.py,sha256=NJ36JboFgP-9oNW6Dc3-6PY61xSMATkehapEZVaxX2c,4039
8
+ pycosmommf/tagging.py,sha256=c7POLpklFzobU-OQbIwmN6AM84yvbkYJ3VJ88gBz9xM,9768
9
+ pycosmommf/utils.py,sha256=MYkAmf8PtifAM8R2oQPqwokdCUeuORkwO7tgiVWHEnY,1680
10
+ pycosmommf-0.2.0.dist-info/METADATA,sha256=qbq5z4Zqk4H-vKhkk-gyjXwSx1ivntUbEmyj0OY_D1s,4426
11
+ pycosmommf-0.2.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
12
+ pycosmommf-0.2.0.dist-info/licenses/LICENSE,sha256=IOy0BRQvhUnA4tFoZ1ZxLfQqx-6fkT6CNQdcma5WVQs,1053
13
+ pycosmommf-0.2.0.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- pycosmommf/__init__.py,sha256=pmN6TzcwQ_VkHOjiSTmPvrNjA-uFQYQmTH1tiE4BNNU,356
2
- pycosmommf/_version.py,sha256=SFCDdrYA67D1Je-jHgVVh4LOopkPvuV6NMtqSJ7Tfhg,411
3
- pycosmommf/_version.pyi,sha256=j5kbzfm6lOn8BzASXWjGIA1yT0OlHTWqlbyZ8Si_o0E,118
4
- pycosmommf/filter.py,sha256=f9fH2LcmA-5Ysc42z8JLBs8gBKpNwGMYn5aVd6H8lEg,4447
5
- pycosmommf/hessian.py,sha256=-LVq4Zf2b-gzetPfx5vXn6qIwgLyqnCIOHOEhWStYU0,1818
6
- pycosmommf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- pycosmommf/signatures.py,sha256=cr1EmvFlDWxa0LUj3qk-mgih6mhxO0EZQQT01IIneA4,3969
8
- pycosmommf/tagging.py,sha256=bG9rnmlarbm8zmHV7mHUv2POiyQrm1F9eZ9OkyY0CME,9893
9
- pycosmommf/utils.py,sha256=MYkAmf8PtifAM8R2oQPqwokdCUeuORkwO7tgiVWHEnY,1680
10
- pycosmommf-0.1.2.dist-info/METADATA,sha256=Nx2ZXlP1bCnNM6xpSKWwJbN1EtmnVK0muAjdNVmrZ3U,4426
11
- pycosmommf-0.1.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
12
- pycosmommf-0.1.2.dist-info/licenses/LICENSE,sha256=IOy0BRQvhUnA4tFoZ1ZxLfQqx-6fkT6CNQdcma5WVQs,1053
13
- pycosmommf-0.1.2.dist-info/RECORD,,