Skip to main content

A pure-Python method-of-moments antenna simulator with optional C++ accelerators

Project description

momwire

A pure-Python method-of-moments antenna simulator with optional C++ accelerators (pybind11).

Extracted from antenna_designer.

Install

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .

macOS: the C++ accelerator uses Homebrew's OpenMP runtime, so brew install libomp is required — both to compile from source and to run the prebuilt Apple-Silicon wheel. The wheel deliberately does not bundle libomp (it links Homebrew's by absolute path) so that it shares a single OpenMP runtime with pynec-accel; two private copies in one process abort with OMP: Error #15 (or deadlock). Without libomp installed, the accelerator can't load and momwire warns and falls back to the slower pure-Python path. On Linux the system libgomp covers this, so no extra step is needed.

Test

pip install -e ".[test]"   # core + test deps (pytest, matplotlib, scikit-rf)
pytest tests/

The cross-validation against NEC2 (tests/test_pynec_backend.py) additionally needs PyNEC — a test-only dependency installed separately from a wheel (see below). Those tests skip cleanly when it isn't present; everything else runs without it.

Optional: PyNEC backend (test-only)

momwire can be cross-validated against NEC2 via PyNEC (the tests/test_pynec_backend.py suite); NEC2 also delivers ~5–10× faster single-frequency solves. PyNEC is a test-flow-only dependency — momwire's own solver never imports it.

Install the PyNEC wheel

Install PyNEC from the python-necpp fork's release. The wheels are self-contained — OpenBLAS is vendored (via scipy-openblas32), so no system BLAS, SWIG, or build toolchain is needed — and cover Linux + Windows on CPython 3.10–3.14:

pip install PyNEC --no-index \
    --find-links https://github.com/stevenmburns/python-necpp/releases/expanded_assets/v1.7.4-accel.1

--no-index ensures pip takes the fork's wheel rather than upstream PyNEC on PyPI (same version, but its builds are broken on current Python and it lacks the OpenBLAS/OpenMP work). After install, from PyNEC import nec_context works and the cross-validation tests run; without it they're skipped (momwire itself needs no PyNEC).

Runtime thread pinning

The wheel links OpenBLAS and parallelises the NEC2 matrix fill with OpenMP. Pick thread counts up front:

export OMP_NUM_THREADS=$(nproc --all)   # PyNEC matrix fill
export OPENBLAS_NUM_THREADS=1           # muzzle numpy/scipy's idle pool

Pinning OPENBLAS_NUM_THREADS=1 stops numpy/scipy from spinning up their own OpenBLAS thread pool that contends with PyNEC's threads on the same cores. On a 100-director Yagi (2142 segs) this is worth ~8% wall time at NP=4.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

