Solved

Equations behind ZBFSUM (POP analysis)

  • 8 March 2022
  • 5 replies
  • 246 views

Hello,

I have a rather mathematically-oriented (basic) question pertaining to the inner workings of the ZBFSUM macro, building on the post by Nam-Hyong Kim on coherently summing POP beams: https://support.zemax.com/hc/en-us/articles/1500005487201-How-to-sum-POP-beams-coherently

For context, I would like to know what the general mathematical expression is behind the coherent summation of two Zemax beam files (e.g. ZBF1 and ZBF2). Ideally I am interested in the formula that represents each beam, the final form of the equation that represents the sum of the beams, as well as what parts of the equation represent the stored ZBF3 “Irradiance” and “phase”.

More plainly, I would like to know what equations are contained in ZBFSUM, and how these use the layered information in ZBF1 and ZBF2 to yield the similarly sampled ZBF3 layers.

Any insight into this would be extremely useful, thank you in advance.

Kind regards,
Yannis (Post-doc Institute of Astronomy, KU Leuven, Belgium)

icon

Best answer by Mark.Nicholson 14 March 2022, 23:52

View original

5 replies

Userlevel 4
Badge +1

Hi Yannis,

This is an important question. The beam information in POP is stored internally as complex numbers for each pixel, not intensity and phase. Thus, any adding or subtracting between two beams is done entirely with complex arithmetic. In the case of incoherent sums, the intensity is determined first, with the amplitude being the square root of the intensity and put back into the real part of the complex field (and the imaginary set to zero), but for coherent sums the complex numbers are simply added.

Hi Yannis,

This is an important question. The beam information in POP is stored internally as complex numbers for each pixel, not intensity and phase. Thus, any adding or subtracting between two beams is done entirely with complex arithmetic. In the case of incoherent sums, the intensity is determined first, with the amplitude being the square root of the intensity and put back into the real part of the complex field (and the imaginary set to zero), but for coherent sums the complex numbers are simply added.


Dear Kevin,

thank you very much for your reply, this clarifies things. I’m going to dare and ask, is there a way to access the POP complex numbers that are stored internally for each pixel? Alternatively, would you happen to have the exact formula that transforms the complex numbers into the POP intensity and phase (or the other way round)? I’m working with coherent wavefront sums, so this would be very useful to have in order to check the results.

Kind regards,
Yannis

 

Userlevel 7
Badge +3

The ZBF stores E field data as Re and Im parts. The intensity is just Re^2 and Im^2, and the phase is tan^-1(Im/Re). For polarized beams there are two such arrays.

I think the ZBF file format is documented in the Help file.

Userlevel 4
Badge +1

Thanks, Mark. I’d also add that there’s a file in the POP/beamfiles folder called sample_zbf_program.cpp that steps through the steps to write a .zbf file in the context of creating a Gaussian beam. It should make a good template for reading out a file or doing other manipulations. Even if you’re not a C++ user, the lines are pretty straightforward to understand and convert to another language if you so wish.

Userlevel 4
Badge +2

In summary:

  1. The ZBF stores E field data as Re and Im parts. The intensity is just Re^2 and Im^2, and the phase is tan^-1(Im/Re). 
  2. Here is how the sum of two rays is working:

Let's have val1 = er1 + i ei1 and val2 = er2 + i ei2 
then, let's do the sum val1 + val2
 

  • if coherent:
    er3= er1 + er2
    ei3 = ei1 + ei2

 

  • if incoherent:
    er3 = [val1val1* + val2val2*]^(-1/2) = [sum ( magnitude { val })]
    ei3 = 0 << this is where we put the imaginary part to 0, not in the individual contributing ei

Reply