Photonics

Photonics

Topics related to Lumerical and more.

Data acquisition script in parametric scanning

    • 2202283139
      Subscriber

      I originally wanted to obtain the electric field data at angle = -90 degrees. The code in my figure obtained the angle. How to modify the script to achieve the purpose, thank you.

    • Dimitris Polyzos
      Ansys Employee

      Hello, 

      could you please send me the script workplace of your model? As you can sse in the bottom right of the figure you shared, the Electric field for the -90 degr has an index 1. The dataset that includes the Electric field, the wavelength range and the angle should be set in the script command with an index 1 at the angle input. For example something similar to the following code will returnt eh E field for -90 degrees:

      E90mminus = E(Efield, wavelength, angle) = E(Efield,wavelength,1)

      I would have a better picture though if I could check the script worspace with the attributes and parameters fof you model.

      Thanks a lot in advance

      Kind regards

      Dimitris

       

       

    • 2202283139
      Subscriber

      I refer to a method on the official website to obtain the data, and then project the data to the far field. The result indicates that there is a vector problem. The sweep2 in the figure is the name of the parameterized scan.thank you a lot .

    • Dimitris Polyzos
      Ansys Employee

      Hello, 

      I created a simple model, where in the red box there are the results that you want to manipulate. In my occasion you can see that E (dataset) consists of user E1,H1,index vs x,y,z,lambda. In a similar manner your results will include the E filed the wavelength and the angle. I reckon that the -90 angle is at index = 1, however it would help to have a look at the scirpt workspace to see the form of your results.

      In the scipt prompt, I did some tests where I extract the parameters form the E dataset. You can do something similar with your results in order to manipulate your data and create a matrix of Efiled vs wavelength for -90 degrees. The red arrow points out the index of 1 for z position(in my model-case) and in this way I obtain the E filed for one z position only. 

      Please try a similar way to your model and let me know how it went. 

      I hope I helped.

      Regards

      Dimitris

    • 2202283139
      Subscriber
    • 2202283139
      Subscriber

      Hello, through the script provided by you, I successfully extracted data from the data to the corresponding location. Thank you very much for your help.

Viewing 5 reply threads
  • The topic ‘Data acquisition script in parametric scanning’ is closed to new replies.