foscat 2025.8.3__tar.gz → 2025.8.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.
- {foscat-2025.8.3/src/foscat.egg-info → foscat-2025.8.4}/PKG-INFO +1 -1
- {foscat-2025.8.3 → foscat-2025.8.4}/pyproject.toml +1 -1
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/FoCUS.py +5 -3
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat_cov.py +41 -29
- {foscat-2025.8.3 → foscat-2025.8.4/src/foscat.egg-info}/PKG-INFO +1 -1
- {foscat-2025.8.3 → foscat-2025.8.4}/LICENSE +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/README.md +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/setup.cfg +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/BkBase.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/BkNumpy.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/BkTensorflow.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/BkTorch.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/CNN.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/CircSpline.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/GCNN.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/HOrientedConvol.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/HealSpline.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/Softmax.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/Spline1D.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/Synthesis.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/UNET.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/__init__.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/alm.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/backend.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/backend_tens.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/heal_NN.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/loss_backend_tens.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/loss_backend_torch.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat1D.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat2D.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat_cov1D.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat_cov2D.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat_cov_map.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat/scat_cov_map2D.py +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat.egg-info/SOURCES.txt +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat.egg-info/dependency_links.txt +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/src/foscat.egg-info/requires.txt +0 -0
- {foscat-2025.8.3 → foscat-2025.8.4}/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.8.
|
|
3
|
+
Version: 2025.8.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>
|
|
@@ -36,7 +36,7 @@ class FoCUS:
|
|
|
36
36
|
mpi_rank=0
|
|
37
37
|
):
|
|
38
38
|
|
|
39
|
-
self.__version__ = "2025.08.
|
|
39
|
+
self.__version__ = "2025.08.4"
|
|
40
40
|
# P00 coeff for normalization for scat_cov
|
|
41
41
|
self.TMPFILE_VERSION = TMPFILE_VERSION
|
|
42
42
|
self.P1_dic = None
|
|
@@ -2380,9 +2380,11 @@ class FoCUS:
|
|
|
2380
2380
|
res = v1 / vh
|
|
2381
2381
|
|
|
2382
2382
|
oshape = [x.shape[0]] + [mask.shape[0]]
|
|
2383
|
-
if len(x.shape)>
|
|
2383
|
+
if len(x.shape) > 3:
|
|
2384
2384
|
oshape = oshape + list(x.shape[1:-2])
|
|
2385
|
-
|
|
2385
|
+
else:
|
|
2386
|
+
oshape = oshape + [1]
|
|
2387
|
+
|
|
2386
2388
|
if calc_var:
|
|
2387
2389
|
if self.backend.bk_is_complex(vtmp):
|
|
2388
2390
|
res2 = self.backend.bk_sqrt(
|
|
@@ -2763,34 +2763,6 @@ class funct(FOC.FoCUS):
|
|
|
2763
2763
|
|
|
2764
2764
|
nside = nside * 2
|
|
2765
2765
|
|
|
2766
|
-
if self.KERNELSZ > 5 and not self.use_2D:
|
|
2767
|
-
# if the kernel size is bigger than 3 increase the binning before smoothing
|
|
2768
|
-
if self.use_2D:
|
|
2769
|
-
vmask = self.up_grade(
|
|
2770
|
-
vmask, I1.shape[-2] * 2, nouty=I1.shape[-1] * 2,axis=-2
|
|
2771
|
-
)
|
|
2772
|
-
I1 = self.up_grade(
|
|
2773
|
-
I1, I1.shape[-2] * 2, nouty=I1.shape[-1] * 2,axis=-2
|
|
2774
|
-
)
|
|
2775
|
-
if cross:
|
|
2776
|
-
I2 = self.up_grade(
|
|
2777
|
-
I2,
|
|
2778
|
-
I2.shape[-2] * 2,
|
|
2779
|
-
nouty=I2.shape[-1] * 2,axis=-2
|
|
2780
|
-
)
|
|
2781
|
-
elif self.use_1D:
|
|
2782
|
-
vmask = self.up_grade(vmask, I1.shape[-1] * 2)
|
|
2783
|
-
I1 = self.up_grade(I1, I1.shape[-1] * 2)
|
|
2784
|
-
if cross:
|
|
2785
|
-
I2 = self.up_grade(I2, I2.shape[-1] * 2)
|
|
2786
|
-
nside = nside * 2
|
|
2787
|
-
else:
|
|
2788
|
-
I1 = self.up_grade(I1, nside * 2)
|
|
2789
|
-
vmask = self.up_grade(vmask, nside * 2)
|
|
2790
|
-
if cross:
|
|
2791
|
-
I2 = self.up_grade(I2, nside * 2)
|
|
2792
|
-
nside = nside * 2
|
|
2793
|
-
|
|
2794
2766
|
# Normalize the masks because they have different pixel numbers
|
|
2795
2767
|
# vmask /= self.backend.bk_reduce_sum(vmask, axis=1)[:, None] # [Nmask, Npix]
|
|
2796
2768
|
|
|
@@ -4123,6 +4095,7 @@ class funct(FOC.FoCUS):
|
|
|
4123
4095
|
get_variance=False,
|
|
4124
4096
|
ref_sigma=None,
|
|
4125
4097
|
iso_ang=False,
|
|
4098
|
+
return_table=False,
|
|
4126
4099
|
):
|
|
4127
4100
|
"""
|
|
4128
4101
|
Calculates the scattering correlations for a batch of images, including:
|
|
@@ -4257,7 +4230,7 @@ class funct(FOC.FoCUS):
|
|
|
4257
4230
|
)
|
|
4258
4231
|
print("\n\n==========")
|
|
4259
4232
|
J = Jmax # Number of steps for the loop on scales
|
|
4260
|
-
|
|
4233
|
+
|
|
4261
4234
|
L = self.NORIENT
|
|
4262
4235
|
norm_factor_S3 = 1.0
|
|
4263
4236
|
|
|
@@ -4826,6 +4799,12 @@ class funct(FOC.FoCUS):
|
|
|
4826
4799
|
if data2 is None:
|
|
4827
4800
|
if iso_ang:
|
|
4828
4801
|
if ref_sigma is not None:
|
|
4802
|
+
if return_table:
|
|
4803
|
+
return (S1_iso / ref_sigma["S1_sigma"]), \
|
|
4804
|
+
(S2_iso / ref_sigma["S2_sigma"]) , \
|
|
4805
|
+
(S3_iso / ref_sigma["S3_sigma"]) , \
|
|
4806
|
+
(S4_iso / ref_sigma["S4_sigma"])
|
|
4807
|
+
|
|
4829
4808
|
for_synthesis = self.backend.backend.cat(
|
|
4830
4809
|
(
|
|
4831
4810
|
mean_data / ref_sigma["std_data"],
|
|
@@ -4852,6 +4831,9 @@ class funct(FOC.FoCUS):
|
|
|
4852
4831
|
dim=-1,
|
|
4853
4832
|
)
|
|
4854
4833
|
else:
|
|
4834
|
+
if return_table:
|
|
4835
|
+
return S1_iso,S2_iso,S3_iso,S4_iso
|
|
4836
|
+
|
|
4855
4837
|
for_synthesis = self.backend.backend.cat(
|
|
4856
4838
|
(
|
|
4857
4839
|
mean_data / std_data,
|
|
@@ -4867,6 +4849,12 @@ class funct(FOC.FoCUS):
|
|
|
4867
4849
|
)
|
|
4868
4850
|
else:
|
|
4869
4851
|
if ref_sigma is not None:
|
|
4852
|
+
if return_table:
|
|
4853
|
+
return (S1 / ref_sigma["S1_sigma"]), \
|
|
4854
|
+
(S2 / ref_sigma["S2_sigma"]), \
|
|
4855
|
+
(S3 / ref_sigma["S3_sigma"]), \
|
|
4856
|
+
(S4 / ref_sigma["S4_sigma"])
|
|
4857
|
+
|
|
4870
4858
|
for_synthesis = self.backend.backend.cat(
|
|
4871
4859
|
(
|
|
4872
4860
|
mean_data / ref_sigma["std_data"],
|
|
@@ -4893,6 +4881,9 @@ class funct(FOC.FoCUS):
|
|
|
4893
4881
|
dim=-1,
|
|
4894
4882
|
)
|
|
4895
4883
|
else:
|
|
4884
|
+
if return_table:
|
|
4885
|
+
return S1,S2,S3,S4
|
|
4886
|
+
|
|
4896
4887
|
for_synthesis = self.backend.backend.cat(
|
|
4897
4888
|
(
|
|
4898
4889
|
mean_data / std_data,
|
|
@@ -4909,6 +4900,12 @@ class funct(FOC.FoCUS):
|
|
|
4909
4900
|
else:
|
|
4910
4901
|
if iso_ang:
|
|
4911
4902
|
if ref_sigma is not None:
|
|
4903
|
+
if return_table:
|
|
4904
|
+
return (S1_iso / ref_sigma["S1_sigma"]), \
|
|
4905
|
+
(S2_iso / ref_sigma["S2_sigma"]), \
|
|
4906
|
+
(S3_iso / ref_sigma["S3_sigma"]), \
|
|
4907
|
+
(S4_iso / ref_sigma["S4_sigma"])
|
|
4908
|
+
|
|
4912
4909
|
for_synthesis = self.backend.backend.cat(
|
|
4913
4910
|
(
|
|
4914
4911
|
mean_data / ref_sigma["std_data"],
|
|
@@ -4937,6 +4934,9 @@ class funct(FOC.FoCUS):
|
|
|
4937
4934
|
dim=-1,
|
|
4938
4935
|
)
|
|
4939
4936
|
else:
|
|
4937
|
+
if return_table:
|
|
4938
|
+
return S1_iso,S2_iso,S3_iso,S4_iso
|
|
4939
|
+
|
|
4940
4940
|
for_synthesis = self.backend.backend.cat(
|
|
4941
4941
|
(
|
|
4942
4942
|
mean_data / std_data,
|
|
@@ -4954,6 +4954,12 @@ class funct(FOC.FoCUS):
|
|
|
4954
4954
|
)
|
|
4955
4955
|
else:
|
|
4956
4956
|
if ref_sigma is not None:
|
|
4957
|
+
if return_table:
|
|
4958
|
+
return (S1 / ref_sigma["S1_sigma"]), \
|
|
4959
|
+
(S2 / ref_sigma["S2_sigma"]), \
|
|
4960
|
+
(S3 / ref_sigma["S3_sigma"]), \
|
|
4961
|
+
(S4 / ref_sigma["S4_sigma"])
|
|
4962
|
+
|
|
4957
4963
|
for_synthesis = self.backend.backend.cat(
|
|
4958
4964
|
(
|
|
4959
4965
|
mean_data / ref_sigma["std_data"],
|
|
@@ -4982,6 +4988,9 @@ class funct(FOC.FoCUS):
|
|
|
4982
4988
|
dim=-1,
|
|
4983
4989
|
)
|
|
4984
4990
|
else:
|
|
4991
|
+
if return_table:
|
|
4992
|
+
return S1,S2,S3,S4
|
|
4993
|
+
|
|
4985
4994
|
for_synthesis = self.backend.backend.cat(
|
|
4986
4995
|
(
|
|
4987
4996
|
mean_data / std_data,
|
|
@@ -6684,6 +6693,9 @@ class funct(FOC.FoCUS):
|
|
|
6684
6693
|
grd_mask=l_grd_mask[k],
|
|
6685
6694
|
)
|
|
6686
6695
|
|
|
6696
|
+
if not self.use_2D:
|
|
6697
|
+
self.clean_norm()
|
|
6698
|
+
|
|
6687
6699
|
t2 = time.time()
|
|
6688
6700
|
print("Total computation %.2fs" % (t2 - t1))
|
|
6689
6701
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: foscat
|
|
3
|
-
Version: 2025.8.
|
|
3
|
+
Version: 2025.8.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
|
|
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
|