Commit Graph

59 Commits (e7620dcd72e7913d8f34822a864baee7c68dce08)

Author SHA1 Message Date
Tobias Oberstein e7620dcd72 also add cython (everything but setuptools) 2023-12-16 11:01:36 +01:00
Tobias Oberstein 5bc31d0255 add missing package python dependencies 2023-12-16 11:01:36 +01:00
Tobias Oberstein eb4845975a add tested python impls to pkg spec; fixes #127 2023-12-16 11:01:36 +01:00
Tobias Oberstein 831bd7c835 re-sync python package version with current openEMS release 2023-12-16 11:01:36 +01:00
Tobias Oberstein bf30b7d94a fix cython import 2023-12-16 11:01:36 +01:00
Chris Madsen 5b8cf2f2ed Dmax is in linear power units, so convert to dB power before adding to dB power. 2023-11-18 13:25:28 +01:00
gammaxy1 6212d1de68 PML_8 typo in docstring 2023-11-18 13:25:28 +01:00
Yifeng Li 486f3140cb openEMS.pyx: check canonical path in assert, close #113.
Currently, running openEMS's example Python scripts on macOS always fails
with the following error:

    $ python3 MSL_NotchFilter.py
    Traceback (most recent call last):
      File "/Users/gentoo/code/openEMS-Project/openEMS/python/Tutorials/MSL_NotchFilter.py", line 103, in <module>
        FDTD.Run(Sim_Path, cleanup=True)
      File "openEMS/openEMS.pyx", line 489, in openEMS.openEMS.openEMS.Run
    AssertionError

This is caused by an oversight of an assertion in openEMS.pyx:

    os.chdir(sim_path)
    # ...
    assert os.getcwd() == sim_path

The problem here is that "sim_path" is not a canonical path name,
so the assertion would fail if the path we're switching into contains
a symbolic link. This problem affects all operating systems, it's not
limited to macOS. But on macOS, the problem is especially serious,
since macOS's "/tmp" is a link to "/private/tmp" by default. Thus, it
causes an AssertionError in all the included Python examples.

Instead of doing "assert os.getcwd() == sim_path", we should write
"assert os.getcwd() == os.path.realpath(sim_path)" to ensure that
we're checking a canonical path.

Signed-off-by: Yifeng Li <tomli@tomli.me>
2023-05-03 18:46:29 +02:00
Thorsten Liebig c651cce61f Merge remote-tracking branch 'drake/feature/estimate-cfl-timestep' 2023-03-19 11:45:14 +01:00
Gonzalo José Carracedo Carballal cf34998b01 Add missing import 2023-03-06 21:46:43 +01:00
Gonzalo José Carracedo Carballal 3eb4439959 Improve readability of mesh_estimate_cfl_timestep 2023-03-06 21:45:17 +01:00
Gonzalo José Carracedo Carballal 6440b408ac Implement mesh_estimate_cfl_timestep 2023-03-06 20:36:50 +01:00
Thorsten Liebig cb63ab01c4 python: fix automesh type detection
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2023-03-05 20:33:07 +01:00
Thorsten Liebig 704fad6dc4 python: cleanup should not crash if folder cannot be removed
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2023-02-22 18:57:52 +01:00
Thorsten Liebig cbbae61c24 python: fix TD for MSL ports with set ref. impedance
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2023-02-22 18:57:17 +01:00
Yifeng Li 8e408307b8 python/ports.py: replace deprecated "np.int" with "int".
Accroding to NumPy's development team, "for a long time, np.int has
been an alias of the builtin int. This is repeatedly a cause of
confusion for newcomers, and existed mainly for historic reasons."

This and many other aliases have been deprecated since NumPy v1.20.0,
and at this point they've been completely removed. Replace "np.int"
with "int" allows ports.py to run again.

