Soon, we will launch a new and updated customer portal, which is an important step toward providing our customers with one place to learn, interact, and get help.
Learn more.

Fitting Index Data in Zemax

This article explains:
  • What to do if the material you wish to design with is not built in to Zemax
  • How to use the Glass Fitting Tool in Zemax
  • How to define Transmission Data

 

Sanjay Gangadhara
05/02/2008
Glass and Refractive Index

Introduction
 

This article is an update to an earlier article posted by Dan Hill. Fitting of index data in Zemax will be demonstrated in this article using the Glass Fitting Tool, located under Tools > Catalogs > Glass Fitting. The “Introduction” and “Defining Transmission Data” sections are nearly identical in this article as in the original article written by Dan, and much of the material from Dan’s original article remains in this article as well.

Introduction – Dispersion Coefficients

Zemax includes catalog information for hundreds of glasses from more than a dozen vendors (such as Schott, Corning, Ohara, and Chengdu) around the world. In addition to these vendor specific catalogs, Zemax includes data which has been compiled from published sources, such as Laikin’s Lens Design.

Calcite, for example, is one of the many materials in Zemax by which the data was obtained by a published source (Handbook of Optics Vol. II). The sources of each material in these catalogs (INFRARED, BIREFRINGENT, and MISC) are documented in the chapter of the Zemax User’s Guide entitled "Using Glass Catalogs".

Given that there are hundreds of glasses from various vendors and documented sources, it is often the case that the materials you are designing with are included in Zemax’s Glass Catalog database. These glasses are “built-in” to Zemax. If the materials you wish to use are not included in Zemax, you can take various approaches to modeling them in Zemax.

Most commonly, data regarding a specific glass is provided in the form of coefficients corresponding to a specific glass dispersion formula. Some examples of commonly recognized formulas are the Schott formula, the Sellmeier formulas 1-5, the Herzberger formula, and the Conrady formula. Zemax supports 11 different dispersion formulas, from which the coefficients for the selected formula can be entered into Zemax to properly model the dispersion.

Let’s focus our attention on the Glass Catalog in Zemax, which may be opened by clicking on the “Gla” button on the button bar, or by selecting Tools > Catalogs > Glass Catalog from the main menu. Note that as different dispersion formulas are selected from the "Formula" pull-down menu, the coefficients which appear in the Glass Catalog dialog box change accordingly:

An example of data provided in the Glass Catalog

Sometimes, the dispersion data available for the glass you wish to model is not provided in terms of coefficients from a dispersion formula. Instead, you may only have a particular set of wavelength-index pairs made available to you by a vendor or other source. That’s okay. You can still use the tools within Zemax to “fit” the data for you.

Using the Glass Fitting Tool

For a given set of dispersion data, Zemax can fit the data to any one of four dispersion formulas:  the Schott, Herzberger, Conrady, or Sellmeier 1. For a complete definition of each of these formulas, please refer to “The glass dispersion formulas” section of the chapter in the Zemax User’s Guide entitled "Using Glass Catalogs".

Basically, Zemax will calculate the coefficients of the chosen formula which best fits your data set. These coefficients are then stored into the glass catalog for your new glass, and are used to calculate the index of refraction for any given wavelength.

How is this done? Using the Glass Fitting Tool, which can be accessed by selecting Tools > Catalogs > Glass Fitting from the main menu:

Selection of the Glass Fitting Tool from the Zemax menu

Selecting this feature will activate the Glass Fitting Tool dialog box:

Glass Fitting Tool dialog box

Data given in terms of wavelength-index pairs are provided to the Glass Fitting tool via an ASCII text file, which must have the following format:

TEMPERATURE T0

PRESSURE P0

l1  n1

l1  n2



where T0 is the temperature (in degrees C) and P0 is the pressure (in atmospheres) at which the data were measured, and l is in microns. The name of the text file containing these data must have a .IND extension, and this file must be located in the \Zemax\Glasscat\ directory. More information about the file format may be found in the chapter of the Zemax User’s Guide entitled "Tools Menu". While there is no upper limit to the number of data points that may be provided in the file, at least three points are required to get a fit to the Conrady dispersion formula, and six or more (and preferably twelve to fifteen) points are required to get a fit to the Schott, Herzberger, or Sellmeier 1 dispersion formulas.

Fitting the Data and Creating a New Glass

An example of a properly formatted ASCII file containing data for BK7 glass (BK7.IND) may be found in the BK7.ZIP file located at the top of this article. This file contains data that was taken at 20 degrees C and 1 atmosphere:

Input data file for BK7

This data can be inputted to the Glass Fitting Tool and used to create a new glass, which can be added to any one of the existing user-defined glass catalogs (we do not allow new glasses to be added to any of the glass catalogs provided with the Zemax installation; those catalogs get overwritten every time a new version of Zemax is installed, and thus any user-defined glasses added to these catalogs would be deleted during each upgrade of Zemax!). For example, we can create a new version of BK7 called BK7_NEW and add it to the SG_MISC catalog:

