Photonics

Photonics

Normalized intensity

    • HalimBishoy
      Subscriber

      If I generate a metalens at broadband 270nm to 380nm. Could I ask about script code to get the normalized intensity as shown in the following figure with a max value equal to one, at different wavelength values (for example 270nm, 298 nm , 334nm , and 380 nm) in that range?

    • Guilin Sun
      Ansys Employee
      Hi, I think this question appears in different posts. However I do not know what quantity you have at hand in script. In general, you can get the the intensity by use of
      E2=getelectric("monitor")
      This is in general a 4D matrix: x,y,z, and f, even some of them has only one element, eg, for a 3D simulation, a 2D DFT monitor perpendicular to z axis, E2 would have (please pick up x,y,z, and f from the monitor using script)
      nx=length(x)
      ny=length(y)
      nz=length(z), which is 1
      and
      nf=length(f).
      In order to plot the graph shown above, you will need to find the y value. For example, at y=0, you can use
      E2_x=pinch(E2(:,find(y,0),1,2)) This script picks up the 2nd frequency point (4th dimension), and y=0 plane.
      Then you can plot
      plot(x*1e6, E2_x,"x um","E2");
      You can also plot the normalized result with max=1:
      plot(x*1e6, E2_x/max(E2_x),"x um","E2");
      Please refer the script introduction website and related edu videos for more information.
Viewing 1 reply thread
  • You must be logged in to reply to this topic.