Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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]
Expand Down
Binary file removed examples/drive/flux_vector/ABB_400rpm_map.mat
Binary file not shown.
Binary file added examples/drive/flux_vector/ABB_400rpm_map.npz
Binary file not shown.
11 changes: 5 additions & 6 deletions examples/drive/flux_vector/plot_6kw_pmsyrm_sat_fvc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down