Skip to content

Commit 9666327

Browse files
committed
CLN: update readme
1 parent 4e4f269 commit 9666327

File tree

1 file changed

+39
-25
lines changed

1 file changed

+39
-25
lines changed

README.rst

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ the PySensors approach to reconstruction problems and Brunton et al.
2121
literature review along with examples and additional tips for
2222
using PySensors effectively.
2323

24+
The diagram below shows current Pysensors capabilities.
25+
26+
.. figure:: docs/figures/pysensors-capabilities.png
27+
:align: center
28+
:alt: A diagram showing current pysensors capabilities.
29+
:figclass: align-center
2430

2531
Reconstruction
2632
^^^^^^^^^^^^^^
@@ -43,12 +49,18 @@ feed them to a ``SSPOR`` instance with 10 sensors, and
4349
model = pysensors.reconstruction.SSPOR(n_sensors=10)
4450
model.fit(data)
4551
46-
Use the ``predict`` method to reconstruct a new function sampled at the chosen sensor locations:
52+
Use the ``predict`` method to reconstruct a new function sampled at the chosen sensor locations. There are two methods of reconstruction using ``predict``: ``Unregularized Reconstruction`` and ``Regularized Reconstruction``.
53+
4754

4855
.. code-block:: python
4956
5057
f = numpy.abs(x[model.selected_sensors]**2 - 0.5)
51-
f_pred = model.predict(f)
58+
# Unregularized reconstruction can be used using the method ``unregularized``
59+
f_pred_unregularized = model.predict(f, method='unregularized')
60+
# Regularized reconstruction, on the other hand is the default method for predict. It also requires other parameters like prior and noise
61+
f_pred_regularized = model.predict(f, prior, noise)
62+
63+
See `reconstruction comparison example <https://python-sensors.readthedocs.io/en/latest/examples/reconstruction_comparison.html>` for more information on the methods of reconstruction.
5264

5365
.. figure:: docs/figures/vandermonde.png
5466
:align: center
@@ -89,24 +101,10 @@ Three strategies to deal with constraints are currently developed:
89101
We have further provided functions to compute the sensors in the constrained regions. For example if the user provides the center and radius of a circular
90102
constrained region, the constraints in utils compute the constrained sensor indices. Direct constraint plotting capabilities have also been developed.
91103

92-
The constrained shapes currently implemented are:
93-
94-
* ``Circle``
95-
96-
* ``Cylinder``
97-
98-
* ``Line``
99-
100-
* ``Parabola``
104+
The constrained shapes currently implemented are: ``Circle``, ``Cylinder``, ``Line``, ``Parabola``, ``Ellipse``, ``Polygon``.
105+
A user can also define their own constraints using ``UserDefinedConstraints``, this type of constraint has the ability to take in either a function or a .py file which contains a functional definition of the constrained region.
101106

102-
* ``Ellipse``
103-
104-
* ``Polygon``
105-
106-
* ``UserDefinedConstraints``
107-
108-
- This type of constraint has the ability to take in either a function from the user or a
109-
.py file which contains a functional definition of the constrained region.
107+
See `this example <https://python-sensors.readthedocs.io/en/latest/examples/Olivetti_constrained_sensing.html>` for more information.
110108

111109
Classification
112110
^^^^^^^^^^^^^^
@@ -126,7 +124,7 @@ Bases
126124
^^^^^
127125
The basis in which measurement data are represented can have a dramatic
128126
effect on performance. PySensors implements the three bases most commonly
129-
used for sparse sensor placement: raw measurements, SVD/POD/PCA modes, and random projections. Bases can be easily incorporated into ``SSPOR`` and ``SSPOC`` classes:
127+
used for sparse sensor placement: raw measurements, SVD/POD/PCA modes, and random projections. A user can also define their own custom basis. Bases can be easily incorporated into ``SSPOR`` and ``SSPOC`` classes:
130128

131129
.. code-block:: python
132130
@@ -141,7 +139,7 @@ Installation
141139

142140
Dependencies
143141
^^^^^^^^^^^^
144-
The high-level dependencies for PySensors are Linux or macOS and Python 3.6-3.8. ``pip`` is also recommended as is makes managing PySensors' other dependencies much easier. You can install it by following the instructions `here <https://packaging.python.org/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line>`__.
142+
The high-level dependencies for PySensors are Linux or macOS and Python 3.9-3.12. ``pip`` is also recommended as is makes managing PySensors' other dependencies much easier. You can install it by following the instructions `here <https://packaging.python.org/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line>`__.
145143

146144
PySensors has not been tested on Windows.
147145

@@ -191,10 +189,23 @@ The primary PySensors objects are the ``SSPOR`` and ``SSPOC`` classes, which are
191189

192190
- ``Identity`` - use raw measurement data
193191
- ``SVD`` - efficiently compute first k left singular vectors
194-
- ``RandomProjection`` - Gaussian random projections of measurements
192+
- ``RandomProjection`` - gaussian random projections of measurements
193+
- ``CustomBasis`` - user defined bases ranging from DMD modes to Chebyshev polynomials
194+
195+
* ``optimizers`` - submodule implementing different optimizers to fit data
195196

197+
- ``QR`` - greedy QR optimizer
198+
- ``CCQR`` - greedy cost constrained QR optimizer
199+
- ``GQR`` - general QR optimizer
200+
- ``TPGR`` - two point greedy optmizer
196201
* Convenience functions to aid in the analysis of error as number of sensors or basis modes are varied
197202

203+
The diagram below outlines a flow chart of how a user can utilize pysensors.
204+
.. figure:: docs/figures/pysensors-methods.png
205+
:align: center
206+
:alt: A flow chart of pysensors methods.
207+
:figclass: align-center
208+
198209
Documentation
199210
-------------
200211
PySensors has a `documentation site <https://python-sensors.readthedocs.io/en/latest/index.html>`__ hosted by readthedocs.
@@ -300,12 +311,15 @@ References
300311
(2018): 2642-2656.
301312
`[DOI] <https://doi.org/10.1109/JSEN.2018.2887044>`__
302313

303-
- Karnik, Niharika, Mohammad G. Abdo, Carlos E. Estrada-Perez, Jun Soo Yoo,
304-
Joshua J. Cogliati, Richard S. Skifton, Pattrick Calderoni, Steven L. Brunton, and Krithika Manohar.
305-
"Constrained Optimization of Sensor Plcaement for Nuclear Digital Twins" IEEE Sensors Journal 24, no. 9
314+
- Karnik, Niharika, Mohammad G. Abdo, Carlos E. Estrada-Perez, Jun Soo Yoo, Joshua J. Cogliati, Richard S. Skifton, Pattrick Calderoni, Steven L. Brunton, and Krithika Manohar.
315+
"Constrained Optimization of Sensor Placement for Nuclear Digital Twins" IEEE Sensors Journal 24, no. 9
306316
(2024): 15501 - 15516.
307317
`[DOI] <https://doi.org/10.1109/JSEN.2024.3368875>`__
308318

319+
- Klishin, Andrei A., J. Nathan Kutz, Krithika Manohar
320+
"Data-Induced Interations of Sparse Sensors" (2023)
321+
`[DOI] <https://doi.org/10.48550/arXiv.2307.11838>`
322+
309323
.. |Build| image:: https://github.com/dynamicslab/pysensors/actions/workflows/main.yml/badge.svg?branch=master
310324
:target: https://github.com/dynamicslab/pysensors/actions?query=workflow%3ACI
311325

0 commit comments

Comments
 (0)