foscat 3.3.1__tar.gz → 3.3.3__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.
Files changed (31) hide show
  1. {foscat-3.3.1/src/foscat.egg-info → foscat-3.3.3}/PKG-INFO +1 -1
  2. {foscat-3.3.1 → foscat-3.3.3}/pyproject.toml +1 -1
  3. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/alm.py +2 -2
  4. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/backend.py +8 -0
  5. {foscat-3.3.1 → foscat-3.3.3/src/foscat.egg-info}/PKG-INFO +1 -1
  6. {foscat-3.3.1 → foscat-3.3.3}/LICENCE +0 -0
  7. {foscat-3.3.1 → foscat-3.3.3}/README.md +0 -0
  8. {foscat-3.3.1 → foscat-3.3.3}/setup.cfg +0 -0
  9. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/CNN.py +0 -0
  10. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/CircSpline.py +0 -0
  11. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/FoCUS.py +0 -0
  12. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/GCNN.py +0 -0
  13. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/Softmax.py +0 -0
  14. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/Spline1D.py +0 -0
  15. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/Synthesis.py +0 -0
  16. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/__init__.py +0 -0
  17. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/backend_tens.py +0 -0
  18. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/loss_backend_tens.py +0 -0
  19. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/loss_backend_torch.py +0 -0
  20. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat.py +0 -0
  21. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat1D.py +0 -0
  22. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat2D.py +0 -0
  23. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat_cov.py +0 -0
  24. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat_cov1D.py +0 -0
  25. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat_cov2D.py +0 -0
  26. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat_cov_map.py +0 -0
  27. {foscat-3.3.1 → foscat-3.3.3}/src/foscat/scat_cov_map2D.py +0 -0
  28. {foscat-3.3.1 → foscat-3.3.3}/src/foscat.egg-info/SOURCES.txt +0 -0
  29. {foscat-3.3.1 → foscat-3.3.3}/src/foscat.egg-info/dependency_links.txt +0 -0
  30. {foscat-3.3.1 → foscat-3.3.3}/src/foscat.egg-info/requires.txt +0 -0
  31. {foscat-3.3.1 → foscat-3.3.3}/src/foscat.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foscat
3
- Version: 3.3.1
3
+ Version: 3.3.3
4
4
  Summary: Generate synthetic Healpix or 2D data using Cross Scattering Transform
5
5
  Author-email: Jean-Marc DELOUIS <jean.marc.delouis@ifremer.fr>
6
6
  Maintainer-email: Theo Foulquier <theo.foulquier@ifremer.fr>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "foscat"
3
- version = "3.3.1"
3
+ version = "3.3.3"
4
4
  description = "Generate synthetic Healpix or 2D data using Cross Scattering Transform"
5
5
  readme = "README.md"
6
6
  license = { text = "BSD-3-Clause" }
@@ -101,9 +101,9 @@ class alm():
101
101
  th,ph=hp.pix2ang(nside,np.arange(12*nside*nside))
102
102
  if nest:
103
103
  idx=hp.ring2nest(nside,np.arange(12*nside**2))
104
- ft_im=self.comp_tf(self.backend.bk_complex(im[idx],0*im),ph)
104
+ ft_im=self.comp_tf(self.backend.bk_complex(self.backend.bk_gather(im,idx),0*im),ph)
105
105
  if map2 is not None:
106
- ft_im2=self.comp_tf(self.backend.bk_complex(map2[idx],0*im),ph)
106
+ ft_im2=self.comp_tf(self.backend.bk_complex(self.backend.bk_gather(map2,idx),0*im),ph)
107
107
  else:
108
108
  ft_im=self.comp_tf(self.backend.bk_complex(im,0*im),ph)
109
109
  if map2 is not None:
@@ -932,6 +932,14 @@ class foscat_backend:
932
932
  return self.backend.zeros(shape,dtype=dtype)
933
933
  if self.BACKEND == self.NUMPY:
934
934
  return np.zeros(shape,dtype=dtype)
935
+
936
+ def bk_gather(self, data,idx):
937
+ if self.BACKEND == self.TENSORFLOW:
938
+ return self.backend.gather(data,idx)
939
+ if self.BACKEND == self.TORCH:
940
+ return data[idx]
941
+ if self.BACKEND == self.NUMPY:
942
+ return data[idx]
935
943
 
936
944
  def bk_fft(self, data):
937
945
  if self.BACKEND == self.TENSORFLOW:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foscat
3
- Version: 3.3.1
3
+ Version: 3.3.3
4
4
  Summary: Generate synthetic Healpix or 2D data using Cross Scattering Transform
5
5
  Author-email: Jean-Marc DELOUIS <jean.marc.delouis@ifremer.fr>
6
6
  Maintainer-email: Theo Foulquier <theo.foulquier@ifremer.fr>
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