foscat 3.3.3__tar.gz → 3.3.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.
Files changed (31) hide show
  1. {foscat-3.3.3/src/foscat.egg-info → foscat-3.3.4}/PKG-INFO +1 -1
  2. {foscat-3.3.3 → foscat-3.3.4}/pyproject.toml +1 -1
  3. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/alm.py +8 -5
  4. {foscat-3.3.3 → foscat-3.3.4/src/foscat.egg-info}/PKG-INFO +1 -1
  5. {foscat-3.3.3 → foscat-3.3.4}/LICENCE +0 -0
  6. {foscat-3.3.3 → foscat-3.3.4}/README.md +0 -0
  7. {foscat-3.3.3 → foscat-3.3.4}/setup.cfg +0 -0
  8. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/CNN.py +0 -0
  9. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/CircSpline.py +0 -0
  10. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/FoCUS.py +0 -0
  11. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/GCNN.py +0 -0
  12. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/Softmax.py +0 -0
  13. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/Spline1D.py +0 -0
  14. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/Synthesis.py +0 -0
  15. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/__init__.py +0 -0
  16. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/backend.py +0 -0
  17. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/backend_tens.py +0 -0
  18. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/loss_backend_tens.py +0 -0
  19. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/loss_backend_torch.py +0 -0
  20. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat.py +0 -0
  21. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat1D.py +0 -0
  22. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat2D.py +0 -0
  23. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat_cov.py +0 -0
  24. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat_cov1D.py +0 -0
  25. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat_cov2D.py +0 -0
  26. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat_cov_map.py +0 -0
  27. {foscat-3.3.3 → foscat-3.3.4}/src/foscat/scat_cov_map2D.py +0 -0
  28. {foscat-3.3.3 → foscat-3.3.4}/src/foscat.egg-info/SOURCES.txt +0 -0
  29. {foscat-3.3.3 → foscat-3.3.4}/src/foscat.egg-info/dependency_links.txt +0 -0
  30. {foscat-3.3.3 → foscat-3.3.4}/src/foscat.egg-info/requires.txt +0 -0
  31. {foscat-3.3.3 → foscat-3.3.4}/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.3
3
+ Version: 3.3.4
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.3"
3
+ version = "3.3.4"
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" }
@@ -3,10 +3,13 @@ import numpy as np
3
3
 
4
4
  class alm():
5
5
 
6
- def __init__(self,backend=None,lmax=24,limit_range=1E7):
6
+ def __init__(self,backend=None,lmax=24,nside=None,limit_range=1E7):
7
7
  self._logtab={}
8
- self.lmax=0
9
- for k in range(1,2*lmax+1):
8
+ if nside is not None:
9
+ self.lmax=3*nside
10
+ else:
11
+ self.lmax=lmax
12
+ for k in range(1,2*self.lmax+1):
10
13
  self._logtab[k]=np.log(k)
11
14
  self._limit_range=1/limit_range
12
15
  self._log_limit_range=np.log(limit_range)
@@ -52,7 +55,7 @@ class alm():
52
55
  ratio[0,0]= self.double_factorial_log(2*m - 1)-0.5*np.sum(self.log(1+np.arange(2*m)))
53
56
 
54
57
  if m == lmax:
55
- return result*np.exp(ratio)*np.sqrt((2*(np.arange(lmax-m+1)-m))/(4*np.pi)).reshape(lmax+1-m,1)
58
+ return result*np.exp(ratio)*np.sqrt(4*np.pi*(2*(np.arange(lmax-m+1)+m)+1)).reshape(lmax+1-m,1)
56
59
 
57
60
  # Étape 2 : Calcul de P_{l+1, m}(x)
58
61
  result[1] = x * (2*m + 1) * result[0]
@@ -68,7 +71,7 @@ class alm():
68
71
  result[l-m]*=self._limit_range
69
72
  ratio[l-m-1,0]+=self._log_limit_range
70
73
  ratio[l-m,0]+=self._log_limit_range
71
-
74
+
72
75
  return result*np.exp(ratio)*(np.sqrt(4*np.pi*(2*(np.arange(lmax-m+1)+m)+1))).reshape(lmax+1-m,1)
73
76
 
74
77
  def comp_tf(self,im,ph):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foscat
3
- Version: 3.3.3
3
+ Version: 3.3.4
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
File without changes