foscat 2026.1.1__tar.gz → 2026.2.1__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 (51) hide show
  1. {foscat-2026.1.1/src/foscat.egg-info → foscat-2026.2.1}/PKG-INFO +1 -1
  2. {foscat-2026.1.1 → foscat-2026.2.1}/pyproject.toml +1 -1
  3. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/FoCUS.py +16 -7
  4. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/SphereDownGeo.py +1 -1
  5. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat_cov.py +2 -2
  6. {foscat-2026.1.1 → foscat-2026.2.1/src/foscat.egg-info}/PKG-INFO +1 -1
  7. {foscat-2026.1.1 → foscat-2026.2.1}/LICENSE +0 -0
  8. {foscat-2026.1.1 → foscat-2026.2.1}/README.md +0 -0
  9. {foscat-2026.1.1 → foscat-2026.2.1}/setup.cfg +0 -0
  10. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/BkBase.py +0 -0
  11. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/BkNumpy.py +0 -0
  12. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/BkTensorflow.py +0 -0
  13. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/BkTorch.py +0 -0
  14. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/CNN.py +0 -0
  15. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/CircSpline.py +0 -0
  16. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/GCNN.py +0 -0
  17. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/HOrientedConvol.py +0 -0
  18. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/HealBili.py +0 -0
  19. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/HealSpline.py +0 -0
  20. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/Plot.py +0 -0
  21. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/Softmax.py +0 -0
  22. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/SphereUpGeo.py +0 -0
  23. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/SphericalStencil.py +0 -0
  24. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/Spline1D.py +0 -0
  25. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/Synthesis.py +0 -0
  26. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/UNET.py +0 -0
  27. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/__init__.py +0 -0
  28. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/alm.py +0 -0
  29. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/alm_loc.py +0 -0
  30. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/backend.py +0 -0
  31. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/backend_tens.py +0 -0
  32. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/heal_NN.py +0 -0
  33. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/healpix_unet_torch.py +0 -0
  34. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/healpix_vit_skip.py +0 -0
  35. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/healpix_vit_torch-old.py +0 -0
  36. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/healpix_vit_torch.py +0 -0
  37. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/loss_backend_tens.py +0 -0
  38. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/loss_backend_torch.py +0 -0
  39. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/planar_vit.py +0 -0
  40. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat.py +0 -0
  41. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat1D.py +0 -0
  42. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat2D.py +0 -0
  43. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat_cov1D.py +0 -0
  44. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat_cov2D.py +0 -0
  45. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat_cov_map.py +0 -0
  46. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/scat_cov_map2D.py +0 -0
  47. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat/unet_2_d_from_healpix_params.py +0 -0
  48. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat.egg-info/SOURCES.txt +0 -0
  49. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat.egg-info/dependency_links.txt +0 -0
  50. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat.egg-info/requires.txt +0 -0
  51. {foscat-2026.1.1 → foscat-2026.2.1}/src/foscat.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: foscat
3
- Version: 2026.1.1
3
+ Version: 2026.2.1
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 = "2026.01.1"
3
+ version = "2026.02.1"
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" }
@@ -9,7 +9,7 @@ from foscat.SphereDownGeo import SphereDownGeo
9
9
  from foscat.SphereUpGeo import SphereUpGeo
10
10
  import torch
11
11
 
12
- TMPFILE_VERSION = "V12_0"
12
+ TMPFILE_VERSION = "V13_0"
13
13
 
14
14
 
15
15
  class FoCUS:
@@ -39,7 +39,7 @@ class FoCUS:
39
39
  mpi_rank=0
40
40
  ):
41
41
 
42
- self.__version__ = "2026.01.1"
42
+ self.__version__ = "2026.02.1"
43
43
  # P00 coeff for normalization for scat_cov
44
44
  self.TMPFILE_VERSION = TMPFILE_VERSION
45
45
  self.P1_dic = None
@@ -1579,11 +1579,20 @@ class FoCUS:
1579
1579
 
1580
1580
  xx=np.tile(np.arange(self.KERNELSZ)-self.KERNELSZ//2,self.KERNELSZ).reshape(self.KERNELSZ,self.KERNELSZ)
1581
1581
 
1582
- wwr=(np.exp(-pw2*(xx**2+(xx.T)**2))*np.cos(pw*xx*np.pi)).reshape(1,1,self.KERNELSZ*self.KERNELSZ)
1583
- wwr-=wwr.mean()
1584
- wwi=(np.exp(-pw2*(xx**2+(xx.T)**2))*np.sin(pw*xx*np.pi)).reshape(1,1,self.KERNELSZ*self.KERNELSZ)
1585
- wwi-=wwi.mean()
1586
- amp=np.sum(abs(wwr+1J*wwi))
1582
+ if nside>2:
1583
+ wwr=(np.exp(-pw2*(xx**2+(xx.T)**2))*np.cos(pw*xx*np.pi)).reshape(1,1,self.KERNELSZ*self.KERNELSZ)
1584
+ wwr-=wwr.mean()
1585
+ wwi=(np.exp(-pw2*(xx**2+(xx.T)**2))*np.sin(pw*xx*np.pi)).reshape(1,1,self.KERNELSZ*self.KERNELSZ)
1586
+ wwi-=wwi.mean()
1587
+ amp=np.sum(abs(wwr+1J*wwi))
1588
+ else:
1589
+ #asymetric kernels
1590
+ wwr=(np.exp(-2*pw2*(xx**2+self.NORIENT*(xx.T)**2))).reshape(1,1,self.KERNELSZ*self.KERNELSZ)
1591
+ #wwr-=wwr.mean()
1592
+ #wwi=(np.exp(-pw2*(xx**2+(xx.T)**2))*np.sin(pw*xx*np.pi)).reshape(1,1,self.KERNELSZ*self.KERNELSZ)
1593
+ #wwi-=wwi.mean()
1594
+ wwi=0.0*wwr
1595
+ amp=self.NORIENT*np.sum(abs(wwr+1J*wwi))
1587
1596
 
1588
1597
  wwr/=amp
1589
1598
  wwi/=amp
@@ -259,7 +259,7 @@ class SphereDownGeo(nn.Module):
259
259
  # angular distance via dot product
260
260
  dots = np.clip(np.dot(vec, vec0), -1.0, 1.0)
261
261
  ang = np.arccos(dots)
262
- w = np.exp(- 2*(ang / sigma_rad) ** 2)
262
+ w = np.exp(- 2.0*(ang / sigma_rad) ** 2)
263
263
 
264
264
  w = self._normalize_weights(w)
265
265
 
@@ -2701,7 +2701,7 @@ class funct(FOC.FoCUS):
2701
2701
  if nside is None:
2702
2702
  nside = int(np.sqrt(npix // 12))
2703
2703
 
2704
- J = int(np.log(nside) / np.log(2)) # Number of j scales
2704
+ J = int(np.log2(nside)+1) # Number of j scales
2705
2705
  if cell_ids is not None:
2706
2706
  J=np.min([J,int(np.log(cell_ids.shape[0]) / (2*np.log(2)))-1])
2707
2707
 
@@ -2712,7 +2712,7 @@ class funct(FOC.FoCUS):
2712
2712
  if Jmax > J:
2713
2713
  print("==========\n\n")
2714
2714
  print(
2715
- "The Jmax you requested is larger than the data size, which may cause problems while computing the scattering transform."
2715
+ "The Jmax you requested is larger than the data size ", J,", which may cause problems while computing the scattering transform."
2716
2716
  )
2717
2717
  print("\n\n==========")
2718
2718
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: foscat
3
- Version: 2026.1.1
3
+ Version: 2026.2.1
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