Poynting Vector Magnitude in Visualizer versus manual output

Hi all,

One thing I was confused is that the image of “P magnitude” in visualizer seems to be always different when I manually export image from the monitor.

For example, this is the script from “monitor1” in a 3D simulation:
P1 = pinch (getdata (monitor1, “Px”));
P2 = pinch (getdata (monitor1, “Py”));
P3 = pinch (getdata (monitor1, “Pz”));
Pt = sqrt ((P1)^2+(P2)^2+(P3)^2)
However, when I plot the image of real(Pt) versus the axis I chose, it seems to be not match to the image of P magnitude I saw in the visualizer.

Is there anything wrong or misunderstanding? When I simply plot Px or Py or Pz manually, everything is identical with the image in the visualizer.

Thanks a lot.


When using the getdata script command you are obtaining the raw monitor data before any normalization is applied. If you use the getresult script command you can get the same P dataset that you are visualizing in the graphical user interface with normalization applied.

The CW normalization that is applied to frequency domain monitors by default is discussed in more details on this page:

There is also a good tutorial about working with datasets here in case you haven’t already seen it:


Thanks for your reply!
However, I have tried to use getresult instead to prevent normalization issues, but it seems to have the same result. I am still looking for the better way to determine that. Thank you anyway!

Hi @edward_chien

I am not quite sure if this is causing the problem in your case but just by looking at what you are plotting, it looks like for the image you are ignoring the imaginary part. It is important to note that Poyinting vector has an imaginary part. While in some cases, for example in plane wave sources, the imaginary part is zero but in cases where you have non-propagating field such as evanescent field, you might end up with imaginary component for Poyinting vector. As a result real part and magnitude of Poyinting vector might not be identical.

I hope this answers your question.

1 Like