Read from a Zemax .zbf2 beam file and import it into Lumerical products.
| Syntax | Description |
|---|---|
| out=zbf2read("filename"); |
Reads from a Zemax .zbf2 file with no resampling, from a file pointed to by a path in filename. This script outputs a struct with the beam information, which is described below. |
| out=zbf2read("filename", resampling); |
Reads from a Zemax .zbf2 file with the following parameters:
This script outputs a struct with the beam information, which is described below. |
The outputted struct has the following fields:
| Field | Description |
|---|---|
| beam |
A data containing the beam stored in the zbf2 file, containing electric field vs. frequency/wavelength information. The dimensions of the electric field data is stored with the following indices When importing from Zemax, this built-in script command automatically restores Ez information from 2-D Ex and Ey information in the zbf2 file. |
| index | The refractive index stored in the zbf2 file. |
| rotation_matrix | A 3x3 matrix detailing the rotation matrix in the zbf2 file. |
| position | A vector indicating the position of the beam from the zbf2 file. |
| OPL | The optical path length as stored in the zbf2 file. |
Example
# Read a zbf2 file with a resampling factor of 2
out=zbf2read("my_zbf2_file.zbf2", 2);See Also