PyOpenMagnetics 1.7.32__tar.gz → 1.7.33__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/CMakeLists.txt +1 -1
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/PKG-INFO +1 -1
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/PyOpenMagnetics.pyi +2 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/pyproject.toml +1 -1
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/advisers.cpp +19 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/.github/workflows/ci.yml +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/.github/workflows/publish.yml +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/.gitignore +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/AGENTS.md +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/LICENSE +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/README.md +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/_packaging/__init__.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/_packaging/_build_info.py.in +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/api/MAS.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/api/mas_db_reader.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/api/validation.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/clear_cibuildwheel_cache.sh +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/docs/compatibility.md +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/docs/errors.md +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/docs/performance.md +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/README.md +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/buck_inductor.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/complete_simulation_example.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/converter_design_example.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/debug_bobbin.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/debug_coil.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/debug_core.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/debug_plotting.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/flyback_220v_12v_1a.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/flyback_220v_12v_2a_complete.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/flyback_bh_curve.png +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/flyback_core.png +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/flyback_design.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/flyback_summary.png +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/flyback_waveforms.png +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/list_plot_funcs.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/plot_flyback_design.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/plot_flyback_pyom.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/test_field_calc.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/examples/test_field_plot.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/force_fresh_build.sh +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/llms.txt +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/notebooks/01_getting_started.ipynb +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/notebooks/02_buck_inductor.ipynb +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/notebooks/03_core_losses.ipynb +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/notebooks/README.md +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/requirements.txt +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/advisers.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/bobbin.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/bobbin.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/cmc.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/cmc.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/common.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/converter.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/converter.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/core.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/core.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/crossref.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/crossref.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/database.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/database.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/logging.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/logging.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/losses.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/losses.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/module.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/plotting.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/plotting.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/settings.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/settings.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/simulation.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/simulation.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/utils.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/utils.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/winding.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/winding.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/wire.cpp +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/src/wire.h +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/test.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/__init__.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/conftest.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_converter_endpoints.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_core.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_core_adviser.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_datasheet_only_catalogue.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_examples_integration.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_inputs.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_logging.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_losses_not_evaluable_catalogue.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_magnetic_adviser.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_magnetics_catalogue_load.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_mas_schema_walk.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_material_validator.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_plotting.py +0 -0
- {pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_winding.py +0 -0
|
@@ -142,7 +142,7 @@ if(NOT LOCAL_MKF_MAS)
|
|
|
142
142
|
set(MKF_GIT_TAG "main"
|
|
143
143
|
CACHE STRING "MKF git ref for the vendored PyOM build")
|
|
144
144
|
# Force fresh clone by using a unique timestamp - update this when the pin changes
|
|
145
|
-
set(MKF_FORCE_REFRESH "2026-10-
|
|
145
|
+
set(MKF_FORCE_REFRESH "2026-10-04-mkf-508edb8b")
|
|
146
146
|
# Tell MKF to disable matplotplusplus and use SVG-based Painter instead
|
|
147
147
|
set(INCLUDE_PYMKF ON CACHE BOOL "Build Python interface" FORCE)
|
|
148
148
|
# GIT_SUBMODULES_RECURSE pulls in CAS/PEAS (added 2026-04 alongside the
|
|
@@ -679,6 +679,8 @@ def calculate_advised_magnetics_from_catalog(
|
|
|
679
679
|
- "lossesNotEvaluable" (only on such parts): why the part's core losses could not be
|
|
680
680
|
evaluated (its core material has no core-loss model); it is ranked without any
|
|
681
681
|
loss-based filter and returned without simulated outputs.
|
|
682
|
+
And a "failedCandidates" array next to "data": one {"reference", "error"} per candidate
|
|
683
|
+
whose evaluation raised (a filter or the final simulation threw); it is not ranked.
|
|
682
684
|
"""
|
|
683
685
|
...
|
|
684
686
|
|
|
@@ -179,6 +179,17 @@ json calculate_advised_magnetics_fast(json inputsJson, int maximumNumberResults,
|
|
|
179
179
|
return results;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
// The candidates the adviser excluded because evaluating them raised (a filter or the final
|
|
183
|
+
// simulation threw), each with the error. They are not ranked; this says which and why, instead of
|
|
184
|
+
// the result silently holding fewer parts.
|
|
185
|
+
static json failed_candidates_to_json(const OpenMagnetics::MagneticAdviser& magneticAdviser) {
|
|
186
|
+
json failedCandidates = json::array();
|
|
187
|
+
for (const auto& [reference, error] : magneticAdviser.get_failed_candidates()) {
|
|
188
|
+
failedCandidates.push_back({{"reference", reference}, {"error", error}});
|
|
189
|
+
}
|
|
190
|
+
return failedCandidates;
|
|
191
|
+
}
|
|
192
|
+
|
|
182
193
|
json calculate_advised_magnetics_from_catalog(json inputsJson, json catalogJson, int maximumNumberResults) {
|
|
183
194
|
OpenMagnetics::settings.set_coil_delimit_and_compact(true);
|
|
184
195
|
OpenMagnetics::Inputs inputs(inputsJson);
|
|
@@ -224,6 +235,7 @@ json calculate_advised_magnetics_from_catalog(json inputsJson, json catalogJson,
|
|
|
224
235
|
sort(results["data"].begin(), results["data"].end(), [](json& b1, json& b2) {
|
|
225
236
|
return b1["scoring"] > b2["scoring"];
|
|
226
237
|
});
|
|
238
|
+
results["failedCandidates"] = failed_candidates_to_json(magneticAdviser);
|
|
227
239
|
|
|
228
240
|
return results;
|
|
229
241
|
}
|
|
@@ -282,6 +294,7 @@ json calculate_advised_magnetics_from_cache(json inputsJson, json filterFlowJson
|
|
|
282
294
|
sort(results["data"].begin(), results["data"].end(), [](json& b1, json& b2) {
|
|
283
295
|
return b1["scoring"] > b2["scoring"];
|
|
284
296
|
});
|
|
297
|
+
results["failedCandidates"] = failed_candidates_to_json(magneticAdviser);
|
|
285
298
|
|
|
286
299
|
return results;
|
|
287
300
|
}
|
|
@@ -506,6 +519,9 @@ void register_adviser_bindings(py::module& m) {
|
|
|
506
519
|
- "lossesNotEvaluable" (only on such parts): why this part's core losses could
|
|
507
520
|
not be evaluated -- its core material carries no core-loss model. The part is
|
|
508
521
|
ranked without any loss-based filter and returned without simulated outputs.
|
|
522
|
+
And a "failedCandidates" array next to "data": one {"reference", "error"} per
|
|
523
|
+
candidate whose evaluation raised (a filter or the final simulation threw). Such a
|
|
524
|
+
candidate is not ranked; this names it and the error instead of dropping it silently.
|
|
509
525
|
|
|
510
526
|
Example:
|
|
511
527
|
>>> inputs = PyMKF.process_inputs(raw_inputs)
|
|
@@ -550,6 +566,9 @@ void register_adviser_bindings(py::module& m) {
|
|
|
550
566
|
not be evaluated -- its core material carries no core-loss model. The part is
|
|
551
567
|
ranked on the filters that apply to it, with no loss-based filter scored, and
|
|
552
568
|
is returned without simulated outputs.
|
|
569
|
+
And a "failedCandidates" array next to "data": one {"reference", "error"} per
|
|
570
|
+
candidate whose evaluation raised (a filter or the final simulation threw). Such a
|
|
571
|
+
candidate is not ranked; this names it and the error instead of dropping it silently.
|
|
553
572
|
|
|
554
573
|
Note:
|
|
555
574
|
Cache must be populated before calling this function.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyopenmagnetics-1.7.32 → pyopenmagnetics-1.7.33}/tests/test_losses_not_evaluable_catalogue.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|