necpp 2.2.2__tar.gz → 2.2.4__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.
- {necpp-2.2.2/necpp.egg-info → necpp-2.2.4}/PKG-INFO +7 -10
- {necpp-2.2.2 → necpp-2.2.4}/README.md +6 -9
- {necpp-2.2.2 → necpp-2.2.4/necpp.egg-info}/PKG-INFO +7 -10
- {necpp-2.2.2 → necpp-2.2.4}/pyproject.toml +1 -1
- necpp-2.2.4/setup.py +79 -0
- necpp-2.2.2/setup.py +0 -42
- {necpp-2.2.2 → necpp-2.2.4}/LICENCE.txt +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/MANIFEST.in +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/example/antenna_util.py +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/example/different_material.py +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/example/impedance_plot.py +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/example/monopole.py +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/example/optimized.py +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp.egg-info/SOURCES.txt +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp.egg-info/dependency_links.txt +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp.egg-info/top_level.txt +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp.py +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/example/test.py +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/AntennaInput.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/BaseInput.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/CurrentInput.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/PowerBudget.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/RadiationInput.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/XGetopt.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/XGetopt.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_evlcom.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_evlcom.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_geometry.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_geometry.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_ggrid.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_ggrid.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_plot_card.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/c_plot_card.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/common.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/config.h.in +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/electromag.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/electromag.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/libNEC.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/libnecpp.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/math_util.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/matrix_algebra.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/matrix_algebra.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/misc.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/misc.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec2cpp.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_card_parser.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_context.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_context.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_debug.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_exception.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_exception.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_ground.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_ground.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_output.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_output.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_radiation_pattern.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_radiation_pattern.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_results.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_results.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_structure_currents.cpp +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_structure_currents.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/nec_wire.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/safe_array.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_src/src/typesafe_stdint.h +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/necpp_wrap.c +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/setup.cfg +0 -0
- {necpp-2.2.2 → necpp-2.2.4}/tests/test_multiple_sc_cards.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: necpp
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
4
4
|
Summary: Python Antenna Simulation Module (nec2++) C-style interface
|
|
5
5
|
Author-email: Tim Molteno <tim@physics.otago.ac.nz>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -29,13 +29,10 @@ library can be used.
|
|
|
29
29
|
|
|
30
30
|
Tim Molteno. tim@physics.otago.ac.nz
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## News
|
|
33
33
|
|
|
34
|
-
* Version
|
|
35
|
-
|
|
36
|
-
* Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
|
|
37
|
-
* Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
|
|
38
|
-
this is just through the function nec_get_gain().
|
|
34
|
+
* Version 2.2.x Latest releases including Eigen-based matrix solver and
|
|
35
|
+
modern Python packaging (pyproject.toml, uv support).
|
|
39
36
|
|
|
40
37
|
|
|
41
38
|
## Install
|
|
@@ -64,7 +61,7 @@ over a perfect ground.
|
|
|
64
61
|
|
|
65
62
|
def handle_nec(result):
|
|
66
63
|
if (result != 0):
|
|
67
|
-
print
|
|
64
|
+
print(necpp.nec_error_message())
|
|
68
65
|
|
|
69
66
|
def impedance(frequency, z0, height):
|
|
70
67
|
|
|
@@ -83,9 +80,9 @@ over a perfect ground.
|
|
|
83
80
|
necpp.nec_delete(nec)
|
|
84
81
|
return z
|
|
85
82
|
|
|
86
|
-
if
|
|
83
|
+
if __name__ == "__main__":
|
|
87
84
|
z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
|
|
88
|
-
print
|
|
85
|
+
print("Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag))
|
|
89
86
|
|
|
90
87
|
## More Information
|
|
91
88
|
|
|
@@ -10,13 +10,10 @@ library can be used.
|
|
|
10
10
|
|
|
11
11
|
Tim Molteno. tim@physics.otago.ac.nz
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## News
|
|
14
14
|
|
|
15
|
-
* Version
|
|
16
|
-
|
|
17
|
-
* Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
|
|
18
|
-
* Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
|
|
19
|
-
this is just through the function nec_get_gain().
|
|
15
|
+
* Version 2.2.x Latest releases including Eigen-based matrix solver and
|
|
16
|
+
modern Python packaging (pyproject.toml, uv support).
|
|
20
17
|
|
|
21
18
|
|
|
22
19
|
## Install
|
|
@@ -45,7 +42,7 @@ over a perfect ground.
|
|
|
45
42
|
|
|
46
43
|
def handle_nec(result):
|
|
47
44
|
if (result != 0):
|
|
48
|
-
print
|
|
45
|
+
print(necpp.nec_error_message())
|
|
49
46
|
|
|
50
47
|
def impedance(frequency, z0, height):
|
|
51
48
|
|
|
@@ -64,9 +61,9 @@ over a perfect ground.
|
|
|
64
61
|
necpp.nec_delete(nec)
|
|
65
62
|
return z
|
|
66
63
|
|
|
67
|
-
if
|
|
64
|
+
if __name__ == "__main__":
|
|
68
65
|
z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
|
|
69
|
-
print
|
|
66
|
+
print("Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag))
|
|
70
67
|
|
|
71
68
|
## More Information
|
|
72
69
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: necpp
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.4
|
|
4
4
|
Summary: Python Antenna Simulation Module (nec2++) C-style interface
|
|
5
5
|
Author-email: Tim Molteno <tim@physics.otago.ac.nz>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
@@ -29,13 +29,10 @@ library can be used.
|
|
|
29
29
|
|
|
30
30
|
Tim Molteno. tim@physics.otago.ac.nz
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## News
|
|
33
33
|
|
|
34
|
-
* Version
|
|
35
|
-
|
|
36
|
-
* Version 1.7.0.3 includes nec_medium_parameters(). You could simulate an antenna in seawater!
|
|
37
|
-
* Version 1.7.0 includes support for getting elements of radiation patterns. At the moment
|
|
38
|
-
this is just through the function nec_get_gain().
|
|
34
|
+
* Version 2.2.x Latest releases including Eigen-based matrix solver and
|
|
35
|
+
modern Python packaging (pyproject.toml, uv support).
|
|
39
36
|
|
|
40
37
|
|
|
41
38
|
## Install
|
|
@@ -64,7 +61,7 @@ over a perfect ground.
|
|
|
64
61
|
|
|
65
62
|
def handle_nec(result):
|
|
66
63
|
if (result != 0):
|
|
67
|
-
print
|
|
64
|
+
print(necpp.nec_error_message())
|
|
68
65
|
|
|
69
66
|
def impedance(frequency, z0, height):
|
|
70
67
|
|
|
@@ -83,9 +80,9 @@ over a perfect ground.
|
|
|
83
80
|
necpp.nec_delete(nec)
|
|
84
81
|
return z
|
|
85
82
|
|
|
86
|
-
if
|
|
83
|
+
if __name__ == "__main__":
|
|
87
84
|
z = impedance(frequency = 34.5, z0 = 0.5, height = 4.0)
|
|
88
|
-
print
|
|
85
|
+
print("Impedance \t(%6.1f,%+6.1fI) Ohms" % (z.real, z.imag))
|
|
89
86
|
|
|
90
87
|
## More Information
|
|
91
88
|
|
necpp-2.2.4/setup.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# Copyright (c) 2008-2026 Tim Molteno (tim@elec.ac.nz)
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
setup.py file for necpp Python module.
|
|
6
|
+
|
|
7
|
+
This file handles the C extension compilation only.
|
|
8
|
+
All package metadata is in pyproject.toml.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import datetime
|
|
12
|
+
import os
|
|
13
|
+
from glob import glob
|
|
14
|
+
|
|
15
|
+
from setuptools import Extension, setup
|
|
16
|
+
|
|
17
|
+
# ---------------------------------------------------------------------------
|
|
18
|
+
# Generate config.h (normally done by CMake, but needed for pip installs and
|
|
19
|
+
# PEP 517 isolated builds where CMake is not available).
|
|
20
|
+
# ---------------------------------------------------------------------------
|
|
21
|
+
BUILD_DIR = "necpp_src/build"
|
|
22
|
+
os.makedirs(BUILD_DIR, exist_ok=True)
|
|
23
|
+
|
|
24
|
+
# Try to read the version from pyproject.toml; fall back to a known default.
|
|
25
|
+
_version = "2.2.4"
|
|
26
|
+
try:
|
|
27
|
+
import tomllib # Python 3.11+
|
|
28
|
+
except ImportError:
|
|
29
|
+
try:
|
|
30
|
+
import tomli as tomllib
|
|
31
|
+
except ImportError:
|
|
32
|
+
pass
|
|
33
|
+
else:
|
|
34
|
+
with open("pyproject.toml", "rb") as _f:
|
|
35
|
+
_version = tomllib.load(_f)["project"]["version"]
|
|
36
|
+
else:
|
|
37
|
+
with open("pyproject.toml", "rb") as _f:
|
|
38
|
+
_version = tomllib.load(_f)["project"]["version"]
|
|
39
|
+
|
|
40
|
+
_build_date = datetime.date.today().strftime("%Y-%m-%d")
|
|
41
|
+
|
|
42
|
+
_config_h = os.path.join(BUILD_DIR, "config.h")
|
|
43
|
+
with open(_config_h, "w") as _f:
|
|
44
|
+
_f.write(f"""#ifndef CONFIG_H
|
|
45
|
+
#define CONFIG_H
|
|
46
|
+
|
|
47
|
+
#define NECPP_VERSION "{_version}"
|
|
48
|
+
#define NECPP_BUILD_DATE "{_build_date}"
|
|
49
|
+
|
|
50
|
+
#endif /* CONFIG_H */
|
|
51
|
+
""")
|
|
52
|
+
|
|
53
|
+
nec_sources = []
|
|
54
|
+
nec_sources.extend(
|
|
55
|
+
[
|
|
56
|
+
fn
|
|
57
|
+
for fn in glob("necpp_src/src/*.cpp")
|
|
58
|
+
if not os.path.basename(fn).endswith("_tb.cpp")
|
|
59
|
+
if not os.path.basename(fn).startswith("net_solve.cpp")
|
|
60
|
+
if not os.path.basename(fn).startswith("nec2cpp.cpp")
|
|
61
|
+
if not os.path.basename(fn).startswith("necDiff.cpp")
|
|
62
|
+
if not os.path.basename(fn).startswith("nec_wasm.cpp")
|
|
63
|
+
]
|
|
64
|
+
)
|
|
65
|
+
nec_sources.extend(glob("necpp_wrap.c"))
|
|
66
|
+
|
|
67
|
+
# config.h is auto-generated above from pyproject.toml metadata.
|
|
68
|
+
#
|
|
69
|
+
necpp_module = Extension(
|
|
70
|
+
"_necpp",
|
|
71
|
+
sources=nec_sources,
|
|
72
|
+
include_dirs=["necpp_src/src/", "necpp_src/", "necpp_src/build/", "necpp_src/src/eigen"],
|
|
73
|
+
define_macros=[("BUILD_PYTHON", "1")],
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
setup(
|
|
77
|
+
ext_modules=[necpp_module],
|
|
78
|
+
data_files=[("examples", ["necpp_src/example/test.py"])],
|
|
79
|
+
)
|
necpp-2.2.2/setup.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
# Copyright (c) 2008-2026 Tim Molteno (tim@elec.ac.nz)
|
|
3
|
-
|
|
4
|
-
"""
|
|
5
|
-
setup.py file for necpp Python module.
|
|
6
|
-
|
|
7
|
-
This file handles the C extension compilation only.
|
|
8
|
-
All package metadata is in pyproject.toml.
|
|
9
|
-
"""
|
|
10
|
-
|
|
11
|
-
import os
|
|
12
|
-
from glob import glob
|
|
13
|
-
|
|
14
|
-
from setuptools import Extension, setup
|
|
15
|
-
|
|
16
|
-
nec_sources = []
|
|
17
|
-
nec_sources.extend(
|
|
18
|
-
[
|
|
19
|
-
fn
|
|
20
|
-
for fn in glob("necpp_src/src/*.cpp")
|
|
21
|
-
if not os.path.basename(fn).endswith("_tb.cpp")
|
|
22
|
-
if not os.path.basename(fn).startswith("net_solve.cpp")
|
|
23
|
-
if not os.path.basename(fn).startswith("nec2cpp.cpp")
|
|
24
|
-
if not os.path.basename(fn).startswith("necDiff.cpp")
|
|
25
|
-
if not os.path.basename(fn).startswith("nec_wasm.cpp")
|
|
26
|
-
]
|
|
27
|
-
)
|
|
28
|
-
nec_sources.extend(glob("necpp_wrap.c"))
|
|
29
|
-
|
|
30
|
-
# config.h is generated by CMake into necpp_src/build/ (run build.sh first).
|
|
31
|
-
#
|
|
32
|
-
necpp_module = Extension(
|
|
33
|
-
"_necpp",
|
|
34
|
-
sources=nec_sources,
|
|
35
|
-
include_dirs=["necpp_src/src/", "necpp_src/", "necpp_src/build/", "necpp_src/src/eigen"],
|
|
36
|
-
define_macros=[("BUILD_PYTHON", "1")],
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
setup(
|
|
40
|
-
ext_modules=[necpp_module],
|
|
41
|
-
data_files=[("examples", ["necpp_src/example/test.py"])],
|
|
42
|
-
)
|
|
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
|