PyOpenMagnetics 1.7.33__tar.gz → 1.7.34__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.
Files changed (95) hide show
  1. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/CMakeLists.txt +1 -1
  2. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/PKG-INFO +1 -1
  3. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/PyOpenMagnetics.pyi +6 -1
  4. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/pyproject.toml +1 -1
  5. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/advisers.cpp +50 -4
  6. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/.github/workflows/ci.yml +0 -0
  7. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/.github/workflows/publish.yml +0 -0
  8. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/.gitignore +0 -0
  9. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/AGENTS.md +0 -0
  10. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/LICENSE +0 -0
  11. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/README.md +0 -0
  12. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/_packaging/__init__.py +0 -0
  13. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/_packaging/_build_info.py.in +0 -0
  14. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/api/MAS.py +0 -0
  15. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/api/mas_db_reader.py +0 -0
  16. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/api/validation.py +0 -0
  17. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/clear_cibuildwheel_cache.sh +0 -0
  18. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/docs/compatibility.md +0 -0
  19. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/docs/errors.md +0 -0
  20. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/docs/performance.md +0 -0
  21. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/README.md +0 -0
  22. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/buck_inductor.py +0 -0
  23. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/complete_simulation_example.py +0 -0
  24. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/converter_design_example.py +0 -0
  25. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/debug_bobbin.py +0 -0
  26. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/debug_coil.py +0 -0
  27. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/debug_core.py +0 -0
  28. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/debug_plotting.py +0 -0
  29. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/flyback_220v_12v_1a.py +0 -0
  30. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/flyback_220v_12v_2a_complete.py +0 -0
  31. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/flyback_bh_curve.png +0 -0
  32. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/flyback_core.png +0 -0
  33. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/flyback_design.py +0 -0
  34. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/flyback_summary.png +0 -0
  35. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/flyback_waveforms.png +0 -0
  36. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/list_plot_funcs.py +0 -0
  37. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/plot_flyback_design.py +0 -0
  38. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/plot_flyback_pyom.py +0 -0
  39. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/test_field_calc.py +0 -0
  40. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/examples/test_field_plot.py +0 -0
  41. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/force_fresh_build.sh +0 -0
  42. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/llms.txt +0 -0
  43. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/notebooks/01_getting_started.ipynb +0 -0
  44. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/notebooks/02_buck_inductor.ipynb +0 -0
  45. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/notebooks/03_core_losses.ipynb +0 -0
  46. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/notebooks/README.md +0 -0
  47. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/requirements.txt +0 -0
  48. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/advisers.h +0 -0
  49. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/bobbin.cpp +0 -0
  50. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/bobbin.h +0 -0
  51. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/cmc.cpp +0 -0
  52. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/cmc.h +0 -0
  53. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/common.h +0 -0
  54. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/converter.cpp +0 -0
  55. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/converter.h +0 -0
  56. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/core.cpp +0 -0
  57. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/core.h +0 -0
  58. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/crossref.cpp +0 -0
  59. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/crossref.h +0 -0
  60. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/database.cpp +0 -0
  61. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/database.h +0 -0
  62. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/logging.cpp +0 -0
  63. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/logging.h +0 -0
  64. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/losses.cpp +0 -0
  65. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/losses.h +0 -0
  66. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/module.cpp +0 -0
  67. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/plotting.cpp +0 -0
  68. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/plotting.h +0 -0
  69. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/settings.cpp +0 -0
  70. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/settings.h +0 -0
  71. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/simulation.cpp +0 -0
  72. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/simulation.h +0 -0
  73. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/utils.cpp +0 -0
  74. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/utils.h +0 -0
  75. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/winding.cpp +0 -0
  76. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/winding.h +0 -0
  77. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/wire.cpp +0 -0
  78. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/src/wire.h +0 -0
  79. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/test.py +0 -0
  80. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/__init__.py +0 -0
  81. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/conftest.py +0 -0
  82. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_converter_endpoints.py +0 -0
  83. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_core.py +0 -0
  84. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_core_adviser.py +0 -0
  85. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_datasheet_only_catalogue.py +0 -0
  86. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_examples_integration.py +0 -0
  87. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_inputs.py +0 -0
  88. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_logging.py +0 -0
  89. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_losses_not_evaluable_catalogue.py +0 -0
  90. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_magnetic_adviser.py +0 -0
  91. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_magnetics_catalogue_load.py +0 -0
  92. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_mas_schema_walk.py +0 -0
  93. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_material_validator.py +0 -0
  94. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/tests/test_plotting.py +0 -0
  95. {pyopenmagnetics-1.7.33 → pyopenmagnetics-1.7.34}/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-04-mkf-508edb8b")