Signed-off-by: Yifeng Li <tomli@tomli.me>
2023-02-22 18:41:43 +01:00
Thorsten Liebig 0342eefd27 python tutorials: use new/better automesh options for CRLH examples
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2023-01-07 20:52:36 +01:00
Thorsten Liebig 595c8effbd python: improve automesh options
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2023-01-07 20:50:32 +01:00
Thorsten Liebig a0e45f8869 python: fix numpy datatype
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2023-01-07 20:50:10 +01:00
Apostolos 638d875906 Expose Debugs to Python API 2023-01-03 21:30:20 +01:00
Apostolos 3772497901 Expose DebugMaterial, DebugOperator and DebugBox 2023-01-03 21:30:20 +01:00
Thorsten Liebig 9677c457e8 python: update Tutorials meta data, remove verbose call
Signed-off-by: Thorsten Liebig <liebig@imst.de>
2023-01-02 12:32:28 +01:00
Thorsten Liebig 0777302f1f python Tutorial: fix CRLH mesh hints
Signed-off-by: Thorsten Liebig <liebig@imst.de>
2023-01-01 14:14:15 +01:00
Thorsten Liebig 164d3983e3 python: allow windows to find AppCSXCAD
Signed-off-by: Thorsten Liebig <liebig@imst.de>
2023-01-01 14:13:53 +01:00
Thorsten Liebig 9737661b94 python: language level 3
Signed-off-by: Thorsten Liebig <thorsten.liebig@gmx.de>
2022-12-29 10:06:11 +01:00
Georg Zachl 8c08cf5312 Expose sinusoidal, dirac pulse and step pulse excitation to the Python API. 2022-12-11 11:33:21 +01:00
luz paz 026f12355f Fix various typos
Found via `codespell -q 3 -L adress,imag`
2022-12-11 11:32:04 +01:00
Thorsten Liebig bad842a710 voltage probes: better voltage integration with direction
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2021-08-25 19:05:11 +02:00
Thorsten Liebig 4c24b6ec75 python: replace distutils with setuptools
Signed-off-by: Thorsten Liebig <liebig@imst.de>
2021-07-13 19:17:15 +02:00
Thorsten Liebig 0dcbcf7651 python Tutorial: fix bent patch antenna
Signed-off-by: Thorsten Liebig <liebig@imst.de>
2021-07-08 15:23:47 +02:00
Thorsten Liebig f9c8954ed3 python: improve init on windows
CSXCAD adds the dll path as needed on windows install version

Signed-off-by: Thorsten Liebig <liebig@imst.de>
2021-07-08 15:14:30 +02:00
Thorsten Liebig ebf017441e python: do not use assert for required checks
Signed-off-by: Thorsten Liebig <liebig@imst.de>
2020-01-04 15:58:20 +01:00
Thorsten Liebig 9e5dcecd31 python: unlock python GIL for long running tasks
Signed-off-by: Thorsten Liebig <liebig@imst.de>
2020-01-04 15:57:21 +01:00
Thorsten Liebig 9c78459d54 Merge branch 'fix_rad_deg' of https://github.com/khashabri/openEMS 2019-11-08 19:16:05 +01:00
khashabri aa5848e7ae Fix missing deg2rad in RCS sphere tutorial #58 2019-11-07 12:28:19 +01:00
khashabri b86f514378 Solved the issue #59
Calling the run function multiple times caused an error
2019-11-07 10:05:48 +01:00
Ruben Undheim 8908489c1f Explicitly extend from 'object' to prevent issue in Python 2
Otherwise, it fails with:

  File "/usr/local/lib/python2.7/dist-packages/openEMS/ports.py", line 205, in __init__
    super(MSLPort, self).__init__(CSX, port_nr=port_nr, start=start, stop=stop, excite=excite, **kw)
TypeError: super() argument 1 must be type, not classobj
2019-02-13 22:29:00 +01:00
Ruben Undheim 89bbd35906 Use 'from __future__ import absolute_import' to make the right paths be imported 2019-02-13 22:27:15 +01:00
Thorsten Liebig 3437959922 fix typo, #35
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2018-11-17 18:36:30 +01:00
Thorsten Liebig 65ca6bfc44 python: add set number of threads interface
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2018-01-04 15:51:18 +01:00
Thorsten Liebig 92939becd0 python: minor improvement and fix
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2017-05-01 12:49:15 +02:00
Thorsten Liebig 9d05c86900 python: add debug options
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2017-05-01 12:48:47 +02:00
Thorsten Liebig 7c0d498f56 python: allow setting of radius for nf2ff
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2017-03-01 22:09:19 +01:00
Thorsten Liebig c8049af005 python: add some initial automesh features
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2017-03-01 22:08:53 +01:00
Thorsten Liebig 963aa39ed4 python: doc updates
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2016-11-15 20:09:27 +01:00
Thorsten Liebig c0ea99f2b6 python: added CRLH extraction tutorial
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2016-11-15 20:08:41 +01:00
Thorsten Liebig 8a3713a1a4 python: fix/improve waveguide ports
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2016-11-13 22:37:26 +01:00
Thorsten Liebig 0f37d1d3a2 python: implement cylindrical grid support
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2016-11-13 22:36:57 +01:00
Thorsten Liebig 4216f1307a python: new Tutorial and updated doc
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2016-09-20 22:10:11 +02:00
Thorsten Liebig d41830f090 python: adept to new CSXCAD API
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
2016-09-20 22:08:57 +02:00