Technical Issues - FilmStar News 2013 Other editions:
2006, 2007, 2008,
2009, 2010,
2011, 2012 February 8 Reverse Engineering by Color Matching Are CIE color
coordinates such as L*a*b* useful in correcting color shifts? This is an issue in ophthalmic coatings where
AR cosmetic
appearance is critical. BASIC Sub SetCieAxes (2.61.3141) in conjunction with Sub CieOptimize helps
us reverse-engineer by
matching L*a*b* values.
Case 2 (linked variation): Under the
same tolerancing and verification conditions, Confidence Level =
100% when L and H layers vary in tandem as in tooling factor shifts.
This is physically verified by reference to the
Excel Color Grid
published last year (updated
Feb 21, 2013). March 12 Organizing Data Directories
These programs are easily modified as required. BASIC experts: Note that Browse For Folder is a Windows shell command, not a BASIC dialog. Reviewing the code may be helpful in your other applications. March 26 Importing Illuminants With the popularity of LED light sources, it is important to be able to utilize published illuminant data. Such spectra, however, are often presented graphically as shown below. Fortunately there are
programs which digitize spectral curves. We have tried two:
Dagra
and DigitizeIt. DigitizeIt
is, in some cases, easier to use as it can automatically digitize entire
spectra. It fit the above spectrum perfectly with one click. Dagra
utilizes Bezier curves and is recommended for noisy data or any
situation where smoothing is required. An example utilizing Dagra
can be found here. You
may want to try the free
Engauge Digitizer. 'IllumImport.bas For FilmStar Design, MEASURE 'Copyright 2013 FTG Software Associates Option Explicit Option Base 1 Const Interval = 1 '1 or 5 nm interval Sub Main Dim yDat!(), n%, i%, f$ f$ = GetFilePath(, "csv", "C:\Winfilm\Data", "Open Digitized Spectrum") If f$ = "" Then End FileOpen f$, 1 DataConvert 380, 780, Interval 'CIE range f$ = GetFilePath( , "csv", "C:\Winfilm", "Save CIE Illuminant",2) If f$ = "" Then End yDat = Spectrum_Y Open f$ For Output As #1 If Interval = 1 Then n = 401 Else n = 81 For i = 1 To n If PgmExe$ = "Design1" Then Print #1, CStr(yDat(i, 1)) 'DESIGN Else Print #1, CStr(yDat(i)) 'MEASURE End If Next i Close #1 End Sub Excel .xls, .xlsx
files are internationally invariant, but CSV is problematic when
exchanging data files between English (decimal point '.') and
European (decimal point ',') notation. One possibility is conversion
in Notepad. European to English: 1. Replace All "," by ".", 2.
Replace All ";" by ",". [CIE Color] Window32=0 3225 6420 7605 6495 0 0 Illum1=White LED;LED-White-1nm.csv April 1 Correcting Coating Thickness Errors Consider a known thickness error during deposition, perhaps caused by a dozing operator or a monitor glitch. Can the coating be saved by redesigning it? We can get an idea with a Gedankenspektrum calculation where we assign an error to each layer and re-optimize the remaining stack. ' ReOptimize.bas for FilmStar DESIGN ' Copyright 2013 FTG Software Associates ' Re-optimize to correct a layer thickness error Option Explicit Option Base 1 Const qErr = 150 ' +50% error Const Title$ = "Laser Output Coupler" ' Laser-O.faw Sub Main Dim i%, Legend%, nLayers%, q0!, q!(), qt$(), qd$() PlotClose PlotTitle = Title$ & ", Error = " & Format$(qErr-100, "0.0") & "%" PlotActivate PlotLegendOn True Calculate Legend = 1: PlotLegend(1) = "Original": PlotNext GetLayers nLayers, q(), qt$(), qd$() For i = 3 To nLayers Step 3 q0 = q(i): q(i) = .01 * qErr * q0 If i < nLayers Then Legend = Legend + 1 SetLayers q(), qt$() SetOptiVars i+1, nLayers: Optimize Calculate PlotLegend(Legend) = "Layer " & CStr(i) PlotNext q(i) = q0: SetLayers q(), qt$() 'restore original design End If Next i OptiVars "" 'set all opti variables End Sub Sub SetOptiVars(kLay, nLay) Dim i%, v$ For i = kLay To nLay v$ = v$ & CStr(i) If i < nLay Then v$ = v$ & "," Next i OptiVars v$ End Sub Running the BASIC code gives us the following for our 26 layer Laser Output Coupler design. This helps us determine whether the coating can be repaired or should be abandoned. As expected, errors in initial layers are more easily corrected than errors in final layers.
What happens if the layers are not re-optimized? After commenting-out (disabling) the line starting with SetOptiVars we obtain the following:
May 15 Excel (as Client) Reliability We recently observed that Excel (client) running FilmStar DESIGN (server) did not always operate as expected. As shown in this example (displays CIE values), the fix is simple. We cannot, however, explain just why it is necessary. The extra steps shown in blue cannot be deleted. It seems necessary to execute some spurious command such as Debug.Print dBasic.Angle or dBasic.Angle = 0 and follow that with a small time delay before proceeding with required commands.
Upon executing the following Design1.exe is removed from the Windows Task Manager. Single stepping through the code is instructive. Note that Set dBasic = Nothing is not required if Dim dBasic... is placed within Sub GetCieVals. Dim dBasic As FtgDesign1.clsBasic Option Explicit Sub GetCieVals() On Error Resume Next Dim x As Single, y As Single, yy As Single, a As String a$ = Application.GetOpenFilename("FILM Archive (*.faw), *.faw") Set dBasic = New FtgDesign1.clsBasic Debug.Print dBasic.Angle ' triggers DESIGN pause 0.5 ' may need to increase dBasic.FileOpen a$ dBasic.GetCie x, y, yy With Sheet1 .Cells(1, 1) = dBasic.CieParams .Cells(1, 2) = x .Cells(1, 3) = y .Cells(1, 4) = yy End With Set dBasic = Nothing End Sub Sub pause(ByVal delay As Variant) Dim t0, t1 If delay > 0 Then t0 = Timer ' start time t1 = t0 + delay ' end time Do DoEvents If t0 > Timer Then t1 = t1 - 86400 ' adjust for midnight Loop Until Timer >= t1 End If End Sub August 1 MONITOR Wavelength Calibration Optical monitor settings may not accurately indicate actual wavelengths. Calibration is often required. In addition, it is possible to utilize different wavelength ranges by replacing gratings. A monochromator setting of 500 nm might correspond to an evaluation wavelength of 2000 nm. This feature was previously available in FilmStar MONITOR but not fully implemented. MONITOR 2.53 upgrades this capability by adding a separate Mono wavelength column when either a Correction Function or non-unity Grating Factor is specified.
Notes: 1. If you use Evaluate.. Copy Worksheet, there are now two wavelength columns (identical when Correction Function off and Grating Factor=1). This requires a modification of any procedures (typically in Excel) based on the copied sheet. 2. The Run-Sheet template adds field code 'Eval' for accessing the second (evaluation) wavelength column. Use 'Wave' or new 'Mono' for the first (monochromator) column. 3. Files saved in 2.53 will not open in previous versions. August 22 MEASURE/Scantraq Time Plot There may be occasions when a time plot at a single wavelength is required. This can be accomplished in Mpe983.exe, Mpe19AX.exe, mCary5.exe and mH3410.exe with the BASIC program shown below. The X-axis label was changed with Property PlotXAxisLabel introduced in revision 2.51.1369. The graph shown below illustrates Test Mode on.
Option Base 1 Option Explicit Const nRead% = 21 ' number of readings Const Wave! = 550 ' wavelength Sub Main Dim i%, t0!, s$ t0 = Timer ReDim xDat(nRead), yDat(nRead) comPortOpen ' ignored in TestMode For i = 1 To nRead xDat(i) = Timer - t0 ' current time yDat(i) = Reading(Wave) ' randomize Test Mode (otherwise just straight line) If TestMode Then yDat(i) = yDat(i) * (1 + .05*Rnd) Pause 1 ' time between readings in seconds StatusLabel "Iteration " & CStr(i) & "/" & CStr(nRead) Next i comPortClose Spectrum_X = xDat Spectrum_Y = yDat PlotXaxisLabel = "Time (seconds)" ' assign X-axis label PlotActivate PlotNext PlotXAxisLabel = "" ' restore default X-axis label End Sub Sub Pause(ByVal delay!) Dim t0!, t1! If delay > 0 Then t0 = Timer ' start time t1 = t0 + delay ' end time Do DoEvents If t0 > Timer Then t1 = t1 - 86400 ' adjust for midnight Loop Until Timer >= t1 End If End Sub The spectrum can be saved via the Plotting Module Data menu. IMPORTANT: To simplify matters we have assumed that no correction to Reading is required. This is not usually the case. Please refer to BASIC help under Function Reading. The actual time between readings will depend on Filter Response and Delay Factor. August 27 Rugate Analysis with Stack Mode Stack Mode provides a convenient way to evaluate rugate designs. Here we utilize a formula for sinusoidal rugate index profile given by Southwell and Hall, Applied Optics 28, 2949-2651 (1989). The apodization functions given by Southwell in Applied Optics 28, 5091-5094 (1989) can easily be generated with a VBA macro. By combining Excel and FilmStar, rugate designs are not limited to pre-programmed functions.
The structure is pasted into the Stack Mode Editor and matching layers are added. Note that the 41 layer sinusoid structure is repeated 50 times: Num specifies the number of layers to be repeated, Rpt gives the repeat factor. This is equivalent to using parentheses in Groups Mode designs.
To illustrate optimization in Stack Mode (variables specified in the Sel column), we refine matching layers.
Users wishing to try the above for themselves should update FilmStar to add the following files Rugate-Matching.faw Rugate-Matching.dmw (Film Stack) Rugate.xlsx Open Rugate-Matching.faw. Then click Design..Stack Editor and open the Film Stack. Click on the main screen and note that Film Indices, Groups Editor and Layers Editor are no longer available. Activate the Interactor and observe that the design grid has disappeared, being replaced by the Stack Editor. In the case of nondispersive films, there is no need (DESIGN 2.61.3157) to increase Film Indices capacity. Readers of this section will be interested in Ron Willey's Alternative to Rugates (176MB). September 12 Thickness-Modulated Minus Filter Designs A recent article by Z Wang et al, Applied Optics 52, 5788-5793 (2013) caught our attention. We thought that DESIGN BASIC macros would be useful in generating thickness-modulated designs. Starting with FILM Archive Modulate1, the following BASIC program provides an example (see Figure 5a): Option Base 1 Option Explicit Const PI = 3.14159 Sub Main Dim iLay%, kLay%, nLay%, q!(), qt$(), qd$() FileOpen "Modulate1.faw" GetLayers nLay, q(), qt$(), qd$() kLay = nLay - 1 For iLay = 1 To kLay If qt$(iLay) = "H" Then q(iLay) = 1 + .22 * Sin(PI*(iLay-1)/kLay) Else q(iLay) = 1 - .22 * Sin(PI*(iLay-1)/kLay) End If Next iLay SetLayers q(), qt$() AxesDraw CalcPlot End Sub Results are shown below. In the Modulated design, the Interactor was used to tweak the last layer and center the stack at 525 nm. Starting with the Modulated design, the Optimized design was obtained by adding and optimizing matching layers (T=100% targets: 400-495 nm, 505-750 nm).
Excel Layer-Thickness Profile (added September 19)
The referenced article includes
layer-thickness profile graphs. FilmStar users can create graphs of this
type with Excel workbook LayersPlot.xlsm to be found in c:\Winfilm\Excel
2007. Note: Designs are converted to physical thickness and groups are
expanded to separate layers! Please be careful about resaving designs
which may have been altered.
Recognizing the limitations of Excel graphics, thickness profile plots were added to DESIGN 2.61.3180 (scroll down to Sep 25). Excel enthusiasts will find that the Excel workbook is quite instructive.
September 17 Interactor Update - Thickness Plot A user requested that the Interactor include plotting vs layer thickness. This has been implemented in DESIGN 2.61.3171. As shown here, Zoom Mode is supported.
September 25 Layer-Thickness Profile
Our previous Thickness Profile
Excel graph (scroll up to Sep 19) has limitations. A superior
and easier-to-use capability has
been added to DESIGN
2.61.3182. Click Design.. Thickness Profile.
Font size, background and grid colors are the same as the Interactor; bar colors are the same as FSPlot line colors. Up to 12 materials can be utilized, but may become hard to distinguish, especially with monochrome settings (Setup.. Colors). All layers (except massive) must be in optical OR physical thickness and designs with parentheses are not allowed. Massive layers are not to scale and indicated by a diamond instead of square graphic legend. November 11 FTIR Stability The accuracy of single-beam spectrometers,
including diode-array and FTIR, depends on the
reference (aka background) remaining constant. How often is a new reference
required?
Once a day? Once an hour? Before every sample scan? How much warm-up
time? Such issues can be addressed with repeated T=100% scans over a
period of time.
This is accomplished automatically with MEASURE BASIC program
sp10Stability.bas for PerkinElmer FTIR instruments. The code is
included in the FilmStar Spectrum 10 installer and listed below for
users to modify for other instruments.
One possibility for
eliminating the 15 µm CO2 line is a nitrogen purge. Another possibility,
assuming there are no important spectral features at 15 µm is to skip
over it with a wavelength list.
The code listed below is easily adapted to Ocean Optics, StellarNet and similar single-beam instruments. More than 12 scans are possible if the PlotLegend statement is deleted.
November 14 Workbook Optimization without Pasting Spectra A user recently requested help in optimizing color-related
quantities in the Workbook. Transferring calculated spectra and computing CIE quantities
in the Workbook is possible, but complex and very slow compared with built-in BASIC Sub GetCie.
It was not clear whether Workbook optimization could utilize GetCie.
When developing Workbook models, it is best to start with a simple case where the answer is well-known, say BBAR.faw. We make use of BASIC Property Merit which utilizes the Optimization Targets specified in DESIGN's main menu. This is the same merit function obtained with Evaluate.. Merit Function. Macro (E2) function BasExec executes BASIC code setting the Objective (D4) to Merit. DataType (C1) = 16 suppresses pasting of spectra below the DataMarker (A2) cell. There needs to be a DataMarker cell even if not actually used. Before optimizing, test by clicking Evaluate.. Execute Macro <F8>. BasExec automatically adds Sub Main and End Sub and, in this case, is equivalent to...
BasExec is best suited to simple BASIC programs contained within Sub Main and End Sub. Complex BASIC programs should be saved to disk and executed with macro command BasRun. November 26 Tolerancing with Index Variations Tolerancing with thickness variations is straightforward via DESIGN Evaluate.. Tolerancing. What users might not realize is that this capability is also in FSPlot. In addition to superior graphs (especially the ability to zoom), FSPlot includes means to copy or save (.csv) multiple spectra. In the graph below we set L errors to 0 and H errors to 0.24%. DESIGN 2.61.3189 improves matters by automatically switching legends off and assigning a single line color as specified in Graph Details.
But what about index variations? This
seems impossible because only one index value for each material is
specified in the Film Indices dialog. Fortunately, Stack Mode
automatically assigns individual index values to each layer. Since Stack
Mode is Excel-compatible, we can copy the design, paste into Excel, vary
indices and paste back into DESIGN. And, of course, with FilmStar BASIC
we can automate the procedure.
Note that FilmStar BASIC and Excel are both open. FilmStar BASIC statement xlApp.Run triggers Excel VBA code DesignCopy. Compare columns G and V to see how indices vary.
Comparing this graph with the previous suggests that index errors are worse than thickness errors of the same
relative magnitude. Note: Close Excel before closing DESIGN.
December 10 Edge Filter Measurement vs. Design A LinkedIn member reported discrepancy between edge filter design and measurement. While spectral shape appeared as designed, the transition was not as sharp. A possible explanation is non-zero monochromator bandwidth. This is easily estimated in the DESIGN Interactor.
As emphasized in the diabatic plot below, the wavelength span of the transition zone is greatly affected by monochromator bandwidth. The magnitude of the effect will, of course, depend on the number of layers, etc. Here we have used an extremely sharp edge filter for emphasis.
What if discrepancies cannot be (or are only partially) attributed to spectrometer errors? One might suspect random errors. Using the same 180 layer Ta2O5-SiO2 design as above (November 26) it appears that errors sufficient to broaden cutoff give awful spectral shapes, contradicting measured results.
In the various replies, one LI member proposed tooling factor shifts, as previously considered in our Layer Error Analyzer. Do systematic tooling variations give the optimized spectral shape except for slope? This can be tested with the BASIC program below for any design containing L and H layers. Testing index variation is somewhat more complex, requiring Stack Mode and an appropriate Excel model. Option Base 1 Const PC_H = 1 'H layer % change Const PC_L = 1 'L layer % change Sub Main Dim iLay%, nLay%, q!(), qt$(), qd$(), des0$ des0$ = Design 'save original design PlotActivate GetLayers nLay, q(), qt$(), qd$() For iLay = 1 To nLay 'Linear approximation for simplicity If qt$(iLay) = "L" And PC_L <> 0 Then q(iLay) = q(iLay) * (1+.01*PC_L*(iLay-1)/(nLay-1)) ElseIf qt$(iLay) = "H" And PC_H <> 0 Then q(iLay) = q(iLay) * (1+.01*PC_H*(iLay-1)/(nLay-1)) End If Next iLay SetLayers q(), qt$() Calculate PlotNext Design = des0$ 'restore original design End Sub Users who have no idea how to utilize the code should contact FTG for an online tutorial. As we see below, modest thickness errors have a marked effect on slope. While a coating engineer can easily move the edge to the correct 50% wavelength, there is no simple adjustment to correct slope.
Large deviations generally preserve the optimized shape.
Zooming the above graph indicates that +L compensates for -H even with large errors.
It appears that, except for slope, this highly optimized design withstands significant errors. Index variations give similar results and compensation by thickness adjustment is possible. Applying the above BASIC macro to a laser output coupler gives the following.
Whether coating errors become thinner or
thicker during deposition depends on monitor layout. Consider a monitor
witness at 40 cm and a substrate at 50 cm above the source. M/W (monitor
to work ratio) = 1.5625 {(50/40)²}. Now suppose that source depletion
makes the path 1 cm longer. M/W = 1.5473 {(51/41)²}. The final layers
will be about ~1% too thick. |
Copyright © 2023 FTG Software Associates
Last updated on
November 06, 2024