145
+ set(MKF_FORCE_REFRESH "2026-10-04-mkf-e01c8504")
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PyOpenMagnetics
3
- Version: 1.7.33
3
+ Version: 1.7.34
4
4
  Summary: Python wrapper for OpenMagnetics
5
5
  Author-Email: Alfonso Martinez <Alfonso_VII@hotmail.com>
6
6
  Classifier: Development Status :: 4 - Beta
@@ -679,8 +679,13 @@ 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
+ - "judgedFrequencies" (only with a frequency-wise requirement): requirement frequencies
683
+ in Hz each such filter judged the part on, keyed by filter enum name, e.g.
684
+ {"IMPEDANCE": [150000.0, 1000000.0]}. IMPEDANCE judges a minimumImpedance point only
685
+ inside the core material's tabulated mu(f) range; unlisted points were not judged.
682
686
  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.
687
+ the search excluded (a filter or the final simulation raised, or the
688
+ LOSS_MODEL_FREQUENCY_SPAN gate excluded it while losses are computed); it is not ranked.
684
689
  """
685
690
  ...
686
691
 
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
4
4
 
5
5
  [project]
6
6
  name = "PyOpenMagnetics"
7
- version = "1.7.33"
7
+ version = "1.7.34"
8
8
  requires-python = ">=3.8"
9
9
  authors = [
10
10
  { name="Alfonso Martinez", email="Alfonso_VII@hotmail.com" },
@@ -207,6 +207,7 @@ json calculate_advised_magnetics_from_catalog(json inputsJson, json catalogJson,
207
207
 
208
208
  auto scoringsPerFilter = magneticAdviser.get_scorings();
209
209
  const auto& lossesNotEvaluable = magneticAdviser.get_losses_not_evaluable();
210
+ const auto& judgedFrequencies = magneticAdviser.get_judged_frequencies();
210
211
 
211
212
  json results = json();
212
213
  results["data"] = json::array();
@@ -229,6 +230,16 @@ json calculate_advised_magnetics_from_catalog(json inputsJson, json catalogJson,
229
230
  if (name && lossesNotEvaluable.count(*name)) {
230
231
  result["lossesNotEvaluable"] = lossesNotEvaluable.at(*name);
231
232
  }
233
+ // The requirement frequencies each frequency-wise filter judged this part on. IMPEDANCE
234
+ // judges a minimumImpedance point only inside the core material's tabulated mu(f) range;
235
+ // a point not listed here was not judged (neither passed nor failed).
236
+ if (name && judgedFrequencies.count(*name)) {
237
+ json judged;
238
+ for (auto& [filter, frequencies] : judgedFrequencies.at(*name)) {
239
+ judged[std::string(magic_enum::enum_name(filter))] = frequencies;
240
+ }
241
+ result["judgedFrequencies"] = judged;
242
+ }
232
243
  results["data"].push_back(result);
233
244
  }
234
245
 
@@ -266,6 +277,7 @@ json calculate_advised_magnetics_from_cache(json inputsJson, json filterFlowJson
266
277
 
267
278
  auto scoringsPerFilter = magneticAdviser.get_scorings();
268
279
  const auto& lossesNotEvaluable = magneticAdviser.get_losses_not_evaluable();
280
+ const auto& judgedFrequencies = magneticAdviser.get_judged_frequencies();
269
281
 
270
282
  json results = json();
271
283
  results["data"] = json::array();
@@ -288,6 +300,16 @@ json calculate_advised_magnetics_from_cache(json inputsJson, json filterFlowJson
288
300
  if (name && lossesNotEvaluable.count(*name)) {
289
301
  result["lossesNotEvaluable"] = lossesNotEvaluable.at(*name);
290
302
  }
303
+ // The requirement frequencies each frequency-wise filter judged this part on. IMPEDANCE
304
+ // judges a minimumImpedance point only inside the core material's tabulated mu(f) range;
305
+ // a point not listed here was not judged (neither passed nor failed).
306
+ if (name && judgedFrequencies.count(*name)) {
307
+ json judged;
308
+ for (auto& [filter, frequencies] : judgedFrequencies.at(*name)) {
309
+ judged[std::string(magic_enum::enum_name(filter))] = frequencies;
310
+ }
311
+ result["judgedFrequencies"] = judged;
312
+ }
291
313
  results["data"].push_back(result);
292
314
  }
293
315
 
@@ -519,9 +541,19 @@ void register_adviser_bindings(py::module& m) {
519
541
  - "lossesNotEvaluable" (only on such parts): why this part's core losses could
520
542
  not be evaluated -- its core material carries no core-loss model. The part is
521
543
  ranked without any loss-based filter and returned without simulated outputs.
544
+ - "judgedFrequencies" (only with a frequency-wise requirement): the requirement
545
+ frequencies, in Hz, each such filter judged the part on, keyed by filter enum
546
+ name, e.g. {"IMPEDANCE": [150000.0, 1000000.0]}. IMPEDANCE judges a
547
+ minimumImpedance point only inside the core material's tabulated mu(f) range;
548
+ a point not listed was not judged (neither passed nor failed), and the
549
+ IMPEDANCE score is the mean over the listed points.
522
550
  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.
551
+ candidate the search excluded: a filter or the final simulation raised (e.g.
552
+ IMPEDANCE when no minimumImpedance point lies inside the material's mu(f) range),
553
+ or the LOSS_MODEL_FREQUENCY_SPAN gate excluded it because an operating frequency
554
+ lies outside its material's fitted core-loss span while the flow or the final
555
+ simulation computes core losses. Such a candidate is not ranked; this names it
556
+ and the reason instead of dropping it silently.
525
557
 
526
558
  Example:
527
559
  >>> inputs = PyMKF.process_inputs(raw_inputs)
@@ -554,6 +586,10 @@ void register_adviser_bindings(py::module& m) {
554
586
  outputs (losses, temperature). False returns the ranking and the
555
587
  per-filter scores only -- much faster over many results -- and a part
556
588
  whose simulation would fail is then returned rather than dropped.
589
+ The simulation computes core losses at every operating point, so with
590
+ True a part whose material's core-loss fit does not cover an operating
591
+ frequency (e.g. a 50 Hz mains point) is excluded and listed in
592
+ failedCandidates; with False and no loss-based filter it is kept.
557
593
 
558
594
  Returns:
559
595
  JSON object with "data" array containing ranked results.
@@ -566,9 +602,19 @@ void register_adviser_bindings(py::module& m) {
566
602
  not be evaluated -- its core material carries no core-loss model. The part is
567
603
  ranked on the filters that apply to it, with no loss-based filter scored, and
568
604
  is returned without simulated outputs.
605
+ - "judgedFrequencies" (only with a frequency-wise requirement): the requirement
606
+ frequencies, in Hz, each such filter judged the part on, keyed by filter enum
607
+ name, e.g. {"IMPEDANCE": [150000.0, 1000000.0]}. IMPEDANCE judges a
608
+ minimumImpedance point only inside the core material's tabulated mu(f) range;
609
+ a point not listed was not judged (neither passed nor failed), and the
610
+ IMPEDANCE score is the mean over the listed points.
569
611
  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.
612
+ candidate the search excluded: a filter or the final simulation raised (e.g.
613
+ IMPEDANCE when no minimumImpedance point lies inside the material's mu(f) range),
614
+ or the LOSS_MODEL_FREQUENCY_SPAN gate excluded it because an operating frequency
615
+ lies outside its material's fitted core-loss span while the flow or the final
616
+ simulation computes core losses. Such a candidate is not ranked; this names it
617
+ and the reason instead of dropping it silently.
572
618
 
573
619
  Note:
574
620
  Cache must be populated before calling this function.