Skip to content

Commit

Permalink
fix: pLSCF_MS algo; add: installation instructions for conda/mamba
Browse files Browse the repository at this point in the history
  • Loading branch information
Dag Pasca authored and Dag Pasca committed Jan 24, 2025
1 parent 53cdcec commit d15fa0d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ https://pyoma.readthedocs.io/en/main/

## Quick start

Install the library
Install the library with pip:

```shell
pip install pyOMA-2
```

or with conda/mamba:

```shell
conda install pyOMA-2
```

You'll probably need to install **tk** for the GUI on your system, here some instructions:

Windows:
Expand Down
7 changes: 6 additions & 1 deletion docs/Installation.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
Installation
============

Install the library:
Install the library with pip:

.. code:: console
pip install pyOMA-2
or with conda/mamba:

.. code:: console
conda install pyOMA-2
You'll probably need to install **tk** for the GUI on your system, here some instructions:

Expand Down
22 changes: 13 additions & 9 deletions src/pyoma2/algorithms/plscf.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,27 +377,31 @@ def run(self) -> pLSCFResult:
)

# Apply HARD CRITERIA
hc_conj = hc["conj"]
# hc_conj = hc["conj"]
hc_xi_max = hc["xi_max"]
hc_mpc_lim = hc["mpc_lim"]
hc_mpd_lim = hc["mpd_lim"]

# HC - presence of complex conjugate
if hc_conj:
Lambds, mask1 = gen.HC_conj(Lambds)
lista = [Fns, Xis, Phis]
Fns, Xis, Phis = gen.applymask(lista, mask1, Phis.shape[2])
# if hc_conj:
Lambds, mask1 = gen.HC_conj(Lambds)
lista = [Fns, Xis, Phis]
Fns, Xis, Phis = gen.applymask(lista, mask1, Phis.shape[2])

# HC - damping
Xis, mask2 = gen.HC_damp(Xis, hc_xi_max)
lista = [Fns, Phis]
Fns, Phis = gen.applymask(lista, mask2, Phis.shape[2])

# HC - MPC and MPD
mask3, mask4 = gen.HC_phi_comp(Phis, hc_mpc_lim, hc_mpd_lim)
lista = [Fns, Xis, Phis]
Fns, Xis, Phis = gen.applymask(lista, mask3, Phis.shape[2])
Fns, Xis, Phis = gen.applymask(lista, mask4, Phis.shape[2])
if hc_mpc_lim is not None:
mask3 = gen.HC_MPC(Phis, hc_mpc_lim)
lista = [Fns, Xis, Phis, Lambds]
Fns, Xis, Phis, Lambds = gen.applymask(lista, mask3, Phis.shape[2])
if hc_mpd_lim is not None:
mask4 = gen.HC_MPD(Phis, hc_mpd_lim)
lista = [Fns, Xis, Phis, Lambds]
Fns, Xis, Phis, Lambds = gen.applymask(lista, mask4, Phis.shape[2])

# Apply SOFT CRITERIA
# Get the labels of the poles
Expand Down

0 comments on commit d15fa0d

Please sign in to comment.