From d15fa0d5193dcd88f4984dde3797b931690f7424 Mon Sep 17 00:00:00 2001 From: Dag Pasca Date: Fri, 24 Jan 2025 10:05:00 +0100 Subject: [PATCH] fix: pLSCF_MS algo; add: installation instructions for conda/mamba --- README.md | 8 +++++++- docs/Installation.rst | 7 ++++++- src/pyoma2/algorithms/plscf.py | 22 +++++++++++++--------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 445a00c..8e37147 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/docs/Installation.rst b/docs/Installation.rst index d6702f6..83b490c 100644 --- a/docs/Installation.rst +++ b/docs/Installation.rst @@ -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: diff --git a/src/pyoma2/algorithms/plscf.py b/src/pyoma2/algorithms/plscf.py index a9113a0..7a40c0a 100644 --- a/src/pyoma2/algorithms/plscf.py +++ b/src/pyoma2/algorithms/plscf.py @@ -377,16 +377,16 @@ 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) @@ -394,10 +394,14 @@ def run(self) -> pLSCFResult: 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