-
-
October 7, 2023 at 4:41 pmuzmayaqoob1960Subscriber
Can anyone let me know that if we are having a band of frequency in source let say 450-460nm.And while adding monitors we add two number of frequency points instead of setting global monitor settings ,then because of two frequency points we are having results for 450 nm and 460nm as well.Then could anybody let me know how could we separately extract the results for each wavelength in script editor.As normally we do simulation for single frequency and we know how to extract plots for single wavelength.BUt what would be the case for multiple wavelengths?
-
October 10, 2023 at 5:10 pmAmrita PatiAnsys Employee
Hi Uzma,
By "separately extract results", do you want to save the data for each of the two wavelengths in two separate variables? Let's say you want to look at E fields, from what I understand, you want to have two variables E1 and E2 that will save the field data at lambda_1 and lambda_2, correct me if I am wrong.
Regards,
Amrita -
October 14, 2023 at 7:09 pmuzmayaqoob1960Subscriber
yes mam you are right.Thats what i am looking for.
-
October 16, 2023 at 4:49 pmAmrita PatiAnsys Employee
Hi Uzma,
Thank you for clarifying! The electric fields for different wavelengths are packaged as a single dataset. It is easy to access the fields for different wavelengths from the “E” matrix in the dataset without having to separate them into different variables, but you can do that as well.
For example, in one of my 2D monitors, I have 31 wavelength points. If I want to access each of them separately then I can just look at the size to determine which column corresponds to which data. Here’s an example code:
E = getresult("transmission","E");
E = E.E;
?size(E);This returns:
The first three columns correspond to the x (97 points), y (97 points), and z (1 point as it is a 2D z-normal monitor) grid. And the next is the wavelength (31 points). The last column is the electric field component, where 1 corresponds to Ex, 2 corresponds to Ey, and 3 corresponds to Ez.
Now let’s say I want to access Ex components of the first two freuqency points, then all I have to do is this:
Ex_lambda1 = E(:,:,:,1,1);
Ex_lambda2 = E(:,:,:,2,1);One thing to note here is that the results are stored in the monitor in increasing order of frequency/decreasing order of wavelength. This is why I mentioned "first two frequency points" in the previous paragraph, instead of wavelength points. So, let’s say you have 0.45 um and 0.46 um, then Ex_lambda1 will correspond to 0.46 um and Ex_lambda2 will correspond to 0.45 um.
Please let me know if you have any questions.
Regards,
Amrita -
October 17, 2023 at 8:53 amuzmayaqoob1960Subscriber
Thanks alot mam to elaborate it so well.I got your point .In fututr i will look forward further guidance if needed.
-
October 17, 2023 at 5:18 pmAmrita PatiAnsys Employee
Hi Uzma,
You are welcome! Feel free to post here if you have a related question. You can create a new post if it is related to a different topic (And please call me Amrita :-) ).Regards,
Amrita -
October 18, 2023 at 8:41 pmuzmayaqoob1960Subscriber
Thanks alot Amrita.So nice of you:-)
-
- The topic ‘Hello’ is closed to new replies.
- Difference between answers in version 2024 and 2017 lumerical mode solution
- Errors Running Ring Modulator Example on Cluster
- Import material .txt file with script
- Trapezoidal ring
- Help for qINTERCONNECT
- Absorption cross-section of AuNR excited by prism-based TIR
- Issues with getting result from interconnent analysis script
- Topology Optimization Error
- How to measure transmission coefficients on a given plane .
- Edge Coupler EME Example Issue
-
1777
-
635
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.