simpleEMS 0.1.0__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.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: simpleEMS
3
+ Version: 0.1.0
4
+ Summary: simpleEMS is a framework built on top of openEMS to make design and simulation of antennas and other microwave structures simpler
5
+ License-Expression: AGPL-3.0-or-later
6
+ Classifier: Development Status :: 3 - Alpha
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Intended Audience :: Education
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Topic :: Scientific/Engineering
13
+ Requires-Dist: cadquery==2.8.0
14
+ Requires-Dist: h5py==3.15.1
15
+ Requires-Dist: matplotlib==3.10.8
16
+ Requires-Dist: mplcursors==0.7
17
+ Requires-Dist: numpy==2.4.4
18
+ Requires-Dist: pyqt6==6.10.1
19
+ Requires-Dist: pysmithchart==0.4.1
20
+ Requires-Dist: pyvista==0.46.4
21
+ Requires-Dist: pyvistaqt==0.11.3
22
+ Requires-Dist: rich==14.3.3
23
+ Requires-Dist: scikit-rf==1.9.0
24
+ Requires-Dist: scipy==1.16.3
25
+ Requires-Dist: typer==0.26.8
26
+ Requires-Dist: bump-my-version==1.4.1 ; extra == 'dev'
27
+ Requires-Dist: myst-parser==5.0.0 ; extra == 'dev'
28
+ Requires-Dist: prek==0.3.13 ; extra == 'dev'
29
+ Requires-Dist: pydata-sphinx-theme==0.16.1 ; extra == 'dev'
30
+ Requires-Dist: ruff==0.15.12 ; extra == 'dev'
31
+ Requires-Dist: sphinx>=7.2 ; extra == 'dev'
32
+ Requires-Dist: sphinx-automodapi==0.22.0 ; extra == 'dev'
33
+ Requires-Dist: sphinx-copybutton>=0.5.2 ; extra == 'dev'
34
+ Requires-Python: >=3.11
35
+ Provides-Extra: dev
36
+ Description-Content-Type: text/markdown
37
+
38
+ # simpleEMS
39
+ [![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL_v3_or_later-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
40
+ [![PyPI Version](https://img.shields.io/pypi/v/project-name.svg)](https://pypi.org/project/project-name/)
41
+ [![Python Version](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org)
42
+
43
+ simpleEMS is a python library built on top of [openEMS](https://openems.readthedocs.io/en/latest/) to make the design of antennas and other RF structures simpler.
44
+
45
+ ## Motivation
46
+
47
+ This Python package provides an alternative to proprietary suites with expensive licenses or the restrictive "Student" versions such as CST, HFSS and Sonnet
48
+ which often impose stifling mesh cell limits and memory caps. By leveraging the openEMS FDTD engine, it offers a scalable framework for simulating, optimizing, and
49
+ visualizing complex RF designs. whether you are a professional engineer, a freelancer, or a dedicated hobbyist,
50
+ this library will enable you to design RF circuits easily.
51
+
52
+ ## Key Features:
53
+
54
+ ### **Antenna Design**
55
+ - Inset-Fed Patch Antenna Design
56
+ - Probe-Fed Patch Antenna Design
57
+
58
+ ### **Filter Design**
59
+ - Bandpass Quarter-Wave Filter Design
60
+ - Bandstop Quarter-wave Filter Design
61
+
62
+ ### **Simulation & Optimization**
63
+ - Parameter Sweep
64
+ - S11 Optimization
65
+ - S21 Optimization
66
+
67
+ ### **Network Parameters Calculation**
68
+ - S11 (Reflection Coefficient)
69
+ - S21 (Insertion Loss)
70
+ - VSWR (Voltage Standing Wave Ratio)
71
+ - Z11 (Input Impedance)
72
+ - Input Power
73
+
74
+ ### **Visualization & Plotting**
75
+ - Geometry Structure Visualization
76
+ - S11 Plotting
77
+ - S21 Plotting
78
+ - VSWR Plotting
79
+ - Smith Chart for S11
80
+ - Complex Impedance (Z11) Plotting
81
+ - 2D Radiation Pattern
82
+ - 2D Directivity Plot
83
+ - 3D Radiation Pattern, Gain & Power Plot
84
+
85
+ ### **Field Dump**
86
+ - Field Dump for ParaView
87
+ - E-Field (Time and Frequency Domain)
88
+ - H-Field (Time and Frequency Domain)
89
+ - Current Density (Time and Frequency Domain)
90
+
91
+ ### **Export Options**
92
+ - Gerber Export
93
+ - STL Export
94
+ - Touchstone SnP Export
95
+
96
+ ## Demo
97
+ [This example](./examples/simple_inset_fed_patch_antenna.py) creates an inset fed patch antenna and simulates the created model.
98
+
99
+ ```{literalinclude} ../../examples/simple_inset_fed_patch_antenna.py
100
+ ```
101
+
102
+ Below is a visualisation of the model created by the above code
103
+
104
+ ![patch_antenna_2_45GHz.png](./images/patch_antenna_2_45GHz.png)
105
+ The result of the simulation
106
+ ![s11.png](./images/s11.png)
107
+
108
+ ![smith_chart.png](./images/smith_chart.png)
109
+
110
+ ![z11.png](./images/z11.png)
111
+
112
+ ![vswr.png](./images/vswr.png)
113
+
114
+ ![radiation_pattern.png](./images/radiation_polar.png)
115
+
116
+ ![directivity_polar.png](./images/directivity_polar.png)
117
+
118
+ ![3d_directivity.png](./images/3d_directivity.png)
119
+
120
+ ![3d_gain.png](./images/3d_gain.png)
121
+
122
+ ![3d_power.png](./images/3d_power_pattern.png)
123
+
124
+
125
+
126
+ ## Installation
127
+
128
+ Refer to the installation instructions in the docs.
129
+
@@ -0,0 +1,92 @@
1
+ # simpleEMS
2
+ [![License: AGPL-3.0-or-later](https://img.shields.io/badge/License-AGPL_v3_or_later-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
3
+ [![PyPI Version](https://img.shields.io/pypi/v/project-name.svg)](https://pypi.org/project/project-name/)
4
+ [![Python Version](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org)
5
+
6
+ simpleEMS is a python library built on top of [openEMS](https://openems.readthedocs.io/en/latest/) to make the design of antennas and other RF structures simpler.
7
+
8
+ ## Motivation
9
+
10
+ This Python package provides an alternative to proprietary suites with expensive licenses or the restrictive "Student" versions such as CST, HFSS and Sonnet
11
+ which often impose stifling mesh cell limits and memory caps. By leveraging the openEMS FDTD engine, it offers a scalable framework for simulating, optimizing, and
12
+ visualizing complex RF designs. whether you are a professional engineer, a freelancer, or a dedicated hobbyist,
13
+ this library will enable you to design RF circuits easily.
14
+
15
+ ## Key Features:
16
+
17
+ ### **Antenna Design**
18
+ - Inset-Fed Patch Antenna Design
19
+ - Probe-Fed Patch Antenna Design
20
+
21
+ ### **Filter Design**
22
+ - Bandpass Quarter-Wave Filter Design
23
+ - Bandstop Quarter-wave Filter Design
24
+
25
+ ### **Simulation & Optimization**
26
+ - Parameter Sweep
27
+ - S11 Optimization
28
+ - S21 Optimization
29
+
30
+ ### **Network Parameters Calculation**
31
+ - S11 (Reflection Coefficient)
32
+ - S21 (Insertion Loss)
33
+ - VSWR (Voltage Standing Wave Ratio)
34
+ - Z11 (Input Impedance)
35
+ - Input Power
36
+
37
+ ### **Visualization & Plotting**
38
+ - Geometry Structure Visualization
39
+ - S11 Plotting
40
+ - S21 Plotting
41
+ - VSWR Plotting
42
+ - Smith Chart for S11
43
+ - Complex Impedance (Z11) Plotting
44
+ - 2D Radiation Pattern
45
+ - 2D Directivity Plot
46
+ - 3D Radiation Pattern, Gain & Power Plot
47
+
48
+ ### **Field Dump**
49
+ - Field Dump for ParaView
50
+ - E-Field (Time and Frequency Domain)
51
+ - H-Field (Time and Frequency Domain)
52
+ - Current Density (Time and Frequency Domain)
53
+
54
+ ### **Export Options**
55
+ - Gerber Export
56
+ - STL Export
57
+ - Touchstone SnP Export
58
+
59
+ ## Demo
60
+ [This example](./examples/simple_inset_fed_patch_antenna.py) creates an inset fed patch antenna and simulates the created model.
61
+
62
+ ```{literalinclude} ../../examples/simple_inset_fed_patch_antenna.py
63
+ ```
64
+
65
+ Below is a visualisation of the model created by the above code
66
+
67
+ ![patch_antenna_2_45GHz.png](./images/patch_antenna_2_45GHz.png)
68
+ The result of the simulation
69
+ ![s11.png](./images/s11.png)
70
+
71
+ ![smith_chart.png](./images/smith_chart.png)
72
+
73
+ ![z11.png](./images/z11.png)
74
+
75
+ ![vswr.png](./images/vswr.png)
76
+
77
+ ![radiation_pattern.png](./images/radiation_polar.png)
78
+
79
+ ![directivity_polar.png](./images/directivity_polar.png)
80
+
81
+ ![3d_directivity.png](./images/3d_directivity.png)
82
+
83
+ ![3d_gain.png](./images/3d_gain.png)
84
+
85
+ ![3d_power.png](./images/3d_power_pattern.png)
86
+
87
+
88
+
89
+ ## Installation
90
+
91
+ Refer to the installation instructions in the docs.
92
+
@@ -0,0 +1,75 @@
1
+ [project]
2
+ name = "simpleEMS"
3
+ version = "0.1.0"
4
+ description = "simpleEMS is a framework built on top of openEMS to make design and simulation of antennas and other microwave structures simpler"
5
+ readme = "README.md"
6
+ license = "AGPL-3.0-or-later"
7
+ requires-python = ">=3.11"
8
+
9
+ classifiers = [
10
+ "Development Status :: 3 - Alpha",
11
+ "Intended Audience :: Science/Research",
12
+ "Intended Audience :: Education",
13
+ "Programming Language :: Python :: 3.11",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Topic :: Scientific/Engineering",
17
+ ]
18
+
19
+
20
+ dependencies = [
21
+ "cadquery==2.8.0",
22
+ "h5py==3.15.1",
23
+ "matplotlib==3.10.8",
24
+ "mplcursors==0.7",
25
+ "numpy==2.4.4",
26
+ "pyqt6==6.10.1",
27
+ "pysmithchart==0.4.1",
28
+ "pyvista==0.46.4",
29
+ "pyvistaqt==0.11.3",
30
+ "rich==14.3.3",
31
+ "scikit-rf==1.9.0",
32
+ "scipy==1.16.3",
33
+ "typer==0.26.8",
34
+ ]
35
+
36
+ [project.optional-dependencies]
37
+ dev = [
38
+ "bump-my-version==1.4.1",
39
+ "myst-parser==5.0.0",
40
+ "prek==0.3.13",
41
+ "pydata-sphinx-theme==0.16.1",
42
+ "ruff==0.15.12",
43
+ "sphinx>=7.2",
44
+ "sphinx-automodapi==0.22.0",
45
+ "sphinx-copybutton>=0.5.2",
46
+ ]
47
+
48
+ [project.scripts]
49
+ simpleems = "simpleEMS.cli:app"
50
+
51
+ [build-system]
52
+ requires = ["uv_build>=0.11.24,<0.12"]
53
+ build-backend = "uv_build"
54
+
55
+ [tool.uv.build-backend]
56
+ module-name = "simpleEMS"
57
+ module-root = ""
58
+
59
+ [tool.bumpversion]
60
+ current_version = "0.1.0"
61
+ commit = true
62
+ tag = true
63
+ tag_name = "v{new_version}"
64
+ allow_dirty = false
65
+ message = "Bump version: {current_version} → {new_version}"
66
+
67
+ [[tool.bumpversion.files]]
68
+ filename = "pyproject.toml"
69
+ search = 'version = "{current_version}"'
70
+ replace = 'version = "{new_version}"'
71
+
72
+ [[tool.bumpversion.files]]
73
+ filename = "simpleEMS/__init__.py"
74
+ search = '__version__ = "{current_version}"'
75
+ replace = '__version__ = "{new_version}"'
@@ -0,0 +1,89 @@
1
+ # simpleEMS
2
+ # Copyright (C) 2026 Mohamoud Ali
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU Affero General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU Affero General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU Affero General Public License
15
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+ """
18
+ simpleEMS — A Python library built on openEMS for simplified antenna
19
+ and RF structure design, simulation, optimisation, and visualisation.
20
+ """
21
+
22
+ import importlib
23
+
24
+
25
+ _NAMES_BY_MODULE = {
26
+ "microstrip_line": ["MicrostripLine", "MicrostripLineParams"],
27
+ "patch_antenna": [
28
+ "InsetFedPatchAntenna",
29
+ "InsetFedPatchParams",
30
+ "ProbeFedPatchAntenna",
31
+ "ProbeFedPatchParams",
32
+ ],
33
+ "quarterwave_stub_filter": [
34
+ "QuarterWaveFilterParams",
35
+ "BandStopQuarterWaveFilter",
36
+ "BandPassQuarterWaveFilter",
37
+ ],
38
+ "standalone_model": ["simulate_model"],
39
+ "sim_tools": [
40
+ "DumpType",
41
+ "SimTools",
42
+ "optimize_s11",
43
+ "optimize_s21",
44
+ "optimize_s_params",
45
+ "param_sweep",
46
+ "setup_simulation",
47
+ ],
48
+ }
49
+
50
+ _NAME_TO_MODULE = {}
51
+
52
+ for _module_name, _names in _NAMES_BY_MODULE.items():
53
+ for _name in _names:
54
+ _NAME_TO_MODULE[_name] = _module_name
55
+
56
+
57
+ def __getattr__(name: str) -> object:
58
+ module_name = _NAME_TO_MODULE.get(name)
59
+ if module_name is not None:
60
+ module = importlib.import_module(f".{module_name}", __package__)
61
+ value = getattr(module, name)
62
+ globals()[name] = value
63
+ return value
64
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
65
+
66
+
67
+ __all__ = [
68
+ "InsetFedPatchAntenna",
69
+ "ProbeFedPatchAntenna",
70
+ "MicrostripLine",
71
+ "InsetFedPatchParams",
72
+ "ProbeFedPatchParams",
73
+ "MicrostripLineParams",
74
+ "QuarterWaveFilterParams",
75
+ "BandStopQuarterWaveFilter",
76
+ "BandPassQuarterWaveFilter",
77
+ "DumpType",
78
+ "SimTools",
79
+ "setup_simulation",
80
+ "optimize_s11",
81
+ "optimize_s21",
82
+ "optimize_s_params",
83
+ "param_sweep",
84
+ "simulate_model",
85
+ ]
86
+
87
+ __version__ = "0.1.0"
88
+ __author__ = "Mohamoud Ali"
89
+ __license__ = "AGPL-3.0-or-later"