Technical Issues - FilmStar News 2015

Other editions: 2006, 2007, 2008, 2009, 2010, 2011, 2012
2013, 2014
, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023

January 5    Contour Data Import/Export

DDE (dynamic data exchange) is a protocol for transferring data and commands. As previously discussed, it's an easy way to export FilmStar data to Excel. Users who need to compute properties (min, max, average, etc.) over an angle range can utilize DDE export in contour mode (DESIGN 2.61.3362), as in the highpass example shown below. Note the ability to highlight a region by clicking on the legend. While copy and paste requires several steps, DDE requires one step or no step if Auto Export is enabled. BASIC is not required but can be used to automate operations.

Where to put the data? Specify export region with Spectra.. DDE.. Options.. Export. Topic defines the Excel target worksheet. Equivalent: Excel|Sheet1, Excel|DDETest.xls, Excel|[DDETest.xls]Sheet1. If the workbook has not been saved, you could use Excel|Book1, etc.

Item specifies cell range (RC format) or defined name. Click Spectra.. DDE.. Export <Shift+Ctrl+F7> or check Spectra.. DDE.. Auto Export to automatically export calculated data. Import and export formats are identical. Be sure to set Contour Data = Matrix in Spectra.. Format Options.

DDE data transfer can be automated with BASIC DataExport and DataImport. Example (S-P difference): set Sheet3 = Sheet2-Sheet1 (Sheet3!B2 = Sheet2!B2-Sheet1!B2, etc.). Download DDETest.xls and run the FilmStar BASIC code listed below. The same method applies to calculated and measured spectra; this should be very useful for users with multiple-angle accessories (ARTA, URA).

We've added a simple VBA macro (clears Sheet1 and Sheet2) to our example just to illustrate triggering an Excel macro from FilmStar BASIC via DDE. Type <Alt+F11> in Excel to view the code.

Sub Main  ' DDE example FilmStar DESIGN <-> MS Excel
    ' Range: 450-750 x 2 nm (151 points), 0-60 x 2° (31 points)
    Pol = "P": Calculate
    DataExport "Excel|Sheet1", "R1C1:R152C32"
    Pol = "S": Calculate
    DataExport "Excel|Sheet2", "R1C1:R152C32"
    DataImport "Excel|Sheet3", "R1C1:R152C32"
    ' Run Excel VBA Sub ClearCells via DDE
    k& = DDEInitiate("Excel", "DDETest.xls")
    DDEExecute k&, "[RUN(""ClearCells"")]"
    DDETerminate k&
End Sub

If more than one Excel workbook is open, add its name in brackets, e.g. Excel|[DDEtest.xls]Sheet1.
 


February 5   COM Port in Windows 7 XP Mode

You have Windows 7 64-bit but need to run legacy 16-bit software in conjunction with MEASURE (Scantraq). You've installed Windows XP Mode but can't get your Lambda 9 or 983 to work via serial interface. Windows 7 has assigned COM3 to your USB serial adaptor, but the setting doesn't work in XP Mode. What to do?

The fix: assign XP's COM1 (virtual port) to Window 7's COM3 (physical port). Procedure: click Manage virtual machines (in Windows 7), right-click Windows XP Mode.vcmx, select Settings and assign COM1 to Physical serial port COM3 as shown below. Remember to specify COM1 in the Scan Method, not COM3 as you would do when running MEASURE in Windows 7.


 


March 5    Solving for k with Known n (Updated March 17)

Note: This topic assumes familiarity with User Index Functions and FilmStar BASIC.

Consider dielectrics (k<<n) where n is known and k is to be determined by transmittance measurements. In the case of an uncoated substrate we can simply utilize FilmStar INDEX. In determining k values for films there are two options for n: 1. function, 2. dispersion table.

1. Function (Cauchy, Sellmeier, etc): We solve for k at each wavelength while utilizing the dispersion function for n. This requires that we convert our n-function to a formula with constant coefficients. That is, we replace Film Indices coefficients A,B,C... with constants.

Facilitating this conversion, DESIGN 2.61.3680 adds Edit..Copy Formula to the Film Indices dialog. While the conversion can be accomplished manually, there are complications: use of E as a coefficient, FilmStar formula editor not recognizing 1.4E-4 as 1.4*10^-4. DESIGN 2.61.3690 (17 Mar 2015) adds a verification dialog.


