-
-
November 1, 2021 at 1:28 pmnerrrorSubscriber
I have electric and magnetic field profiles from my python program which I would like to pass to Lumerical and use as an import source. Creating a rectilinear dataset is not a problem, however, how do I add the E and H field to it?
And how do I use this new rectilinear dataset for the import source in Phyton?
Thank you for your help and kind regards
November 2, 2021 at 12:24 amKyleAnsys Employee
The E and H field data can be passed from the Python workspace to the Lumerical workspace using the putv Python method. The field data needs to be in matrices in the Lumerical workspace, so they should be in NumPy arrays in the Python workspace before transferring them to Lumerical.
Once they are in the Lumerical workspace they can be added to the rectilinear dataset using the addattribute command. I believe this will have to be done through the eval command due to the special syntax of the addattribute command. Once the E and H field data are in the rectilinear dataset in the Lumerical workspace they can be moved back to the Python workspace through getv. Then they can be imported to the Import Source with the importdataset command.
In theory you should be able to build the rectilinear dataset as a Python dictionary without using putv, getv, eval, etc. but I think getting the exact format of all the data correct would be complicated.
Viewing 1 reply thread- The topic ‘How to pass E and H data as rectilinear dataset to Lumerical from python?’ is closed to new replies.
Ansys Innovation SpaceTrending discussions- Difference between answers in version 2024 and 2017 lumerical mode solution
- Errors Running Ring Modulator Example on Cluster
- INTERCONNECT – No results unless rerun simulation until it gives any
- Import material .txt file with script
- Help for qINTERCONNECT
- Trapezoidal ring
- Issues with getting result from interconnent analysis script
- Topology Optimization Error
- Edge Coupler EME Example Issue
- How to measure transmission coefficients on a given plane .
Top Contributors-
1241
-
543
-
523
-
225
-
209
Top Rated Tags© 2024 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-