Photonics

Photonics

Topics related to Lumerical and more.

    • uzmayaqoob1960
      Subscriber

      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?

    • Amrita Pati
      Ansys 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

    • uzmayaqoob1960
      Subscriber

      yes mam you are right.Thats what i am looking for.

    • Amrita Pati
      Ansys 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

    • uzmayaqoob1960
      Subscriber

      Thanks alot mam to elaborate it so well.I got your point .In fututr i will look forward further guidance if needed.

    • Amrita Pati
      Ansys 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

    • uzmayaqoob1960
      Subscriber

      Thanks alot Amrita.So nice of you:-)

Viewing 6 reply threads
  • The topic ‘Hello’ is closed to new replies.