Skip to main content

Hello.

 

I’m interested in running optimization targeting to get a specific beam shape on image. The beam is generated using POP Gaussian angle. 

The analysis i want to run requires a macro code. For that I’m going to use the ZPLM operand. 

My question is how do I read POP analysis Text data tab with the ZPL? I want to process the data and to return the macro result to the merit function

 

Thanks

Raphael 

 

Hi Raphael,

 

Do you need the individual pixel values of POP? Have you tried using the Merit Function operand POPD/POPI in ZPL? POPI can return individual pixels of the POP analysis.

POPI

Physical Optics Propagation Data. For important details see the section on “Physical Optics Propagation”.

To use this operand, first define the settings on the POP analysis feature as desired, then press

Save on the settings box. The operand will return data based upon the selected settings.

If Surf is zero, then the saved ending surface number will be used; otherwise, the specified surface will be used as the ending surface. If Wave is zero, then the saved wavelength number will be used; otherwise, the specified wavelength number will be used. If Field is zero, then the saved field number will be used; otherwise, the specified field number will be used.

Data determines what data the POP feature will compute and return as follows:

0, 1, 2: The total (Ex + Ey), Ex only, or Ey only Irradiance.

3, 4, 5, 6: Ex-real, Ex-Imaginary, Ey-real, Ey-imaginary.

7, 8: Ex, Ey phase in radians. Undefined Data values will return 0.

The Pix# refers to the desired pixel of the beam. The pixel number is greater than or equal to zero, and less than nx*ny, where nx and ny are the number of columns and rows, respectively. The pixel number is generally defined as p = x + y*nx where x is the integer row number and y is the integer column number, and 0 <= x < nx and 0 <= y < ny.

If adjacent POPI operands all have the same Surf, Wave, and Field values, then the POP analysis is done just once and all data returned at one time. Note the POPI operands must be on adjacent rows in the MFE for this efficiency to be implemented.

 You can call POPY from ZPL with the numeric functions OCOD and OPEV.

OCOD(A$)

Any string variable or literal that is the name of a Optic Studio optimization operand.

The optimization operand code number used by the OPEV function.

OPEV(code, int1, int2, data1, data2, data3, data4)

Code is the optimization operand code (see function OCOD), and int1-int2, and data1-data4 are the defining values for the operand. See Optimization Operands (Alphabetically).

Computes the same value as any optimization operand would, without the need to add the operand to the merit function. This is useful for computing numbers already available from the optimization operands. For example, to compute the EFL from the EFFL operand use this code:

C = OCOD("EFFL")

E = OPEV(C, 0, 1, 0, 0, 0, 0)

Make sure to fill all 7 inputs argument for OPEV. If the optimization operand requires less than 6 parameters use additional 0s as in the example above.

See also OPER, OCOD, MFCN and keyword

SETOPERAND.

Some optimization operands, such as OPGT, only make sense when taken in the context of other operands. OPEV will only work for operands that do not depend upon the presence of prior operands. See also OPEW below.

That being said, you might find it easier to manipulate this data with the ZOS-API. I let you read the help file with regards to POPI, OCOD, and OPEV, and let me know your thoughts.

Take care,

 

David


Reply