Film Indices dialog

Generalized Cauchy ($CYGEN) equation n=A+B*w^D+C*w^E (w in µm), k=0
with coefficients
A=9.636555   B=-7.655485   C=2.252716E-3   D=1.367822E-2   E=-4.760015
is automatically converted to
n=9.636555-7.655485*WM^(1.367822*10^-2)+2.252716*10^-3*WM^(-4.760015)
and, after verification, copied to the clipboard for pasting as a User Index Function


User Index dialog with n given by CYGEN (generalized Cauchy)


Verifying BK7 $SELLG (Sellmeier glass) formula
Note: This dialog was later expanded and renamed Index Formulator.

2. Dispersion table (n vs. wavelength): In this case, which users might find simpler, we define a User Index Function with n=N1, k=A where N1 refers to the Table 1 file.

In both cases k is determined with IndexSolveK.bas, a modification of IndexSolve.bas which determines n and k point-by-point (originally developed for a user characterizing silver films). The FilmStar installer adds this new file to c:\Winfilm\Basic32. IndexSolveK.bas prompts you to enter CSV file names. The procedure can easily be automated, for example to grab optimization targets from Excel or automatically open spectra.

As a test we utilize a TiO2-Ag Bruggeman model. Click here to download relevant files. As usual copy *.csv to Winfilm\Measure, *.itw to ..\Index and *.faw to ..\Designs.

Note: This example sets UserIndex values in c:\Winfilm\Config\Design1.ini. We suggest that you rename section UserIndex to UserIndexBak in case you need to recover previous User Functions.


April 14    Non-uniform Coatings

What happens when a coating is non-uniform? To get a quick idea, consider a 2% step: half the coating at 100% design thickness and half at 98% thickness. The calculation is performed by the easily modified BASIC code below. Property Tooling simplifies matters by multiplying all layers by the same factor.

DefInt i-N ' ThickStepPlot.bas for FilmStar DESIGN
DefSng A-H, O-Z
Option Explicit
Option Base 1
Sub Main
    Dim i, ndata, ydata(), ytmp()
    CalcPlotStart
    PlotClose
    PlotActivate
    PlotLegend(1) = "100% 1.0"
    PlotLegend(2) = "100% 0.98"
    PlotLegend(3) = "50% 1.0 50% 0.98"
    Tooling = ""        ' default
    Calculate
    PlotNext ' 100% 1.0
    ydata = Spectrum_Y
    ndata = UBound(ydata, 1)
    ReDim ytmp(ndata, 2)
    For i = 1 To ndata
        ytmp(i, 1) = 0.5 * ydata(i, 1)
        ytmp(i, 2) = 0.5 * ydata(i, 2)
    Next i
    Tooling = ".98 .98" ' Corresponds to L H
    Calculate
    ydata = Spectrum_Y
    PlotNext ' 100% 0.98
    For i = 1 To ndata ' Calculate average
        ytmp(i, 1) = ytmp(i, 1) + .5 * ydata(i, 1)
        ytmp(i, 2) = ytmp(i, 2) + .5 * ydata(i, 2)
    Next i
    Spectrum_Y = ytmp
    PlotNext ' 50% 1.0, 50% 0.98
    Tooling = "        ' Restore default condition
End Sub

A BBAR coating is hardly affected. In the case of a highpass, the cut-on slope is degraded, but the filter might still meet specifications. Now consider the spectrum of a thick single layer (n=2.4) utilized in refractive index determination. Fitting the green spectrum obviously leads to severely incorrect n and k values. The thicker the film the stronger the effect, as can easily be determined by any FilmStar user.

This unusual situation was reported by a prospective user. One would expect that 2% variation is more typical of an entire coating run than a single optic. Possibly the test part is mounted in the chamber in such a way as to create thickness fall-off at the edges? In that case the test optic should be masked when measured so that only the uniform center is utilized.
 


May 21    Circle Diagrams


DESIGN 2.61.3803 adds two new Interactor plots: Admittance and Reflectance Amplitude (at right) vs. thickness. Admittance plots utilize Smith Chart axes, thus eliminating the need to specify axis scales.

