How to export ray trace results in IES format

Illumination system designers often need to give their customers data in IES format. Illuminating Engineering Society (IES) files allow for an easy transfer of photometric data and are widely recognized by manufacturers and designers. This article describes how to generate an IES file and validate the results.

Authored By Dr. Sanjay Gangadhara

Downloads

Article Attachments

Introduction

Complex illumination systems may be designed and optimized within the Non-Sequential mode of OpticStudio. After doing so, you may need to provide potential customers with output data so that they can evaluate the system for use in their own applications. One way to export this data is to use the IES file format. IES is often used in the lighting industry to characterize both light sources and complete illumination systems, and is easily generated by OpticStudio.

In this article, we will demonstrate how to convert rays saved to a spectral data format file into an IES file.

IES file format

The IES file format assumes that the source/illumination system is sufficiently far away from the observation plane that the source may be considered a point source with no spatial variance. This makes IES files much smaller than other formats. Also, spectral data is not contained in the IES file, so a separate file must be generated that contains the spectral data if it is needed. OpticStudio handles the conversion for you easily, and can also generate IES data directly.

To generate IES data directly, simply use a Polar Detector to detect rays, and then use ‘Export Polar Detector Data as Source File’ under the Tools menu of the Non-Sequential Component Editor. For more details, see the article "How to use the polar detector and IESNA/EULUMDAT source data."

OpticStudio also allows you to save rays in a ray database to an .SDF file format (spectral data format) which contains all the ray data at the point where a ray hits a specified object. This dataset can be reduced to an IES file easily using Convert Source File to IES, under Libraries...IES Source Models...Convert Source File to IES.

Convert_Source_File_to_IES

You would normally save rays as  they exit your system, and then convert this rayset to an IES file to give to your customers. In both cases we are “stripping out” the spatial data associated with the source, and only revealing the far-field structure.

We will focus on the second method of IES file generation.

Generating an SDF

Attached to this article is a sample file for a model of an LED. This model includes a simple description of the LED source (using the Source Volume Rectangle object) as well as geometry objects representing the physical structure (contact wire, electrodes, die, and housing) that would be included in the LED package.

To generate a spectral color file representative of this source model, 10 million rays will be traced onto a Detector Rectangle object located near the source. During the ray trace, the Save Rays option should also be selected.

Ray_trace_control_Save_Rays

The syntax for the file name should be “#-Name.SDF”, where # corresponds to the object number for the detector that you wish to save rays on (object #4 in our example). The object number will not be saved as a part of the file name; for the above example, the resulting file name will simply be Led_Model.SDF.

Note that the above technique is not limited to saving rays that land on a detector. An SDF file may be generated for rays landing on any object in the Non-Sequential model, simply by specifying the number for the desired object as the first part of the file name under the Save Rays input above. For example, had we wished to save the rays landing on object #1 to an SDF file, the input file name given under Save Rays would have started with “1-“.

Once the above settings have been input, hit Clear Detectors and then Trace to trace the rays and save the results obtained on the detector to an SDF file. The file will be placed in the {Zemax}\Objects\Sources\Source Files folder (for more information, see the Help File article, “The Setup Tab...System Group (the Setup Tab)...Project Preferences (system group)...Folders”).

The SDF file may be used in any Non-Sequential OpticStudio file, via the Source File object. More details on the Source File object may be found in the Help Files: The Setup Tab...Editors Group (Setup Tab)...Non-Sequential Component Editor...Non-Sequential Sources.

Converting to an IES file

We are now ready to convert the SDF file to an IES file, using Convert Source File to IES under Libraries...IES Source Models menu.

Convert_SDF_to_IES

Any SDF file may be chosen for the tool, as long as the file is in the {Zemax}\Objects\Sources\Source Files folder. The key inputs to this feature are the number of polar (radial) and azimuthal (angular) pixels that you wish to specify in the resulting IES file. Larger values indicate higher resolution, but can cause ray-trace results to appear spiky or noisy if the number of rays in the initial SDF was small. The default pixilation values (181 polar angles, 180 azimuthal angles) are reasonable as long as the initial SDF contains 100,000 rays or more. Note that although we launched 10 million rays in this sample file, more than 20 million hit the detector and were saved in the SDF file. This is because we allowed for splitting of ray energy in the system (by selecting “Split Rays”) during the ray trace.

While the IES file contains photometric values (i.e. candela) for the source angular distribution, this file does not contain explicit information about the spectral distribution for the source. In order to ensure that the spectral information contained in the SDF file is not lost upon conversion to IES, OpticStudio will retain this information in a separate spectrum (SPCD) file. The SPCD file will have the same base name as the output IES file, simply with a different extension (SPCD rather than IES). For more details on the syntax of the spectrum file, the Help Files article, "The Setup Tab...Editors Group (Setup Tab)...Non-sequential Component Editor...Object Properties (non-sequential component editor)...Sources...Defining a spectrum file."

To convert the SDF file to an IES (plus SPCD) file, simply hit the Convert button. The resulting IES file will be placed in the {Zemax}\Objects\Sources\IESNA folder, while the resulting SPCD file will be placed in the {Zemax}\Objects\Sources\Spectrum Files folder.

Validating the results

To validate the conversion results, we may view the far-field distributions for both the SDF and IES file in either the Directivity Plot or the Polar Plot (both features found under the Analysis…Source Viewers menu). For example, a comparison between the half directivity plots for both source files at scan angles of 0, 45, and 90 degrees shows:

SDF

\Source_directivity_plot

IES

Source_directivity_plot_2

Results are nearly identical between the two files, as expected. The additional hash seen in the IES results relative to the SDF results might be reduced by lowering the number of pixels used in the IES file during conversion.

We can also see what this source would look like when imaged onto a distant plane using the Illumination Map (found under the Analyze...Applications...Source Illumination Map; Just as with the Directivity (and Polar) Plot, the Illumination Map can be used with either SDF or IES files (all of these analyses also work with RSMX files). When using the IES file, we would in general also need to specify the SPCD file representing the source spectral distribution:

Specify_SPCD_file

However, for our example, the source only launched rays from two wavelengths (0.46 and 0.57 microns) with equal weighting (this may be confirmed by manually opening the SPCD file in any text editor, such as Notepad). As such, the spectrum file cannot be used in OpticStudio, as it contains too few points (the minimum number of wavelengths in an SPCD file is 3). Thus, for this case, the simple alternative is to simply define the appropriate wavelengths in the Wavelength Data dialog box, and select Source Color: System Wavelengths.

Source_Color

Using the Source Position and Orientation and Screen Size and Sampling settings shown above, the results for the SDF and IES files are:

SDF

Source_Illumination_Map_SDF

IES

Source_Illumination_Map_IES

Again, excellent agreement is observed between the two cases, with the IES data showing smoother results in this case.

If a user now wishes to employ the resulting IES file in an optical system, they can select the Source IESNA File object in their Non-Sequential system and select the desired IES file as an input. To correctly model the spectral distribution of the source, the user will in general also need to set the Source Color to “Spectrum File” under the Sources tab of the Object Properties dialog box, and specifying the corresponding SPCD file created during conversion from SDF to IES. Again, for this particular example that will not be necessary, as the source only contains two unique wavelengths with equal weighting, and that information may be directly provided in the Wavelength Data dialog box of the system.

KA-01483

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.