You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,69 +12,11 @@ Welcome to PySPOD's documentation!
12
12
13
13
14
14
15
-
* The **GitHub repository** of this package can be found at `PySPOD <https://github.com/mathe-lab/PySPOD>`_ along installation instructions, and how to get started.
16
-
17
-
* **Tutorials** can be found at `PySPOD-Tutorials <https://github.com/mathe-lab/PySPOD/tree/main/tutorials>`_
18
-
19
-
* The package uses `github actions`_ for **continuous integration**.
20
-
21
-
22
-
23
-
Summary
24
-
==================
25
-
26
-
The `PySPOD` library is organized following an abstract factory
27
-
design pattern, where we define a base class in `spod_base.py`,
28
-
called `SPOD_Base` :ref:`SPOD base class`, that implements functions
29
-
and parameters available to all derived classes. In addition, it
30
-
implements two abstract functions, `fit()` and `predict()` which
31
-
implementation must be provided by the derived classes.
32
-
33
-
The classes derived from the base class are the following:
34
-
- `SPOD_low_storage` (implemented in `spod_low_storage.py`) :ref:`SPOD low storage`
35
-
- `SPOD_low_ram` (implemented in `spod_low_ram.py`) :ref:`SPOD low ram`
36
-
- `SPOD_streaming` (implemented in `spod_streaming.py`) :ref:`SPOD streaming`
37
-
38
-
These derived classes contain the actual implementation
39
-
of three different different versions of SPOD algorithms
40
-
that mainly differ in terms of I/O requirements, RAM usage
41
-
and speed. The `SPOD_low_storage` implements an algorithm
42
-
that is intended when we have enough RAM to perform a given
43
-
a analysis and it is generally faster, requiring a small
44
-
amount of I/O operations, the `SPOD_low_ram` require extensive
45
-
I/O operations but allows to run analyses when RAM is not
46
-
sufficient, and the `SPOD_streaming` is a streaming version
47
-
SPOD (generally slower).
48
-
49
-
`SPOD_low_storage` and `SPOD_low_ram` implements the algorithms
50
-
that were proposed in `(Schmidt et al. 2019) <https://doi.org/10.1175/MWR-D-18-0337.1>`_.
51
-
See also `(Towne et al. 2017) <https://doi.org/10.1017/jfm.2018.283>`_.
52
-
`SPOD_streaming` instead implements the streaming version proposed
53
-
in `(Schmidt & Towne 2019) <https://doi.org/10.1016/j.cpc.2018.11.009>`_.
54
-
55
-
**It should be noted that the design pattern chosen allows for the
56
-
easy addition of derived classes that can implement a new versions
57
-
of the SPOD approach.**
58
-
59
-
Additionally to these modules, we provide utilities to compute the
60
-
weights that are typically required in SPOD computations. The implementation
61
-
is currently limited to 2D and 3D longitude-latitude grids for geophysical
62
-
applications. It is possible to implement any weighthing function that
63
-
could be required for different applications. These weighting are implemented
64
-
in `weights.py` :ref:`Weights`. For additional details regarding the usage
65
-
of weights in the context of SPOD, one can refer to `(Schmidt & Colonius 2020)
66
-
<https://doi.org/10.2514/1.J058809>`_.
67
-
68
-
We finally also provide some post-processing capabilities to visualize
69
-
the results. These are implemented in `postproc.py` :ref:`Postprocessing
70
-
module`.
71
-
The functions in post-processing can be accessed directly from the base
72
-
class, and in particular from the `SPOD object` returned by the `fit()`
73
-
function. They can also be accessed separately from the base class, as
74
-
the post-processing module constitutes a standalone module. In practice,
75
-
once you run an analysis, you can load the results at a later stage and
76
-
use the post-processing module to visualize the results or you can implement
77
-
you own viasuliazation tools, that best suit your needs.
15
+
* The **GitHub repository** of this package can be found at `PySPOD <https://github.com/MathEXLab/PySPOD>`_ along installation instructions, and how to get started.
16
+
17
+
* **Tutorials** can be found at `PySPOD-Tutorials <https://github.com/MathEXLab/PySPOD/tree/main/tutorials>`_
18
+
19
+
* The package uses `GitHub Actions <https://github.com/MathEXLab/PySPOD/actions>`_ for **continuous integration**.
78
20
79
21
80
22
@@ -86,85 +28,71 @@ Indices and table
86
28
87
29
88
30
89
-
SPOD main modules
90
-
=================
91
-
92
-
The SPOD main modules constitutes the backbone of the `PySPOD` library.
93
-
They are constituted by the base class:
94
-
95
-
- `SPOD_Base` (implemented in `spod_base.py`) :ref:`SPOD base class`
96
-
97
-
along with its derived classes:
98
-
99
-
- `SPOD_low_storage` (implemented in `spod_low_storage.py`) :ref:`SPOD low storage`
100
-
- `SPOD_low_ram` (implemented in `spod_low_ram.py`) :ref:`SPOD low ram`
101
-
- `SPOD_streaming` (implemented in `spod_streaming.py`) :ref:`SPOD streaming`
31
+
SPOD module
32
+
===========
102
33
103
-
SPOD base class
104
-
---------------
34
+
SPOD base
35
+
---------
105
36
106
-
The **SPOD base class** is intended to hold functions that are shared
107
-
by all derived classes. It follows an abstract factory design pattern.
37
+
.. automodule:: pyspod.spod.base
38
+
:members: Base
108
39
109
-
.. automodule:: pyspod.spod_base
110
-
:members: SPOD_Base
111
40
112
-
SPOD low storage
113
-
----------------
41
+
SPOD standard
42
+
-------------
114
43
115
-
.. automodule:: pyspod.spod_low_storage
116
-
:members:SPOD_low_storage
44
+
.. automodule:: pyspod.spod.standard
45
+
:members:Standard
117
46
118
-
SPOD low ram
119
-
------------
120
-
121
-
.. automodule:: pyspod.spod_low_ram
122
-
:members: SPOD_low_ram
123
47
124
48
SPOD streaming
125
-
----------------
49
+
--------------
126
50
127
-
.. automodule:: pyspod.spod_streaming
128
-
:members:SPOD_streaming
51
+
.. automodule:: pyspod.spod.streaming
52
+
:members:Streaming
129
53
130
54
55
+
SPOD utils
56
+
----------
131
57
132
-
Weights
133
-
=======
58
+
.. automodule:: pyspod.spod.utils
59
+
:members:
60
+
check_orthogonality,
61
+
compute_coeffs_op,
62
+
compute_coeffs_conv,
63
+
compute_reconstruction
134
64
135
-
SPOD typically requires a set of spatial weights to compute
136
-
the needed inner product. In the module `weights`, we implement
137
-
a set of weights used for longitude-latitude grids, for both
138
-
2D and 3D problems. You can implement your own weights in this
139
-
module, or pass a set of weights you have precomputed as a parameter
140
-
to the SPOD base class.
141
65
142
-
.. automodule:: pyspod.weights
143
-
:members: geo_weights_trapz_2D,
144
-
geo_weights_trapz_3D,
145
-
apply_normalization
66
+
Utils module
67
+
============
146
68
147
69
70
+
Postprocessing
71
+
--------------
148
72
149
-
Postprocessing module
150
-
=====================
73
+
.. automodule:: pyspod.utils.postproc
74
+
:members:
75
+
find_nearest_freq,
76
+
find_nearest_coords,
77
+
get_modes_at_freq,
78
+
get_data_from_file,
79
+
plot_eigs,
80
+
plot_eigs_vs_frequency,
81
+
plot_eigs_vs_period,
82
+
plot_2d_modes_at_frequency,
83
+
plot_3d_modes_slice_at_frequency,
84
+
plot_mode_tracers,
85
+
plot_2d_data,
86
+
plot_data_tracers,
87
+
generate_2d_data_video
151
88
152
-
The postproc module is intended to provide some limited
153
-
support to post-process the data and results produced by **pyspod**.
0 commit comments