Specifying the input file to the Glass Fitting Tool

We will fit this data to the Sellmeier 1 dispersion formula, as this is the same formula used to characterize BK7 in the Schott catalog. The fit is performed by hitting the “OK” button. Whether or not a new glass is created, a text output window will be generated which shows the results of the fit:

Results from fitting BK7 data with Glass Fitting Tool

Values for the best-fit dispersion coefficients are shown at the top of this window, followed by values for the maximum and RMS fit error. The RMS error is the RMS fit error between the given data and the index data generated using the resulting fit coefficients. The maximum error, on the other hand, is the largest error between the fit and any one data point. Both of these numbers can be compared to the magnitude of the index of refraction, which is a dimensionless parameter.

A table of data is then presented in the text output window. The first two columns of this table represent the input data. The third column shows values for the index obtained at each input wavelength using the best-fit dispersion coefficients, and the last column shows the difference between the input and fitted values for the index at each wavelength. The results indicate a very good fit of the data to the Sellmeier 1 dispersion formula over a wide range of wavelengths (0.3 to 2.5 microns). However, it is generally recommended that the input data be fit to each of the models in turn, to see which gives the lowest errors.

If the input data had been provided at a pressure different from 1 atmosphere, both the wavelength and index data would have first been converted to relative values at 1 atmosphere. This step is performed by Zemax prior to fitting the data, and is done so that the dispersion coefficients generated by the Glass Fitting Tool will always describe the glass at atmospheric pressure, regardless of what pressure the data were measured at. More information on how the input data are converted to relative values may be found in the Knowledge Base article “How to Fit Temperature-Dependent Index Data to the Zemax Thermal Model”.

If it had been specified in the Glass Fitting Tool that a new glass should be added to one of the existing user-defined catalogs one the fitting was complete – as it was in this case – a message box would appear confirming that the glass has been saved:

Message indicating that glass has been added to a catalog

If we open the Glass Catalog Tool and go to the user-defined catalog SG_MISC, we will find that a glass named BK7_NEW will appear under the “Glass” field:

Details about the new glass in the Glass Catalog

Note that the formula selected during the fitting is shown under “Formula”, and that the dispersion coefficients which characterize this glass match the values provided in the fitting text output window. Also note that the minimum and maximum wavelengths correspond to the inputted data range (with a 1 nanometer buffer on either end), and that values for the d-light index (Nd) and Abbe number (Vd) agree (within round-off error) with the corresponding values for the glass N-BK7 that is listed in the Schott catalog.

The other parameters for this glass may be edited accordingly in the Glass Catalog dialog, including the thermal coefficients, density, cost, stain resistance, acid resistance, etc. If data for the thermal dependence of the index is also available, the Glass Fitting Tool can be used to determine the best-fit thermal coefficients for the glass as well. More information on this may be found in the Knowledge Base article “How to Fit Temperature-Dependent Index Data to the Zemax Thermal Model”.

Defining Transmission Data

In addition to fitting index data, it is also important to define the transmission properties of the glass in Zemax, if any exist. Zemax models the transmitted intensity user Beer’s Law:

T = e-at

where a is the absorption coefficient and t is the path length through the glass. The parameter a generally depends upon wavelength and has units of inverse length.

To modify or set the transmission data for a glass, select the “Transmission” button near the bottom right hand corner of the Glass Catalog dialog:

Option to select for inputting transmission data for a glass

Selecting the “Transmission” button invokes the Transmission Data dialog, which includes a spreadsheet of 3 different columns:  Wavelength, Transmission, and Thickness. Wavelengths are always entered in micrometers, and thicknesses are entered in millimeters, regardless of the system Lens Units.

Transmission data dialog box

Multiple data points may be defined in the transmission data editor. Internally, Zemax converts the data to transmission “per mm,” and interpolates between the defined wavelengths. If a ray is being traced at a wavelength outside of the wavelengths defined in the Transmission Data editor, then the data for the closest wavelength is used. Otherwise, Zemax performs a linear interpolation between data points defined.

Note that if transmission data has been omitted, then Zemax assumes the internal transmission for a material is 1.0 at all wavelengths. It is very important to verify the transmission data to ensure the most accurate results.


Summary and References

If the dispersion data for a glass you wish to use is not provided to you in terms of coefficients which describe a dispersion formula, but rather in terms of wavelength-index pairs, Zemax can fit the wavelength-index data to various, commonly known dispersion equations using the Glass Fitting Tool. This tool can be used to model the dispersion properties of the glass with high accuracy. Data can be loaded, fit and named in a single dialog box, allowing users to quickly and efficiently import their data into an existing user-defined glass catalog. The Transmission editor may then be used to model the transmission properties of the glass with high accuracy.

Zemax Optical Design Program User’s Guide, Zemax Development Corporation