PyOpenMagnetics 1.4.3__tar.gz → 1.4.5__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.4.3 → pyopenmagnetics-1.4.5}/CMakeLists.txt +21 -5
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/PKG-INFO +1 -1
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/pyproject.toml +1 -1
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/utils.cpp +10 -6
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/utils.h +1 -1
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/.github/workflows/ci.yml +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/.github/workflows/publish.yml +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/.gitignore +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/AGENTS.md +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/LICENSE +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/PyOpenMagnetics.pyi +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/README.md +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/__init__.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/api/MAS.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/api/mas_db_reader.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/api/validation.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/clear_cibuildwheel_cache.sh +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/docs/compatibility.md +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/docs/errors.md +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/docs/performance.md +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/README.md +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/buck_inductor.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/complete_simulation_example.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/converter_design_example.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/debug_bobbin.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/debug_coil.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/debug_core.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/debug_plotting.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/flyback_220v_12v_1a.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/flyback_220v_12v_2a_complete.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/flyback_bh_curve.png +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/flyback_core.png +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/flyback_design.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/flyback_summary.png +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/flyback_waveforms.png +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/list_plot_funcs.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/plot_flyback_design.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/plot_flyback_pyom.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/test_field_calc.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/examples/test_field_plot.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/force_fresh_build.sh +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/llms.txt +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/notebooks/01_getting_started.ipynb +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/notebooks/02_buck_inductor.ipynb +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/notebooks/03_core_losses.ipynb +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/notebooks/README.md +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/requirements.txt +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/advisers.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/advisers.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/bobbin.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/bobbin.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/common.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/converter.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/converter.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/core.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/core.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/database.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/database.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/logging.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/logging.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/losses.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/losses.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/module.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/plotting.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/plotting.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/settings.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/settings.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/simulation.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/simulation.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/winding.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/winding.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/wire.cpp +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/src/wire.h +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/test.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/__init__.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/conftest.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_converter_endpoints.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_core.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_core_adviser.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_examples_integration.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_inputs.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_logging.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_magnetic_adviser.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_plotting.py +0 -0
- {pyopenmagnetics-1.4.3 → pyopenmagnetics-1.4.5}/tests/test_winding.py +0 -0
|
@@ -182,11 +182,27 @@ if(NOT LOCAL_MKF_MAS)
|
|
|
182
182
|
message(STATUS "MAS git error: ${MAS_GIT_ERROR}")
|
|
183
183
|
endif()
|
|
184
184
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
185
|
+
# Always delete and repopulate MKF to ensure we get the latest main,
|
|
186
|
+
# mirroring the MAS refresh above. FetchContent will NOT re-fetch an
|
|
187
|
+
# already-cloned source dir even with GIT_TAG main, so a persisted build
|
|
188
|
+
# dir (incremental CI cache, local rebuilds) otherwise keeps a STALE MKF
|
|
189
|
+
# checkout — fixes merged to MKF main would silently never reach the wheel.
|
|
190
|
+
if(EXISTS ${CMAKE_BINARY_DIR}/_deps/mkf-src)
|
|
191
|
+
message(STATUS "Removing old MKF source to force fresh clone")
|
|
192
|
+
file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/_deps/mkf-src)
|
|
193
|
+
endif()
|
|
194
|
+
message(STATUS "Populating MKF")
|
|
195
|
+
FetchContent_Populate(MKF)
|
|
196
|
+
# Show git log to verify we built against MKF main HEAD
|
|
197
|
+
execute_process(
|
|
198
|
+
COMMAND git -C ${mkf_SOURCE_DIR} log --oneline -1
|
|
199
|
+
OUTPUT_VARIABLE MKF_GIT_LOG
|
|
200
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
201
|
+
ERROR_VARIABLE MKF_GIT_ERROR
|
|
202
|
+
)
|
|
203
|
+
message(STATUS "MKF version: ${MKF_GIT_LOG}")
|
|
204
|
+
if(MKF_GIT_ERROR)
|
|
205
|
+
message(STATUS "MKF git error: ${MKF_GIT_ERROR}")
|
|
190
206
|
endif()
|
|
191
207
|
|
|
192
208
|
message(STATUS ${MAS_SOURCE_DIR})
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
namespace PyMKF {
|
|
4
4
|
|
|
5
|
-
double resolve_dimension_with_tolerance(json dimensionWithToleranceJson) {
|
|
5
|
+
double resolve_dimension_with_tolerance(json dimensionWithToleranceJson, std::string preferredValue) {
|
|
6
6
|
DimensionWithTolerance dimensionWithTolerance(dimensionWithToleranceJson);
|
|
7
|
-
|
|
7
|
+
OpenMagnetics::DimensionalValues preferred = json(preferredValue).get<OpenMagnetics::DimensionalValues>();
|
|
8
|
+
return OpenMagnetics::resolve_dimensional_values(dimensionWithTolerance, preferred);
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
json calculate_basic_processed_data(json waveformJson) {
|
|
@@ -347,16 +348,19 @@ void register_utils_bindings(py::module& m) {
|
|
|
347
348
|
m.def("resolve_dimension_with_tolerance", &resolve_dimension_with_tolerance,
|
|
348
349
|
R"pbdoc(
|
|
349
350
|
Resolve a dimension specification that may include tolerances.
|
|
350
|
-
|
|
351
|
+
|
|
351
352
|
Extracts a single value from dimension data that may contain
|
|
352
353
|
nominal, minimum, and maximum values.
|
|
353
|
-
|
|
354
|
+
|
|
354
355
|
Args:
|
|
355
356
|
dimension_json: JSON object with dimension specification.
|
|
356
|
-
|
|
357
|
+
preferred: Which value to prefer when present — "Nominal" (default),
|
|
358
|
+
"Maximum", or "Minimum".
|
|
359
|
+
|
|
357
360
|
Returns:
|
|
358
361
|
Resolved dimension value as float.
|
|
359
|
-
)pbdoc"
|
|
362
|
+
)pbdoc",
|
|
363
|
+
py::arg("dimensionWithToleranceJson"), py::arg("preferredValue") = "Nominal");
|
|
360
364
|
|
|
361
365
|
m.def("calculate_basic_processed_data", &calculate_basic_processed_data,
|
|
362
366
|
R"pbdoc(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
namespace PyMKF {
|
|
5
5
|
|
|
6
6
|
// Utility functions for processing and calculations
|
|
7
|
-
double resolve_dimension_with_tolerance(json dimensionWithToleranceJson);
|
|
7
|
+
double resolve_dimension_with_tolerance(json dimensionWithToleranceJson, std::string preferredValue = "Nominal");
|
|
8
8
|
json calculate_basic_processed_data(json waveformJson);
|
|
9
9
|
json calculate_harmonics(json waveformJson, double frequency);
|
|
10
10
|
json calculate_sampled_waveform(json waveformJson, double frequency);
|
|
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
|