Replies: 5 comments 44 replies
-
Also today I was looking for python interface for coaxial and other ports and cannot find them, so there is more what is not there :D I tried generate from octave .xml file with custom excitement and is defined inside so you can always write your script using gaussian or other excitement definition and then at the end of your script open .xml file and modified it using python and some xml lib, here is example how custom excitement looks like: <FDTD NumberOfTimesteps="2000000" endCriteria="0.0001" f_max="2400000000">
<BoundaryCond xmin="PML_8" xmax="PML_8" ymin="PML_8" ymax="PML_8" zmin="PML_8" zmax="PML_8">
</BoundaryCond>
<Excitation Type="10" f0="2400000000" Function="4.2*sin(2*3.14*2400000000.0*t)">
</Excitation>
</FDTD> I bet you can also using python access CSX underlying properties and use python over CSX to set custom excitation as python interface is generated from C++ files, look here CSXCAD.CSProperties.CSPropExcitation |
Beta Was this translation helpful? Give feedback.
-
May I ask why you need a custom excitation. I always wonder why anybody would want that since the Gaussian excitation is always the most efficient... |
Beta Was this translation helpful? Give feedback.
-
@thliebig So I've been studying the project and the python interface as it currently exists, and I've tracked down the declaration of the C++ SetUpCustomExcite method of the Excitation class in the file excitation.h. At the moment I'm planning on adding something to the python interface myself that will allow me to use this with the rest of the interface, because it's absolutely crucial that my project have this functionality however rarely it may be used elsewhere. Related to this I have some questions that I'd appreciate your help with if you don't mind: Assuming I manage to figure out how to make SetUpCustomExcite available via the python interface how much rebuilding is involved? Is it just a matter of running python setup.py on the python interface itself or will I need to rebuild the entire project? (I've never used cython before so I'm having to learn all that as I go). In case it's necessary can you please describe how to manually build the openEMS project under Windows 10? You make a point of not documenting a manual build under windows in your documentation, and I've spent a long time trying to figure out how to do that on my own in case I need to, but have not been successful. thanks for considering this request. |
Beta Was this translation helpful? Give feedback.
-
That sounds very ominous, please make sure that your team checks that the license you use is compatible with openEMS as it is GPL and it requires every software using it to be open source too... There might be exceptions to this depending on how you use openEMS, but it was after all the intention behind my license choice many many years ago... |
Beta Was this translation helpful? Give feedback.
-
Greetings Thorsten, So, I've spent the last little while learning Cython and I took your suggestion to add the So far, I've added the necessary code to include the
with
and it runs just fine and produces some interesting output that is distinctly different but still sensible looking. You said that after I've done some testing, I could put in a pull request for you to review. I'm at the point now where I could construct more of my own tests to make sure what I'm doing is producing the expected outcome - and of course, that's what I will do barring any input from you, but I'd prefer to know what your own standards are for what would constitute an acceptably rigorous test. I want to be sure that what I've produced is up to your standards. I would also need to know how to go about making the pull request once I'm ready. I've never done that on github before. Meanwhile we're working on a way to automate as much as possible the process of building openEMS under windows and our PI here has expressed a desire to share our build system with you once we have it working, and I will be very happy to do just that for you when we have it up and running. Please let me know what you think. Thanks, Tim |
Beta Was this translation helpful? Give feedback.
-
Am I correct in my impression that the custom excitation option available in the matlab interface is not available in the python interface? If so, is there any hope for one in the future? We're working on a project that would benefit strongly from being able to use python interface instead of matlab, but we also need to be able to have custom excitations.
Beta Was this translation helpful? Give feedback.
All reactions