foscat 3.7.0__py3-none-any.whl → 3.7.2__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/FoCUS.py +4 -1
- foscat/backend.py +62 -10
- foscat/scat_cov.py +1851 -31
- foscat/scat_cov2D.py +65 -25
- {foscat-3.7.0.dist-info → foscat-3.7.2.dist-info}/METADATA +2 -2
- {foscat-3.7.0.dist-info → foscat-3.7.2.dist-info}/RECORD +9 -9
- {foscat-3.7.0.dist-info → foscat-3.7.2.dist-info}/WHEEL +1 -1
- /foscat-3.7.0.dist-info/LICENCE → /foscat-3.7.2.dist-info/LICENSE +0 -0
- {foscat-3.7.0.dist-info → foscat-3.7.2.dist-info}/top_level.txt +0 -0
foscat/scat_cov2D.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import foscat.scat_cov as scat
|
|
2
|
-
|
|
2
|
+
import numpy as np
|
|
3
3
|
|
|
4
4
|
class scat_cov2D:
|
|
5
5
|
def __init__(self, s0, s2, s3, s4, s1=None, s3p=None, backend=None):
|
|
@@ -48,31 +48,71 @@ class funct(scat.funct):
|
|
|
48
48
|
|
|
49
49
|
return spectrum_1d
|
|
50
50
|
|
|
51
|
-
def plot_results(self,in_image,out_image,vmin=None,vmax=None,cmap='coolwarm'):
|
|
51
|
+
def plot_results(self,in_image,out_image,vmin=None,vmax=None,cmap='coolwarm',spec_range=None):
|
|
52
52
|
import matplotlib.pyplot as plt
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
54
|
+
if len(out_image.shape)>2:
|
|
55
|
+
nimage=out_image.shape[0]
|
|
56
|
+
ndraw=np.min([3,nimage])
|
|
57
|
+
plt.figure(figsize=(16,12))
|
|
58
|
+
plt.subplot(2,ndraw+1,1)
|
|
59
|
+
plt.title('Original field')
|
|
60
|
+
plt.imshow(in_image,cmap=cmap,vmin=vmin,vmax=vmax,origin='lower')
|
|
61
|
+
plt.xticks([])
|
|
62
|
+
plt.yticks([])
|
|
63
|
+
for k in range(ndraw):
|
|
64
|
+
plt.subplot(2,ndraw+1,2+k)
|
|
65
|
+
plt.title('Modeled field #%d'%(k))
|
|
66
|
+
plt.imshow(out_image[k],cmap=cmap,vmin=vmin,vmax=vmax,origin='lower')
|
|
67
|
+
plt.xticks([])
|
|
68
|
+
plt.yticks([])
|
|
69
|
+
plt.subplot(2,2,3)
|
|
70
|
+
plt.title('Histogram')
|
|
71
|
+
for k in range(nimage):
|
|
72
|
+
if k==0:
|
|
73
|
+
plt.hist(out_image[k].flatten(),bins=100,label='modeled',color='b',histtype='step',log=True,alpha=0.5)
|
|
74
|
+
else:
|
|
75
|
+
plt.hist(out_image[k].flatten(),bins=100,color='b',histtype='step',log=True,alpha=0.5)
|
|
76
|
+
plt.hist(in_image.flatten(),bins=100,label='original',color='r',histtype='step',log=True)
|
|
77
|
+
plt.legend(frameon=0)
|
|
78
|
+
plt.subplot(2,2,4)
|
|
79
|
+
plt.title('Powerspectra')
|
|
80
|
+
for k in range(nimage):
|
|
81
|
+
if k==0:
|
|
82
|
+
plt.plot(self.spectrum(out_image[k]),color='b',label='modeled',alpha=0.5)
|
|
83
|
+
else:
|
|
84
|
+
plt.plot(self.spectrum(out_image[k]),color='b',alpha=0.5)
|
|
85
|
+
plt.plot(self.spectrum(in_image),color='r',label='original')
|
|
86
|
+
plt.xscale('log')
|
|
87
|
+
plt.yscale('log')
|
|
88
|
+
plt.legend(frameon=0)
|
|
89
|
+
if spec_range is not None:
|
|
90
|
+
plt.ylim(spec_range[0],spec_range[1])
|
|
91
|
+
else:
|
|
92
|
+
plt.figure(figsize=(16,3))
|
|
93
|
+
plt.subplot(1,4,1)
|
|
94
|
+
plt.title('Original field')
|
|
95
|
+
plt.imshow(in_image,cmap=cmap,vmin=vmin,vmax=vmax,origin='lower')
|
|
96
|
+
plt.xticks([])
|
|
97
|
+
plt.yticks([])
|
|
98
|
+
plt.subplot(1,4,2)
|
|
99
|
+
plt.title('Modeled field')
|
|
100
|
+
plt.imshow(out_image,cmap=cmap,vmin=vmin,vmax=vmax,origin='lower')
|
|
101
|
+
plt.xticks([])
|
|
102
|
+
plt.yticks([])
|
|
103
|
+
plt.subplot(1,4,3)
|
|
104
|
+
plt.title('Histogram')
|
|
105
|
+
plt.hist(in_image.flatten(),bins=100,label='original',color='r',histtype='step',log=True)
|
|
106
|
+
plt.hist(out_image.flatten(),bins=100,label='modeled',color='b',histtype='step',log=True)
|
|
107
|
+
plt.legend(frameon=0)
|
|
108
|
+
plt.subplot(1,4,4)
|
|
109
|
+
plt.title('Powerspectra')
|
|
110
|
+
plt.plot(self.spectrum(in_image),color='b',label='original')
|
|
111
|
+
plt.plot(self.spectrum(out_image),color='r',label='modeled')
|
|
112
|
+
plt.xscale('log')
|
|
113
|
+
plt.yscale('log')
|
|
114
|
+
if spec_range is not None:
|
|
115
|
+
plt.ylim(spec_range[0],spec_range[1])
|
|
116
|
+
plt.legend(frameon=0)
|
|
77
117
|
|
|
78
118
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: foscat
|
|
3
|
-
Version: 3.7.
|
|
3
|
+
Version: 3.7.2
|
|
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>
|
|
@@ -18,7 +18,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
19
|
Requires-Python: >=3.9
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
|
-
License-File:
|
|
21
|
+
License-File: LICENSE
|
|
22
22
|
Requires-Dist: imageio
|
|
23
23
|
Requires-Dist: imagecodecs
|
|
24
24
|
Requires-Dist: matplotlib
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
foscat/CNN.py,sha256=j0F2a4Xf3LijhyD_WVZ6Eg_IjGuXw3ddH6Iudj1xVaw,4874
|
|
2
2
|
foscat/CircSpline.py,sha256=CXi49FxF8ZoeZ17Ua8c1AZXe2B5ICEC9aCXb97atB3s,4028
|
|
3
|
-
foscat/FoCUS.py,sha256=
|
|
3
|
+
foscat/FoCUS.py,sha256=DaK1YwUVwMwJikG676kp_OGWRxfytVlxU6f0bbjxCvs,102659
|
|
4
4
|
foscat/GCNN.py,sha256=5RV-FKuvqbD-k99TwiM4CttM2LMZE21WD0IK0j5Mkko,7599
|
|
5
5
|
foscat/Softmax.py,sha256=aBLQauoG0q2SJYPotV6U-cxAhsJcspWHNRWdnA_nAiQ,2854
|
|
6
6
|
foscat/Spline1D.py,sha256=rKzzenduaZZ-yBDJd35it6Gyrj1spqb7hoIaUgISPzY,2983
|
|
7
7
|
foscat/Synthesis.py,sha256=3oL-WIwOzjO6jYn-7J3TfAQSiPaQTqGtrmxcGBh1Gvs,13787
|
|
8
8
|
foscat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
foscat/alm.py,sha256=PaAaq82CH3JzH520eQpqTCivxE4VeJmmc6I_9HXIhcA,32480
|
|
10
|
-
foscat/backend.py,sha256=
|
|
10
|
+
foscat/backend.py,sha256=P_NmxrK8jMRgYMA8Qinpw-7QJcXcB4qt64Ya3cAD1Dg,45317
|
|
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=
|
|
17
|
+
foscat/scat_cov.py,sha256=3q2rBhcgXGIhW30kSUb5LkfC_1wk_OypphlIPBTzEsE,241234
|
|
18
18
|
foscat/scat_cov1D.py,sha256=XOxsZZ5TYq8f34i2tUgIfzyaqaTDlICB3HzD2l_puro,531
|
|
19
|
-
foscat/scat_cov2D.py,sha256=
|
|
19
|
+
foscat/scat_cov2D.py,sha256=HVYBNtpZgRlz6OOm0LwG_w8Q4Kld4Qc1n6XYeGoxIug,4802
|
|
20
20
|
foscat/scat_cov_map.py,sha256=Swt39-nYEaQkBzyX4EOAQBvUuYQpERzJ-uVxSWS2b-Y,2911
|
|
21
21
|
foscat/scat_cov_map2D.py,sha256=FqF45FBcoiQbvuVsrLWUIPRUc95GsKsrnH6fKzB3GlE,2841
|
|
22
|
-
foscat-3.7.
|
|
23
|
-
foscat-3.7.
|
|
24
|
-
foscat-3.7.
|
|
25
|
-
foscat-3.7.
|
|
26
|
-
foscat-3.7.
|
|
22
|
+
foscat-3.7.2.dist-info/LICENSE,sha256=i0ukIr8ZUpkSY2sZaE9XZK-6vuSU5iG6IgX_3pjatP8,1505
|
|
23
|
+
foscat-3.7.2.dist-info/METADATA,sha256=xVWiNu2F2NbJVh96gwtH7Hv4Q_UZd1WQvRxwcAYBlSk,7216
|
|
24
|
+
foscat-3.7.2.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
|
25
|
+
foscat-3.7.2.dist-info/top_level.txt,sha256=AGySXBBAlJgb8Tj8af6m_F-aiNg2zNTcybCUPVOKjAg,7
|
|
26
|
+
foscat-3.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|