foscat 3.3.0__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
@@ -96,12 +96,18 @@ class alm():
96
96
  ii+=1
97
97
  return self.backend.bk_reshape(self.backend.bk_concat(ft_im,axis=0),[4*nside-1,3*nside])
98
98
 
99
- def anafast(self,im,map2=None):
99
+ def anafast(self,im,map2=None,nest=True):
100
100
  nside=int(np.sqrt(im.shape[0]//12))
101
101
  th,ph=hp.pix2ang(nside,np.arange(12*nside*nside))
102
- ft_im=self.comp_tf(self.backend.bk_complex(im,0*im),ph)
103
- if map2 is not None:
104
- ft_im2=self.comp_tf(self.backend.bk_complex(map2,0*im),ph)
102
+ if nest:
103
+ idx=hp.ring2nest(nside,np.arange(12*nside**2))
104
+ ft_im=self.comp_tf(self.backend.bk_complex(self.backend.bk_gather(im,idx),0*im),ph)
105
+ if map2 is not None:
106
+ ft_im2=self.comp_tf(self.backend.bk_complex(self.backend.bk_gather(map2,idx),0*im),ph)
107
+ else:
108
+ ft_im=self.comp_tf(self.backend.bk_complex(im,0*im),ph)
109
+ if map2 is not None:
110
+ ft_im2=self.comp_tf(self.backend.bk_complex(map2,0*im),ph)
105
111
 
106
112
  co_th=np.cos(np.unique(th))
107
113
 
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:
foscat/scat_cov.py CHANGED
@@ -1496,7 +1496,7 @@ class scat_cov:
1496
1496
  ax1.axvline(n - 0.5, ls=":", color="gray")
1497
1497
  plt.yscale("log")
1498
1498
  if norm:
1499
- ax1.set_ylabel(r"$\frac{S_4}{\sqrt{P_{00,j_1}P_{00,j_2}}}$")
1499
+ ax1.set_ylabel(r"$\frac{S_4}{\sqrt{S_{2,j_1}S_{2,j_2}}}$")
1500
1500
  else:
1501
1501
  ax1.set_ylabel(r"$S_4$")
1502
1502
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foscat
3
- Version: 3.3.0
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,21 +6,21 @@ 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=qjczgfyZSZKv7eNmvE-UbRtOO6HQ42Cu-TTx1TioYyM,5148
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
14
14
  foscat/scat.py,sha256=qGYiBIysPt65MdmF07WWA4piVlTfA9-lFDTaicnqC2w,72822
15
15
  foscat/scat1D.py,sha256=W5Uu6wdQ4ZsFKXpof0f1OBl-1wjJmW7ruvddRWxe7uM,53726
16
16
  foscat/scat2D.py,sha256=boKj0ASqMMSy7uQLK6hPniG87m3hZGJBYBiq5v8F9IQ,532
17
- foscat/scat_cov.py,sha256=cyq-gK23mlQSy1zblDPWJsmJwrEw7bcWx1URqCgqZ48,144287
17
+ foscat/scat_cov.py,sha256=e7o5CRG48tdYD1KYbXKWW5XmGA-C70aoRzAGCh0RJdM,144285
18
18
  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.0.dist-info/LICENCE,sha256=i0ukIr8ZUpkSY2sZaE9XZK-6vuSU5iG6IgX_3pjatP8,1505
23
- foscat-3.3.0.dist-info/METADATA,sha256=chJzw6s5UFmpGc-XlgunHjQRfDWlZUomwec7CYU5diY,7191
24
- foscat-3.3.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
25
- foscat-3.3.0.dist-info/top_level.txt,sha256=AGySXBBAlJgb8Tj8af6m_F-aiNg2zNTcybCUPVOKjAg,7
26
- foscat-3.3.0.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