PyCosmoMMF 0.0.3__tar.gz → 0.0.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyCosmoMMF
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: A package for detecting structures in the Cosmic Web.
5
5
  Home-page: https://github.com/James11222/PyCosmoMMF/
6
6
  Author: James Sunseri
@@ -68,21 +68,21 @@ def kspace_top_hat_filter(R_S, kv):
68
68
  The filter in k-space.
69
69
  """
70
70
 
71
- kmax = (2 * np.pi) / R_S
72
-
73
71
  kx, ky, kz = kv
74
72
  nx, ny, nz = len(kx), len(ky), len(kz)
75
73
  filter_k = np.zeros((nx, ny, nz))
76
74
 
77
- for ix in range(nx):
75
+ for ix in nb.prange(nx):
78
76
  for iy in range(ny):
79
77
  for iz in range(nz):
80
- if (np.sqrt(kx[ix]**2 + ky[iy]**2 + kz[iz]**2)) < kmax:
81
- filter_k[ix, iy, iz] = 1
78
+ k = np.sqrt(kx[ix]**2 + ky[iy]**2 + kz[iz]**2)
79
+ if k == 0.0:
80
+ filter_k[ix, iy, iz] = 1.0
81
+ else:
82
+ filter_k[ix, iy, iz] = 3 * (np.sin(k * R_S) - (k * R_S) * np.cos(k * R_S)) / (k * R_S)**3
82
83
 
83
84
  return filter_k
84
85
 
85
-
86
86
  def smooth_top_hat(f, R_S, kv):
87
87
  """
88
88
  apply a top-hat filter to a field f.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyCosmoMMF
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: A package for detecting structures in the Cosmic Web.
5
5
  Home-page: https://github.com/James11222/PyCosmoMMF/
6
6
  Author: James Sunseri
@@ -12,7 +12,7 @@ here = pathlib.Path(__file__).parent.resolve()
12
12
 
13
13
  setup(
14
14
  name='PyCosmoMMF', # Required
15
- version='0.0.3', # Required
15
+ version='0.0.4', # Required
16
16
  description='A package for detecting structures in the Cosmic Web.', # Optional
17
17
  long_description=(here / 'README.md').read_text(encoding='utf-8'), # Optional
18
18
  long_description_content_type='text/markdown', # Optional (see note above)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes