foscat 3.1.6__py3-none-any.whl → 3.3.0__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/scat_cov1D.py CHANGED
@@ -1,16 +1,18 @@
1
1
  import foscat.scat_cov as scat
2
2
 
3
+
3
4
  class scat_cov1D:
4
- def __init__(self,p00,s0,s1,s2,s2l,j1,j2,cross=False,backend=None):
5
+ def __init__(self, s0, s2, s3, s4, s1=None, s3p=None, backend=None):
5
6
 
6
- the_scat=scat(P00, C01, C11, s1=S1, c10=C10,backend=self.backend)
7
- the_scat.set_bk_type('SCAT_COV1D')
7
+ the_scat = scat(s0, s2, s3, s4, s1=s1, s3p=s3p, backend=self.backend)
8
+ the_scat.set_bk_type("SCAT_COV1D")
8
9
  return the_scat
9
-
10
- def fill(self,im,nullval=0):
11
- return self.fill_1d(im,nullval=nullval)
10
+
11
+ def fill(self, im, nullval=0):
12
+ return self.fill_1d(im, nullval=nullval)
13
+
12
14
 
13
15
  class funct(scat.funct):
14
16
  def __init__(self, *args, **kwargs):
15
17
  # Impose que use_2D=True pour la classe scat
16
- super(funct, self).__init__(use_1D=True, *args, **kwargs)
18
+ super().__init__(use_1D=True, *args, **kwargs)
foscat/scat_cov2D.py CHANGED
@@ -1,16 +1,18 @@
1
1
  import foscat.scat_cov as scat
2
2
 
3
+
3
4
  class scat_cov2D:
4
- def __init__(self,p00,s0,s1,s2,s2l,j1,j2,cross=False,backend=None):
5
+ def __init__(self, s0, s2, s3, s4, s1=None, s3p=None, backend=None):
5
6
 
6
- the_scat=scat(P00, C01, C11, s1=S1, c10=C10,backend=self.backend)
7
- the_scat.set_bk_type('SCAT_COV2D')
7
+ the_scat = scat(s0, s2, s3, s4, s1=s1, s3p=s3p, backend=self.backend)
8
+ the_scat.set_bk_type("SCAT_COV2D")
8
9
  return the_scat
9
-
10
- def fill(self,im,nullval=0):
11
- return self.fill_2d(im,nullval=nullval)
10
+
11
+ def fill(self, im, nullval=0):
12
+ return self.fill_2d(im, nullval=nullval)
13
+
12
14
 
13
15
  class funct(scat.funct):
14
16
  def __init__(self, *args, **kwargs):
15
17
  # Impose que use_2D=True pour la classe scat
16
- super(funct, self).__init__(use_2D=True, *args, **kwargs)
18
+ super().__init__(use_2D=True, *args, **kwargs)
foscat/scat_cov_map.py CHANGED
@@ -1,67 +1,93 @@
1
- import foscat.scat_cov as scat
2
1
  import healpy as hp
3
2
 
4
3
  import foscat.scat_cov as scat
5
4
 
5
+
6
6
  class scat_cov_map(scat.funct):
7
- def __init__(self,P00,S0,C01,C11,S1=None,C10=None,backend=None):
7
+ def __init__(self, S2, S0, S3, S4, S1=None, S3P=None, backend=None):
8
+
9
+ self.S2 = S2
10
+ self.S0 = S0
11
+ self.S1 = S1
12
+ self.S3 = S3
13
+ self.S3P = S3P
14
+ self.S4 = S4
15
+ self.backend = backend
16
+ self.bk_type = "SCAT_COV_MAP2D"
17
+
18
+ def fill(self, im, nullval=hp.UNSEEN):
19
+ return self.fill_healpy(im, nullval=nullval)
8
20
 
9
- self.P00=P00
10
- self.S0=S0
11
- self.S1=S1
12
- self.C01=C01
13
- self.C10=C10
14
- self.C11=C11
15
- self.backend=backend
16
- self.bk_type='SCAT_COV_MAP2D'
17
-
18
- def fill(self,im,nullval=hp.UNSEEN):
19
- return self.fill_healpy(im,nullval=nullval)
20
21
 
21
-
22
22
  class funct(scat.funct):
23
23
  def __init__(self, *args, **kwargs):
24
- super(funct, self).__init__(return_data=True, *args, **kwargs)
24
+ super().__init__(return_data=True, *args, **kwargs)
25
25
 
26
- def eval(self, image1, image2=None, mask=None, norm=None, Auto=True, calc_var=False):
27
- r=super(funct, self).eval(image1, image2=image2, mask=mask, norm=norm, Auto=Auto, calc_var=calc_var)
28
- return scat_cov_map(r.P00,r.S0,r.C01,r.C11,S1=r.S1,C10=r.C10,backend=r.backend)
26
+ def eval(
27
+ self, image1, image2=None, mask=None, norm=None, Auto=True, calc_var=False
28
+ ):
29
+ r = super().eval(
30
+ image1, image2=image2, mask=mask, norm=norm, Auto=Auto, calc_var=calc_var
31
+ )
32
+ return scat_cov_map(
33
+ r.S2, r.S0, r.S3, r.S4, S1=r.S1, S3P=r.S3P, backend=r.backend
34
+ )
29
35
 
30
- def scat_coeffs_apply(self, scat, method, no_order_1=False,no_order_2=False,no_order_3=False):
31
- for j in scat.P00:
32
- if no_order_1==False:
33
- scat.P00[j] = method(scat.P00[j])
36
+ def scat_coeffs_apply(
37
+ self, scat, method, no_order_1=False, no_order_2=False, no_order_3=False
38
+ ):
39
+ for j in scat.S2:
40
+ if not no_order_1:
41
+ scat.S2[j] = method(scat.S2[j])
34
42
  if scat.S1 is not None:
35
43
  scat.S1[j] = method(scat.S1[j])
36
-
37
- if no_order_2==False:
38
- for n1 in scat.C01[j]:
39
- scat.C01[j][n1] = method(scat.C01[j][n1])
40
44
 
41
- if scat.C10 is not None:
42
- for n1 in scat.C10[j]:
43
- scat.C10[j][n1] = method(scat.C10[j][n1])
45
+ if not no_order_2:
46
+ for n1 in scat.S3[j]:
47
+ scat.S3[j][n1] = method(scat.S3[j][n1])
48
+
49
+ if scat.S3P is not None:
50
+ for n1 in scat.S3P[j]:
51
+ scat.S3P[j][n1] = method(scat.S3P[j][n1])
52
+
53
+ if not no_order_3:
54
+ for n1 in scat.S4[j]:
55
+ for n2 in scat.S4[j][n1]:
56
+ scat.S4[j][n1][n2] = method(scat.S4[j][n1][n2])
57
+
58
+ def scat_ud_grade_2(
59
+ self, scat, no_order_1=False, no_order_2=False, no_order_3=False
60
+ ):
61
+ self.scat_coeffs_apply(
62
+ scat,
63
+ lambda x: self.ud_grade_2(x, axis=1),
64
+ no_order_1=no_order_1,
65
+ no_order_2=no_order_2,
66
+ no_order_3=no_order_3,
67
+ )
44
68
 
45
- if no_order_3==False:
46
- for n1 in scat.C11[j]:
47
- for n2 in scat.C11[j][n1]:
48
- scat.C11[j][n1][n2] = method(scat.C11[j][n1][n2])
69
+ def iso_mean(self, scat, no_order_1=False, no_order_2=False, no_order_3=False):
70
+ self.scat_coeffs_apply(
71
+ scat,
72
+ lambda x: self.backend.iso_mean(x),
73
+ no_order_1=no_order_1,
74
+ no_order_2=no_order_2,
75
+ no_order_3=no_order_3,
76
+ )
49
77
 
50
- def scat_ud_grade_2(self,scat,no_order_1=False,no_order_2=False,no_order_3=False):
51
- self.scat_coeffs_apply(scat,lambda x: self.ud_grade_2(x, axis=1),
52
- no_order_1=no_order_1,
53
- no_order_2=no_order_2,
54
- no_order_3=no_order_3)
55
-
56
-
57
- def iso_mean(self,scat,no_order_1=False,no_order_2=False,no_order_3=False):
58
- self.scat_coeffs_apply(scat,lambda x: self.backend.iso_mean(x),
59
- no_order_1=no_order_1,
60
- no_order_2=no_order_2,
61
- no_order_3=no_order_3)
62
-
63
- def fft_ang(self,scat,nharm=1,imaginary=False,no_order_1=False,no_order_2=False,no_order_3=False):
64
- self.scat_coeffs_apply(scat,lambda x: self.backend.fft_ang(x,nharm=nharm,imaginary=imaginary),
65
- no_order_1=no_order_1,
66
- no_order_2=no_order_2,
67
- no_order_3=no_order_3)
78
+ def fft_ang(
79
+ self,
80
+ scat,
81
+ nharm=1,
82
+ imaginary=False,
83
+ no_order_1=False,
84
+ no_order_2=False,
85
+ no_order_3=False,
86
+ ):
87
+ self.scat_coeffs_apply(
88
+ scat,
89
+ lambda x: self.backend.fft_ang(x, nharm=nharm, imaginary=imaginary),
90
+ no_order_1=no_order_1,
91
+ no_order_2=no_order_2,
92
+ no_order_3=no_order_3,
93
+ )
foscat/scat_cov_map2D.py CHANGED
@@ -1,64 +1,94 @@
1
1
  import foscat.scat_cov as scat
2
2
 
3
+
3
4
  class scat_cov_map(scat.funct):
4
- def __init__(self,P00,S0,C01,C11,S1=None,C10=None,backend=None):
5
+ def __init__(self, S2, S0, S3, S4, S1=None, S3P=None, backend=None):
6
+
7
+ self.S2 = S2
8
+ self.S0 = S0
9
+ self.S1 = S1
10
+ self.S3 = S3
11
+ self.S3P = S3P
12
+ self.S4 = S4
13
+ self.backend = backend
14
+ self.bk_type = "SCAT_COV_MAP2D"
15
+
16
+ def fill(self, im, nullval=0):
17
+ return self.backend.fill_2d(im, nullval=nullval)
5
18
 
6
- self.P00=P00
7
- self.S0=S0
8
- self.S1=S1
9
- self.C01=C01
10
- self.C10=C10
11
- self.C11=C11
12
- self.backend=backend
13
- self.bk_type='SCAT_COV_MAP2D'
14
-
15
- def fill(self,im,nullval=0):
16
- return self.backend.fill_2d(im,nullval=nullval)
17
19
 
18
-
19
20
  class funct(scat.funct):
20
21
  def __init__(self, *args, **kwargs):
21
22
  # Impose que use_2D=True pour la classe scat
22
- super(funct, self).__init__(use_2D=True,return_data=True, *args, **kwargs)
23
+ super().__init__(use_2D=True, return_data=True, *args, **kwargs)
23
24
 
24
- def eval(self, image1, image2=None, mask=None, norm=None, Auto=True, calc_var=False):
25
- r=super(funct, self).eval(image1, image2=image2, mask=mask, norm=norm, Auto=Auto, calc_var=calc_var)
26
- return scat_cov_map(r.P00,r.S0,r.C01,r.C11,S1=r.S1,C10=r.C10,backend=r.backend)
25
+ def eval(
26
+ self, image1, image2=None, mask=None, norm=None, Auto=True, calc_var=False
27
+ ):
28
+ r = super().eval(
29
+ image1, image2=image2, mask=mask, norm=norm, Auto=Auto, calc_var=calc_var
30
+ )
31
+ return scat_cov_map(
32
+ r.S2, r.S0, r.S3, r.S4, S1=r.S1, S3P=r.S3P, backend=r.backend
33
+ )
27
34
 
28
- def scat_coeffs_apply(self, scat, method, no_order_1=False,no_order_2=False,no_order_3=False):
29
- for j in scat.P00:
30
- if no_order_1==False:
31
- scat.P00[j] = method(scat.P00[j])
35
+ def scat_coeffs_apply(
36
+ self, scat, method, no_order_1=False, no_order_2=False, no_order_3=False
37
+ ):
38
+ for j in scat.S2:
39
+ if not no_order_1:
40
+ scat.S2[j] = method(scat.S2[j])
32
41
  if scat.S1 is not None:
33
42
  scat.S1[j] = method(scat.S1[j])
34
-
35
- if no_order_2==False:
36
- for n1 in scat.C01[j]:
37
- scat.C01[j][n1] = method(scat.C01[j][n1])
38
43
 
39
- if scat.C10 is not None:
40
- for n1 in scat.C10[j]:
41
- scat.C10[j][n1] = method(scat.C10[j][n1])
44
+ if not no_order_2:
45
+ for n1 in scat.S3[j]:
46
+ scat.S3[j][n1] = method(scat.S3[j][n1])
47
+
48
+ if scat.S3P is not None:
49
+ for n1 in scat.S3P[j]:
50
+ scat.S3P[j][n1] = method(scat.S3P[j][n1])
51
+
52
+ if not no_order_3:
53
+ for n1 in scat.S4[j]:
54
+ for n2 in scat.S4[j][n1]:
55
+ scat.S4[j][n1][n2] = method(scat.S4[j][n1][n2])
56
+
57
+ def scat_ud_grade_2(
58
+ self, scat, no_order_1=False, no_order_2=False, no_order_3=False
59
+ ):
60
+ self.scat_coeffs_apply(
61
+ scat,
62
+ lambda x: self.ud_grade_2(x, axis=1),
63
+ no_order_1=no_order_1,
64
+ no_order_2=no_order_2,
65
+ no_order_3=no_order_3,
66
+ )
42
67
 
43
- if no_order_3==False:
44
- for n1 in scat.C11[j]:
45
- for n2 in scat.C11[j][n1]:
46
- scat.C11[j][n1][n2] = method(scat.C11[j][n1][n2])
68
+ def iso_mean(self, scat, no_order_1=False, no_order_2=False, no_order_3=False):
69
+ self.scat_coeffs_apply(
70
+ scat,
71
+ lambda x: self.backend.iso_mean(x, use_2D=True),
72
+ no_order_1=no_order_1,
73
+ no_order_2=no_order_2,
74
+ no_order_3=no_order_3,
75
+ )
47
76
 
48
- def scat_ud_grade_2(self,scat,no_order_1=False,no_order_2=False,no_order_3=False):
49
- self.scat_coeffs_apply(scat,lambda x: self.ud_grade_2(x, axis=1),
50
- no_order_1=no_order_1,
51
- no_order_2=no_order_2,
52
- no_order_3=no_order_3)
53
-
54
- def iso_mean(self,scat,no_order_1=False,no_order_2=False,no_order_3=False):
55
- self.scat_coeffs_apply(scat,lambda x: self.backend.iso_mean(x,use_2D=True),
56
- no_order_1=no_order_1,
57
- no_order_2=no_order_2,
58
- no_order_3=no_order_3)
59
-
60
- def fft_ang(self,scat,nharm=1,imaginary=False,no_order_1=False,no_order_2=False,no_order_3=False):
61
- self.scat_coeffs_apply(scat,lambda x: self.backend.fft_ang(x,use_2D=True,nharm=nharm,imaginary=imaginary),
62
- no_order_1=no_order_1,
63
- no_order_2=no_order_2,
64
- no_order_3=no_order_3)
77
+ def fft_ang(
78
+ self,
79
+ scat,
80
+ nharm=1,
81
+ imaginary=False,
82
+ no_order_1=False,
83
+ no_order_2=False,
84
+ no_order_3=False,
85
+ ):
86
+ self.scat_coeffs_apply(
87
+ scat,
88
+ lambda x: self.backend.fft_ang(
89
+ x, use_2D=True, nharm=nharm, imaginary=imaginary
90
+ ),
91
+ no_order_1=no_order_1,
92
+ no_order_2=no_order_2,
93
+ no_order_3=no_order_3,
94
+ )
@@ -0,0 +1,13 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2022, the Foscat developers All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6
+
7
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8
+
9
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
10
+
11
+ Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,183 @@
1
+ Metadata-Version: 2.1
2
+ Name: foscat
3
+ Version: 3.3.0
4
+ Summary: Generate synthetic Healpix or 2D data using Cross Scattering Transform
5
+ Author-email: Jean-Marc DELOUIS <jean.marc.delouis@ifremer.fr>
6
+ Maintainer-email: Theo Foulquier <theo.foulquier@ifremer.fr>
7
+ License: BSD-3-Clause
8
+ Project-URL: Repository, https://github.com/jmdelouis/FOSCAT.git
9
+ Project-URL: Issues, https://github.com/jmdelouis/FOSCAT/issues
10
+ Project-URL: Documentation, https://foscat-documentation.readthedocs.io/en/latest/index.html
11
+ Keywords: scattering transform,component separation,denoising
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENCE
22
+ Requires-Dist: imageio
23
+ Requires-Dist: imagecodecs
24
+ Requires-Dist: matplotlib
25
+ Requires-Dist: numpy
26
+ Requires-Dist: tensorflow
27
+ Requires-Dist: healpy
28
+
29
+ # foscat
30
+
31
+ [![Read the Docs](https://readthedocs.org/projects/foscat-documentation/badge/?version=latest)](https://foscat-documentation.readthedocs.io/en/latest)
32
+
33
+ A python package dedicated to image component separation based on scattering transform analysis designed for high performance computing.
34
+
35
+ ## the concept
36
+
37
+ The foscat genesis has been built to synthesise data (2D or Healpix) using Cross Scattering Transform. For a detailed method description please refer to https://arxiv.org/abs/2207.12527. This algorithm could be effectively usable for component separation (e.g. denoising).
38
+
39
+ A demo package for this process can be found at https://github.com/jmdelouis/FOSCAT_DEMO.
40
+
41
+ ## usage
42
+
43
+ # Short tutorial
44
+
45
+ https://github.com/IAOCEA/demo-foscat-pangeo-eosc/blob/main/Demo_Synthesis.ipynb
46
+
47
+ # FOSCAT_DEMO
48
+
49
+ The python scripts _demo.py_ included in this package demonstrate how to use the foscat library to generate synthetic fields that have patterns with the same statistical properties as a specified image.
50
+
51
+ # Install foscat library
52
+
53
+ Before installing, make sure you have python installed in your enviroment.
54
+ The last version of the foscat library can be installed using PyPi:
55
+
56
+ ```
57
+ pip install foscat
58
+ ```
59
+
60
+ Load the FOSCAT_DEMO package from github.
61
+
62
+ ```
63
+ git clone https://github.com/jmdelouis/FOSCAT_DEMO.git
64
+ ```
65
+
66
+ ## Recommended installing procedures for mac users
67
+
68
+ It is recomended to use python=3.9\*.
69
+
70
+ ```
71
+ micromamba create -n FOSCAT
72
+ micromamba install -n FOSCAT ‘python==3.9*’
73
+ micromamba activate FOSCAT
74
+ pip install foscat
75
+ git clone https://github.com/jmdelouis/FOSCAT_DEMO.git
76
+
77
+ ```
78
+
79
+ ## Recommended installing procedures HPC users
80
+
81
+ It is recomended to install tensorflow in advance. For [DATARMOR](https://pcdm.ifremer.fr/Equipement) for using GPU ;
82
+
83
+ ```
84
+ micromamba create -n FOSCAT
85
+ micromamba install -n FOSCAT ‘python==3.9*’
86
+ micromamba install -n FOSCAT ‘tensorflow==2.11.0’
87
+ micromamba activate FOSCAT
88
+ pip install foscat
89
+ git clone https://github.com/jmdelouis/FOSCAT_DEMO.git
90
+
91
+ ```
92
+
93
+ # Spherical data example
94
+
95
+ ## compute a synthetic image
96
+
97
+ ```
98
+ python demo.py -n=32 -k -c -s=100
99
+ ```
100
+
101
+ The _demo.py_ script serves as a demonstration of the capabilities of the foscat library. It utilizes the Cross Wavelet Scattering Transform to generate a Healpix map that possesses the same characteristics as a specified input map.
102
+
103
+ - `-n=32` computes map with nside=32.
104
+ - `-k` uses 5x5 kernel.
105
+ - `-c` uses Scattering Covariance.
106
+ - `-l` uses LBFGS minimizer.
107
+ - `-s=100` computes 100 steps.
108
+
109
+ ```
110
+ python demo.py -n=8 [-c|--cov][-s|--steps=3000][-S=1234|--seed=1234][-k|--k5x5][-d|--data][-o|--out][-r|--orient] [-p|--path][-a|--adam]
111
+
112
+ ```
113
+
114
+ - The "-n" option specifies the nside of the input map. The maximum nside value is 256 with the default map.
115
+ - The "--cov" option (optional) uses scat_cov instead of scat.
116
+ - The "--steps" option (optional) specifies the number of iterations. If not specified, the default value is 1000.
117
+ - The "--seed" option (optional) specifies the seed of the random generator.
118
+ - The "--path" option (optional) allows you to define the path where the output files will be written. The default path is "data".
119
+ - The "--k5x5" option (optional) uses a 5x5 kernel instead of a 3x3.
120
+ - The "--data" option (optional) specifies the input data file to be used. If not specified, the default file "LSS_map_nside128.npy" will be used.
121
+ - The "--out" option (optional) specifies the output file name. If not specified, the output file will be saved in "demo".
122
+ - The "--orient" option (optional) specifies the number of orientations. If not specified, the default value is 4.
123
+ - The "--adam" option (optional) makes the synthesis using the ADAM optimizer instead of the L_BFGS.
124
+
125
+ ## plot the result
126
+
127
+ The following script generates a series of plots that showcase different aspects of the synthesis process using the _demo.py_ script.
128
+
129
+ > python test2D.py
130
+
131
+ ```
132
+ python plotdemo.py -n=32 -c
133
+ ```
134
+
135
+ # 2D field demo
136
+
137
+ > python test2Dplot.py
138
+
139
+ # compute a synthetic turbulent field
140
+
141
+ The python scripts _demo2D.py_ included in this package demonstrate how to use the foscat library to generate a 2D synthetic fields that have patterns with the same statistical properties as a specified 2D image. In this particular case, the input field is a sea surface temperature extracted from a north atlantic ocean simulation.
142
+
143
+ > python testHealpix.py
144
+
145
+ ```
146
+ python demo2d.py -n=32 -k -c
147
+ ```
148
+
149
+ > python testHplot.py
150
+
151
+ The following script generates a series of plots that showcase different aspects of the synthesis process using the _demo2D.py_ script.
152
+
153
+ ```
154
+ python plotdemo2d.py -n=32 -c
155
+ ```
156
+
157
+ For more information, see the [documentation](https://foscat-documentation.readthedocs.io/en/latest/index.html).
158
+
159
+ > mpirun -np 3 testHealpix_mpi.py
160
+
161
+ ## Authors and acknowledgment
162
+
163
+ Authors: J.-M. Delouis, P. Campeti, T. Foulquier, J. Mangin, L. Mousset, T. Odaka, F. Paul, E. Allys
164
+
165
+ This work is part of the R & T Deepsee project supported by CNES. The authors acknowledge the heritage of the Planck-HFI consortium regarding data, software, knowledge. This work has been supported by the Programme National de Télédétection Spatiale (PNTS, http://programmes.insu.cnrs.fr/pnts/), grant n◦ PNTS-2020-08
166
+
167
+ ## License
168
+
169
+ BSD 3-Clause License
170
+
171
+ Copyright (c) 2022, the Foscat developers All rights reserved.
172
+
173
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
174
+
175
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
176
+
177
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
178
+
179
+ Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
180
+
181
+ ## Project status
182
+
183
+ It is a scientific driven development. We are open to any contributing development.
@@ -0,0 +1,26 @@
1
+ foscat/CNN.py,sha256=j0F2a4Xf3LijhyD_WVZ6Eg_IjGuXw3ddH6Iudj1xVaw,4874
2
+ foscat/CircSpline.py,sha256=fTPOUq5fECevQTKpnwPsYSBTafKyncECUS3fKF03Xls,2423
3
+ foscat/FoCUS.py,sha256=hmHO3cEEaEZyzFEvOIogBlhjUobRfwDbWQTAT1F5r-c,101774
4
+ foscat/GCNN.py,sha256=5RV-FKuvqbD-k99TwiM4CttM2LMZE21WD0IK0j5Mkko,7599
5
+ foscat/Softmax.py,sha256=aBLQauoG0q2SJYPotV6U-cxAhsJcspWHNRWdnA_nAiQ,2854
6
+ foscat/Spline1D.py,sha256=a5Jb8I9tb8y20iM8W-z6iZsIqDFByRp6eZdChpmuI5k,3010
7
+ foscat/Synthesis.py,sha256=3_Lq5-gUM-WmO2h15kajMES8XjRo2BGseoxvTLW_xEc,13626
8
+ foscat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ foscat/alm.py,sha256=qjczgfyZSZKv7eNmvE-UbRtOO6HQ42Cu-TTx1TioYyM,5148
10
+ foscat/backend.py,sha256=SyPNkwuwIKAeUQZE4m5RSUr29jjVbL4wzNrtqYXmVno,38557
11
+ foscat/backend_tens.py,sha256=9Dp136m9frkclkwifJQLLbIpl3ETI3_txdPUZcKfuMw,1618
12
+ foscat/loss_backend_tens.py,sha256=dCOVN6faDtIpN3VO78HTmYP2i5fnFAf-Ddy5qVBlGrM,1783
13
+ foscat/loss_backend_torch.py,sha256=k3z18Dj3SaLKK6ZIKcm7GO4U_YKYVP6LtHG1aIbxkYk,1627
14
+ foscat/scat.py,sha256=qGYiBIysPt65MdmF07WWA4piVlTfA9-lFDTaicnqC2w,72822
15
+ foscat/scat1D.py,sha256=W5Uu6wdQ4ZsFKXpof0f1OBl-1wjJmW7ruvddRWxe7uM,53726
16
+ foscat/scat2D.py,sha256=boKj0ASqMMSy7uQLK6hPniG87m3hZGJBYBiq5v8F9IQ,532
17
+ foscat/scat_cov.py,sha256=cyq-gK23mlQSy1zblDPWJsmJwrEw7bcWx1URqCgqZ48,144287
18
+ foscat/scat_cov1D.py,sha256=XOxsZZ5TYq8f34i2tUgIfzyaqaTDlICB3HzD2l_puro,531
19
+ foscat/scat_cov2D.py,sha256=3gn6xjKvfKsyHJoPfYIu8q9LLVAbU3tsiS2l1LAJ0XM,531
20
+ foscat/scat_cov_map.py,sha256=0wTRo4Nc7rYfI09RI2mh2bYixoukt5lrvAXR6wa9kjA,2744
21
+ foscat/scat_cov_map2D.py,sha256=FqF45FBcoiQbvuVsrLWUIPRUc95GsKsrnH6fKzB3GlE,2841
22
+ foscat-3.3.0.dist-info/LICENCE,sha256=i0ukIr8ZUpkSY2sZaE9XZK-6vuSU5iG6IgX_3pjatP8,1505
23
+ foscat-3.3.0.dist-info/METADATA,sha256=chJzw6s5UFmpGc-XlgunHjQRfDWlZUomwec7CYU5diY,7191
24
+ foscat-3.3.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
25
+ foscat-3.3.0.dist-info/top_level.txt,sha256=AGySXBBAlJgb8Tj8af6m_F-aiNg2zNTcybCUPVOKjAg,7
26
+ foscat-3.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.1.0)
2
+ Generator: bdist_wheel (0.42.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
foscat/GetGPUinfo.py DELETED
@@ -1,36 +0,0 @@
1
- import os
2
- import threading
3
- import time
4
- import numpy as np
5
-
6
- from threading import Thread
7
- from threading import Event
8
-
9
- event = Event()
10
-
11
- # Define a function for the thread
12
- def get_gpu(event,delay):
13
-
14
- while (1):
15
- if event.is_set():
16
- break
17
- time.sleep(delay)
18
- os.system("nvidia-smi | awk '$2==\"N/A\"{print substr($9,1,length($9)-3),substr($11,1,length($11)-3),substr($13,1,length($13)-1)}' > smi_tmp.txt")
19
-
20
- # Create two threads as follows
21
- try:
22
- x = Thread(target=print_time, args=(event,1,))
23
- x.start()
24
- except:
25
- print("Error: unable to start thread")
26
-
27
-
28
- for i in range(3):
29
- time.sleep(3.5)
30
- print(np.loadtxt('smi_tmp.txt'))
31
-
32
- event.set()
33
-
34
- x.join()
35
- print('everything done')
36
-