foscat 2025.3.0__tar.gz → 2025.5.0__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.
- {foscat-2025.3.0/src/foscat.egg-info → foscat-2025.5.0}/PKG-INFO +1 -1
- {foscat-2025.3.0 → foscat-2025.5.0}/pyproject.toml +1 -1
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/BkBase.py +9 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/FoCUS.py +1 -1
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat_cov.py +25 -9
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat_cov_map.py +0 -2
- {foscat-2025.3.0 → foscat-2025.5.0/src/foscat.egg-info}/PKG-INFO +1 -1
- {foscat-2025.3.0 → foscat-2025.5.0}/LICENSE +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/README.md +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/setup.cfg +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/BkNumpy.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/BkTensorflow.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/BkTorch.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/CNN.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/CircSpline.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/GCNN.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/Softmax.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/Spline1D.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/Synthesis.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/__init__.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/alm.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/backend.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/backend_tens.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/loss_backend_tens.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/loss_backend_torch.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat1D.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat2D.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat_cov1D.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat_cov2D.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat/scat_cov_map2D.py +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat.egg-info/SOURCES.txt +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat.egg-info/dependency_links.txt +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/src/foscat.egg-info/requires.txt +0 -0
- {foscat-2025.3.0 → foscat-2025.5.0}/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: 2025.
|
|
3
|
+
Version: 2025.5.0
|
|
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>
|
|
@@ -23,6 +23,15 @@ class BackendBase:
|
|
|
23
23
|
self._fft_3_orient = {}
|
|
24
24
|
self._fft_3_orient_C = {}
|
|
25
25
|
|
|
26
|
+
def to_dict(self):
|
|
27
|
+
return {
|
|
28
|
+
"name": self.BACKEND,
|
|
29
|
+
"mpi_rank": self.mpi_rank,
|
|
30
|
+
"all_type": self.all_type,
|
|
31
|
+
"gpupos": self.gpupos,
|
|
32
|
+
"silent": self.silent,
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
def iso_mean(self, x, use_2D=False):
|
|
27
36
|
shape = list(x.shape)
|
|
28
37
|
|
|
@@ -3037,12 +3037,13 @@ class funct(FOC.FoCUS):
|
|
|
3037
3037
|
)
|
|
3038
3038
|
S2[j3] = s2
|
|
3039
3039
|
else:
|
|
3040
|
-
### Normalize S2_cross
|
|
3041
|
-
if norm == "auto":
|
|
3042
|
-
s2 /= (P1_dic[j3] * P2_dic[j3]) ** 0.5
|
|
3043
3040
|
|
|
3044
3041
|
### Store S2_cross as complex [Nbatch, Nmask, NS2, Norient3]
|
|
3045
3042
|
s2 = self.backend.bk_real(s2)
|
|
3043
|
+
|
|
3044
|
+
### Normalize S2_cross
|
|
3045
|
+
if norm == "auto":
|
|
3046
|
+
s2 /= (P1_dic[j3] * P2_dic[j3]) ** 0.5
|
|
3046
3047
|
|
|
3047
3048
|
S2.append(
|
|
3048
3049
|
self.backend.bk_expand_dims(s2, off_S2)
|
|
@@ -6045,13 +6046,12 @@ class funct(FOC.FoCUS):
|
|
|
6045
6046
|
image2=None,
|
|
6046
6047
|
mask=None,
|
|
6047
6048
|
norm=None,
|
|
6048
|
-
Auto=True,
|
|
6049
6049
|
cmat=None,
|
|
6050
6050
|
cmat2=None,
|
|
6051
6051
|
):
|
|
6052
6052
|
|
|
6053
6053
|
res = self.eval(
|
|
6054
|
-
image1, image2=image2, mask=mask,
|
|
6054
|
+
image1, image2=image2, mask=mask, cmat=cmat, cmat2=cmat2
|
|
6055
6055
|
)
|
|
6056
6056
|
return res.S0, res.S2, res.S1, res.S3, res.S4, res.S3P
|
|
6057
6057
|
|
|
@@ -6061,12 +6061,11 @@ class funct(FOC.FoCUS):
|
|
|
6061
6061
|
image2=None,
|
|
6062
6062
|
mask=None,
|
|
6063
6063
|
norm=None,
|
|
6064
|
-
Auto=True,
|
|
6065
6064
|
cmat=None,
|
|
6066
6065
|
cmat2=None,
|
|
6067
6066
|
):
|
|
6068
6067
|
s0, s2, s1, s3, s4, s3p = self.eval_comp_fast(
|
|
6069
|
-
image1, image2=image2, mask=mask,
|
|
6068
|
+
image1, image2=image2, mask=mask, cmat=cmat, cmat2=cmat2
|
|
6070
6069
|
)
|
|
6071
6070
|
return scat_cov(
|
|
6072
6071
|
s0, s2, s3, s4, s1=s1, s3p=s3p, backend=self.backend, use_1D=self.use_1D
|
|
@@ -6102,6 +6101,15 @@ class funct(FOC.FoCUS):
|
|
|
6102
6101
|
if edge:
|
|
6103
6102
|
self.purge_edge_mask()
|
|
6104
6103
|
|
|
6104
|
+
def The_loss_ref_image(u, scat_operator, args):
|
|
6105
|
+
input_image = args[0]
|
|
6106
|
+
mask = args[1]
|
|
6107
|
+
|
|
6108
|
+
loss = 1E-3*scat_operator.backend.bk_reduce_mean(
|
|
6109
|
+
scat_operator.backend.bk_square(mask*(input_image - u))
|
|
6110
|
+
)
|
|
6111
|
+
return loss
|
|
6112
|
+
|
|
6105
6113
|
def The_loss(u, scat_operator, args):
|
|
6106
6114
|
ref = args[0]
|
|
6107
6115
|
sref = args[1]
|
|
@@ -6338,8 +6346,16 @@ class funct(FOC.FoCUS):
|
|
|
6338
6346
|
loss = synthe.Loss(
|
|
6339
6347
|
The_lossX, self, ref, sref, use_variance, l_ref[k], l_jmax[k]
|
|
6340
6348
|
)
|
|
6341
|
-
|
|
6342
|
-
|
|
6349
|
+
|
|
6350
|
+
if input_image is not None:
|
|
6351
|
+
# define a loss to minimize
|
|
6352
|
+
loss_input = synthe.Loss(The_loss_ref_image, self,
|
|
6353
|
+
self.backend.bk_cast(l_input_image[k]),
|
|
6354
|
+
self.backend.bk_cast(l_in_mask[k]))
|
|
6355
|
+
|
|
6356
|
+
sy = synthe.Synthesis([loss]) #,loss_input])
|
|
6357
|
+
else:
|
|
6358
|
+
sy = synthe.Synthesis([loss])
|
|
6343
6359
|
|
|
6344
6360
|
# initialize the synthesised map
|
|
6345
6361
|
if self.use_2D:
|
|
@@ -29,7 +29,6 @@ class funct(scat.funct):
|
|
|
29
29
|
image2=None,
|
|
30
30
|
mask=None,
|
|
31
31
|
norm=None,
|
|
32
|
-
Auto=True,
|
|
33
32
|
calc_var=False,
|
|
34
33
|
out_nside=None,
|
|
35
34
|
):
|
|
@@ -38,7 +37,6 @@ class funct(scat.funct):
|
|
|
38
37
|
image2=image2,
|
|
39
38
|
mask=mask,
|
|
40
39
|
norm=norm,
|
|
41
|
-
Auto=Auto,
|
|
42
40
|
calc_var=calc_var,
|
|
43
41
|
out_nside=out_nside,
|
|
44
42
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: foscat
|
|
3
|
-
Version: 2025.
|
|
3
|
+
Version: 2025.5.0
|
|
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
|
|
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
|