Click Setup..Graph Axes <Ctrl+G> to specify layers to be plotted and Setup.. Zoom <F5> to select and enlarge a region. Move the cursor to read coordinates. Press <F5> again to exit zoom mode.

When the layer count is greater than seven, colors alternate between red (odd layers) and blue (even).

Should the graph appear incorrect, toggle the Interactor <Ctrl+Q> to refresh.

These and similar graphs are useful for gaining understanding of optical thin film behavior and are discussed by Ron Willey (Willey Optical) in his FilmStar-based short courses.


Reflectance Amplitude for AR and Stack
 


November 2    Interactor and FSPlot Popup Menus


Right-click to select options

Right-click enables a popup menu which helps manage options in the DESIGN Interactor and in the FSPlot Graph Details dialog (DESIGN and MEASURE).



 


December 10    Ambiguity in n,k for Single Films

The determination of dispersion in oxides depends on the material following known functions such as Cauchy. But when no such functions apply, we are forced to determine n,k point-by-point, a more challenging task. There are two FilmStar possibilities: DESIGN with Sub IndexSolve or program INDEX.

Using the Gedankenspektrum idea, a FilmStar user has been testing INDEX's Calculate n,k Algorithm 1 (%R, %T, thickness known for substrate k<<n). Procedure: generate %R, %T in DESIGN, paste spectra in INDEX, and compare the n,k solution with the original n,k table. Unfortunately the laws of physics prevail and original and calculated tables do not always match.

To reproduce our example, download A1_Gedanken.faw. Material A is the original n,k table, while material B is a purposely poor NOL INDEX solution. B is way off, but the curves below indicate little if any difference (258A vs. 258B). To ensure your results match exactly please update INDEX to 2.51.0434 or newer.

TIP: A1_Gedanken.faw utilizes Archive n,k Data mode where n,k data is buried in the design. To plot n,k vs. wavelength in INDEX, click <View n,k Table> in DESIGN Film Indices followed by File.. Plot Table <F4>. For DESIGN < 2.61.3850 copy the table with <Ctrl+C>, activate INDEX (click or <Alt+TAB>), click File.. Paste Table <Ctrl+V>, and Graph.. Auto Scale <Ctrl+A>.

By looking harder with FSPlot's zoom function we finally discover the minor differences shown below. But realistically a 0.02% difference is well within measurement uncertainty.

INDEX includes two algorithms: DLS and NOL. In the above case DLS fails for 258A but works for 73A. NOL works when correct limits are set for n and k variation. In NOL_BAD, n was allowed to vary from 0 to 6 instead of 1 to 6. INDEX DLS results were similar to using Sub IndexSolve.bas in DESIGN at one angle. What works best? In our opinion, IndexSolve.bas with multiple angle & polarization measurements. How to be sure that n,k applies in general and not just to one thickness? Verify with films of half and twice the thickness.

Solutions depend on the accuracy of measured data. A DESIGN BASIC program to simulate measurement noise and paste spectra into INDEX is given below.

Option Explicit
DefInt I-N
DefSng A-H, O-Z
' Adjust standard deviation in next line 
Const StdDev = .002
Sub Main 
    Dim j, k, nData, ydata(), yd()
    On Error Resume Next
    CalcPlot           ' Calculate and show plot
    ydata = Spectrum_Y ' Get spectrum
    nData = UBound(ydata, 1)
    CalcRandSeed 1     ' Same random numbers
    For j = 1 To nData
        ydata(j, 1) = ydata(j, 1) + StdDev * RndNorm   ' Refl
        ydata(j, 2) = ydata(j, 2) + StdDev * RndNorm   ' Trns
        If ydata(j, 1) < 0 Then ydata(j, 1) = 0
        If ydata(j, 2) < 0 Then ydata(j, 2) = 0
        If ydata(j, 1) > 1 Then ydata(j, 1) = 1
        If ydata(j, 2) > 1 Then ydata(j, 2) = 1
    Next j
    Spectrum_Y = ydata
    AxesDraw: Replot: Busy False: DataCopy
    AppActivate "FilmStar INDEX"
    SendKeys "{F11}", True ' Paste spectrum in INDEX
End Sub

This topic requires further development, but it is apparent that n,k solutions require some thought.

Back to Technical Issues

Copyright © 2023 FTG Software Associates
Last updated on January 31, 2023