momwire-0.2.3.tar.gz (160.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

momwire-0.2.3-cp314-cp314-win_amd64.whl (791.8 kB view details)

Uploaded CPython 3.14Windows x86-64

momwire-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

momwire-0.2.3-cp314-cp314-macosx_14_0_arm64.whl (276.5 kB view details)

Uploaded CPython 3.14macOS 14.0+ ARM64

momwire-0.2.3-cp313-cp313-win_amd64.whl (767.9 kB view details)

Uploaded CPython 3.13Windows x86-64

momwire-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

momwire-0.2.3-cp313-cp313-macosx_14_0_arm64.whl (276.7 kB view details)

Uploaded CPython 3.13macOS 14.0+ ARM64

momwire-0.2.3-cp312-cp312-win_amd64.whl (767.9 kB view details)

Uploaded CPython 3.12Windows x86-64

momwire-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

momwire-0.2.3-cp312-cp312-macosx_14_0_arm64.whl (276.7 kB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

momwire-0.2.3-cp311-cp311-win_amd64.whl (764.5 kB view details)

Uploaded CPython 3.11Windows x86-64

momwire-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

momwire-0.2.3-cp311-cp311-macosx_14_0_arm64.whl (274.5 kB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

momwire-0.2.3-cp310-cp310-win_amd64.whl (764.3 kB view details)

Uploaded CPython 3.10Windows x86-64

momwire-0.2.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

momwire-0.2.3-cp310-cp310-macosx_14_0_arm64.whl (273.4 kB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

File details

Details for the file momwire-0.2.3.tar.gz.

File metadata

  • Download URL: momwire-0.2.3.tar.gz
  • Upload date:
  • Size: 160.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momwire-0.2.3.tar.gz
Algorithm Hash digest
SHA256 5b09ba806fb9c8b868c83615c56c4827e97e4476b29da3ca1a6269dbad7f0da6
MD5 b251577493b09acfc8aa66f142e3c1f4
BLAKE2b-256 9ce9e95bc02a24851dc11cfd6e852d7aed270a0ab9974211d6e7a08a7bf3480e

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3.tar.gz:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: momwire-0.2.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 791.8 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momwire-0.2.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f9dcbd5d82ea6132a8859e07056ef8f7ed94d6230bc339f87956187d119ff62d
MD5 61335f09578fbf0b2fc6e160144baf4c
BLAKE2b-256 3e39e19282a1ce583cc422bf1fad84b194b4facd463b0c5b238ce56517714dd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp314-cp314-win_amd64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bd59684c9d1f1bfb3624ee8ffff4e53ed5b2077548d08060f08aca9ea14fb8ec
MD5 7ed52bf316b9017e606e485376721ba3
BLAKE2b-256 f5b027c0c0468dc880933028d38e8be890e15555de1b86510bcc76abe6d7d316

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp314-cp314-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp314-cp314-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 acc67b135e35161a40cd3f52a8560c9e6386ba129eef7e4307440769cdca72ae
MD5 1025c2d39763f4d6d24e3a6ad4c220d3
BLAKE2b-256 fd1295dc12c0c0bbf50aac23167d79e07895f7005ce7b86e25b79afc73eeac17

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp314-cp314-macosx_14_0_arm64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: momwire-0.2.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 767.9 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momwire-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 03cc15b808d80c06609665a6f8c5d3e117f878851e815e7055771f0371a3a1d7
MD5 b75e81da58cdbac436230c4f91fe5fcd
BLAKE2b-256 2e983889c5cbf1eb701e178a82f42de3965bac755da754c833d57b6f1296c0ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f5055f14f12e43586d20131a6814321382ec37276ac11a0645aa5047f76e5002
MD5 35b6f33249fd31190ab4934df14782ee
BLAKE2b-256 0af125e1303cf710ac20ac78d96063c95078ce820bf94fe29a93aa056410fea6

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 bee026aba8aad242d12405acd6586f015554bc9f3cbe285b78e30f95e40dd64b
MD5 e91966f0dc1104dbe4ed98cf4d0459e8
BLAKE2b-256 5121a08089f6f8449e6c415e18a5e112915018a3fc271f876a1707dd9f29594d

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp313-cp313-macosx_14_0_arm64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: momwire-0.2.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 767.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momwire-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e255e3003a838473b450a1fab60a604ae4be87a01361e5b8541fa3ba490cdb15
MD5 2d75e7c918186628321238d00a95fc2d
BLAKE2b-256 e6eae5b8651e3b5dbbd0c976aef0d47129114ead9959c552b5c46036dccc5e0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 68e46b02706674ee8268dbf10c96f6446d4b778373a689a51ab8286518c9b80f
MD5 ef23bf82cb2857bfc844274f61ebdee6
BLAKE2b-256 16407a55dd0f710d1ab82fed9456d248d987e7f9a5b86fe7f240bcb1f7fe1367

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 024ffcaaff88525d26ef772a0f00bb05189866253ed741e89aa6aa9c3d7337bb
MD5 d9c3bbe7626becc804d16b234f78ec04
BLAKE2b-256 f14960ef6e108ad3d03c3a88a402b261b9f66b9eb7825ce0d5d79cf5dd32852c

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp312-cp312-macosx_14_0_arm64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: momwire-0.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 764.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momwire-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 17526fac270a9ebfcb948e3291da2e947f3a7c0e9f751bc8ae75acae1aa16898
MD5 4a27baa9a97988e112cd2bae8df4fd43
BLAKE2b-256 c97a667942f30dca62eb2cbb3fa41c40c5df9e9cd7e6efef14c03a77d9c78333

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b2d5ea08b931ef118b4826073b47e027d9e847848c44bc7195b0f0804b85f8fe
MD5 d0947a78bd51199b8e18d1ef629c1d0f
BLAKE2b-256 0d2b78f7f4ddff50b5f1b6cee0ba44e56b71cc8ed7066b77c8e440f4f167ad48

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5dec43909c733339fc5b2c2540dc6daa80af68bf704fc1414ea53d527b3c7e74
MD5 a6f415e1082e9a48014429f9b7b36e1d
BLAKE2b-256 869b9dced95e259a99a644c6a654c90e0e91f8e1c4474bec1a5df2a4692e8a43

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp311-cp311-macosx_14_0_arm64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: momwire-0.2.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 764.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for momwire-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cb04cdfaf19a5cf39cd9d7841ab08f0c76884fd3411a003ce0249aabfeb88b54
MD5 19f702e2c7cf51e332df17f223a1a2d8
BLAKE2b-256 c824495b2251b1d7b4870979f7e7e788831c699753da73cf46466815d1924b8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d966bfcebb7cf12346b707b9240ca96966b8a337af8c43f562164b92cc2fa87
MD5 c470d7460515570390d30f955b1a4d97
BLAKE2b-256 2eda0e1f1eb4857ee113a71d0d9c8f15eb8835ebfa78ec1b752678af549a6970

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file momwire-0.2.3-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for momwire-0.2.3-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 98a7a563891e75168a29d5d49596bf7bf035e3f31e5f541271891aea9e1f04bb
MD5 1c95d25924eacf5a4a7d04a62c8cd9a5
BLAKE2b-256 193adbcaa351fca02c50c35c8725abd8ff8547d97379c15dae4181974c92fd0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for momwire-0.2.3-cp310-cp310-macosx_14_0_arm64.whl:

Publisher: wheels.yml on stevenmburns/momwire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page