diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 938763117..9e4b92266 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: name: pip-audit description: "Audits Python environments and dependency trees for known vulnerabilities" entry: pip-audit - args: [--ignore-vuln, GHSA-4xh5-x5gv-qwph] # pip version 25.2 is the latest available, but has this vulnerability + args: [--ignore-vuln, GHSA-4xh5-x5gv-qwph, --ignore-vuln, CVE-2026-21441] pass_filenames: false language: python @@ -66,7 +66,7 @@ repos: # Pyright - repo: https://github.com/RobertCraigie/pyright-python - rev: v1.1.407 + rev: v1.1.408 hooks: - id: pyright additional_dependencies: [numpy, scipy, matplotlib, tqdm, sphinx-gallery] diff --git a/examples/drive/flux_vector/ABB_400rpm_map.mat b/examples/drive/flux_vector/ABB_400rpm_map.mat deleted file mode 100644 index 023f2e5a4..000000000 Binary files a/examples/drive/flux_vector/ABB_400rpm_map.mat and /dev/null differ diff --git a/examples/drive/flux_vector/ABB_400rpm_map.npz b/examples/drive/flux_vector/ABB_400rpm_map.npz new file mode 100644 index 000000000..13205be7f Binary files /dev/null and b/examples/drive/flux_vector/ABB_400rpm_map.npz differ diff --git a/examples/drive/flux_vector/plot_6kw_pmsyrm_sat_fvc.py b/examples/drive/flux_vector/plot_6kw_pmsyrm_sat_fvc.py index a23ef1346..c3c9fae75 100644 --- a/examples/drive/flux_vector/plot_6kw_pmsyrm_sat_fvc.py +++ b/examples/drive/flux_vector/plot_6kw_pmsyrm_sat_fvc.py @@ -22,7 +22,6 @@ from pathlib import Path import numpy as np -from scipy.io import loadmat import motulator.drive.control.sm as control from motulator.drive import model, utils @@ -37,15 +36,15 @@ # Plot the saturation model (surfaces) and the measured flux map data (points). This # data is used to parametrize the machine model. -# Load the measured data from the MATLAB file +# Load the measured data p = Path(__file__).resolve().parent if "__file__" in globals() else Path.cwd() -meas_data = loadmat(p / "ABB_400rpm_map.mat") +meas_data = np.load(p / "ABB_400rpm_map.npz") +i_s_dq_map = meas_data["i_s_dq"] +psi_s_dq_map = meas_data["psi_s_dq"] # Create the flux map from the measured data meas_flux_map = utils.MagneticModel( - i_s_dq=meas_data["id_map"] + 1j * meas_data["iq_map"], - psi_s_dq=meas_data["psid_map"] + 1j * meas_data["psiq_map"], - type="flux_map", + i_s_dq=i_s_dq_map, psi_s_dq=psi_s_dq_map, type="flux_map" ) # Plot the measured data