- Home
- Glass and Refractive Index
- Fitting Index Data in ZEMAX
Fitting Index Data in ZEMAX
- By Sanjay Gangadhara
- Published 2 May 2008
- Glass and Refractive Index
-
Rating:




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 .ZIP file located at the end of this article. This file contains data that was taken at 20 degrees C and 1 atmosphere:
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:
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:
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:
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:
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”.