foscat 3.3.1__py3-none-any.whl → 3.3.3__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.
foscat/alm.py CHANGED
@@ -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:
foscat/backend.py CHANGED
@@ -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>
@@ -6,8 +6,8 @@ foscat/Softmax.py,sha256=aBLQauoG0q2SJYPotV6U-cxAhsJcspWHNRWdnA_nAiQ,2854
6
6
  foscat/Spline1D.py,sha256=a5Jb8I9tb8y20iM8W-z6iZsIqDFByRp6eZdChpmuI5k,3010
7
7
  foscat/Synthesis.py,sha256=3_Lq5-gUM-WmO2h15kajMES8XjRo2BGseoxvTLW_xEc,13626
8
8
  foscat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- foscat/alm.py,sha256=Ga1PUDDQlXz6sNf9ZTewO2U3uspbN8GsieKj3fSaQ14,5446
10
- foscat/backend.py,sha256=SyPNkwuwIKAeUQZE4m5RSUr29jjVbL4wzNrtqYXmVno,38557
9
+ foscat/alm.py,sha256=Dl--lgUVKsPUtDSAaiAewr5QBEU4kAAAGywl6_-SEA0,5492
10
+ foscat/backend.py,sha256=TZnOyPYjqbHjOTkH2Zk0zN5DQf2-WNHlaxenuPo_wO0,38822
11
11
  foscat/backend_tens.py,sha256=9Dp136m9frkclkwifJQLLbIpl3ETI3_txdPUZcKfuMw,1618
12
12
  foscat/loss_backend_tens.py,sha256=dCOVN6faDtIpN3VO78HTmYP2i5fnFAf-Ddy5qVBlGrM,1783
13
13
  foscat/loss_backend_torch.py,sha256=k3z18Dj3SaLKK6ZIKcm7GO4U_YKYVP6LtHG1aIbxkYk,1627
@@ -19,8 +19,8 @@ foscat/scat_cov1D.py,sha256=XOxsZZ5TYq8f34i2tUgIfzyaqaTDlICB3HzD2l_puro,531
19
19
  foscat/scat_cov2D.py,sha256=3gn6xjKvfKsyHJoPfYIu8q9LLVAbU3tsiS2l1LAJ0XM,531
20
20
  foscat/scat_cov_map.py,sha256=0wTRo4Nc7rYfI09RI2mh2bYixoukt5lrvAXR6wa9kjA,2744
21
21
  foscat/scat_cov_map2D.py,sha256=FqF45FBcoiQbvuVsrLWUIPRUc95GsKsrnH6fKzB3GlE,2841
22
- foscat-3.3.1.dist-info/LICENCE,sha256=i0ukIr8ZUpkSY2sZaE9XZK-6vuSU5iG6IgX_3pjatP8,1505
23
- foscat-3.3.1.dist-info/METADATA,sha256=HuiEXLDRqhuE2dGcp6Uvh8aCJeo80XUrh1ppa5ncB2Y,7191
24
- foscat-3.3.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
25
- foscat-3.3.1.dist-info/top_level.txt,sha256=AGySXBBAlJgb8Tj8af6m_F-aiNg2zNTcybCUPVOKjAg,7
26
- foscat-3.3.1.dist-info/RECORD,,
22
+ foscat-3.3.3.dist-info/LICENCE,sha256=i0ukIr8ZUpkSY2sZaE9XZK-6vuSU5iG6IgX_3pjatP8,1505
23
+ foscat-3.3.3.dist-info/METADATA,sha256=t8Rl5Bh6t2LRjFZLpctvDA6eXzqemUSRLzhjiO8s-fY,7191
24
+ foscat-3.3.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
25
+ foscat-3.3.3.dist-info/top_level.txt,sha256=AGySXBBAlJgb8Tj8af6m_F-aiNg2zNTcybCUPVOKjAg,7
26
+ foscat-3.3.3.dist-info/RECORD,,
File without changes