Technical Issues - FilmStar News 2019

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

January 3    Plotting Fwd and Rev %R

A researcher provided R/T spectra for a thin Cr film on glass. This included %R measured from the back side (reverse reflectance). In theory, adding back surface reflectance is useful, especially when determining n,k point-by-point. As a alternative to point-by-point, it is easier to fit dispersive functions. Starting with Sopra Cr we want to see if an Air-Cr Bruggeman model is suitable.

Bruggeman
Setup..Index Functions..User-Defined

How can we display %R and reverse %R on the same graph? The Interactor plots %R and %T but not forward and reverse %R simultaneously. A workaround combines FSPlot, BASIC and the Interactor. R-T_RRev1.bas sets up the FSPlot Module with 3 measured and 3 calculated curves. R-T_RRev2.bas then re-plots the calculated curves as thickness and Index Coefficient A are varied in the Interactor.

Sub Main   ' R_T_Rrev1.bas initializes FSPlot
    PlotClose
    PlotActivate
    PlotLegend(1) = "%R Meas": PlotLegend(2) = "%T Meas"
    PlotLegend(3) = "%R Rev Meas": PlotLegend(4) = "%R Calc"
    PlotLegend(5) = "%T Calc": PlotLegend(6) = "%R Rev Calc"
    FileOpen "C:\Winfilm\Spectra\Cr_30nm_FWD.csv" '
Download
    PlotSelect = 1: PlotNext ' %R
    PlotSelect = 2: PlotNext ' %T
    FileOpen "C:\Winfilm\Spectra\Cr_30nm_REV.csv" ' Download
    PlotSelect = 1: PlotNext ' %R Rev
    Calculate ' Compare with calculated values
    PlotSelect = 1: PlotNext
    PlotSelect = 2: PlotNext
    DesignReverse
    Calculate
    PlotSelect = 1: PlotNext
    DesignReverse
End Sub

Sub Main ' R_T_Rrev2.bas (Macro 1)
    PlotDelete
    PlotDelete
    PlotDelete
    Calculate
    PlotSelect = 1: PlotNext ' %R
    PlotSelect = 2: PlotNext ' %T
    DesignReverse
    Calculate
    PlotSelect = 1: PlotNext ' %R Rev
    DesignReverse
End Sub


Macro 1 runs automatically

Important: the substrate(s) is specified as a massive layer(s) with AIR and SUB = 1 in Setup..Film Indices (same requirement for reverse %R targets). Furthermore, set Auto Y-Axis Label to False in Setup..Graph Details <Ctrl+H> in the main menu.

With only two optimization variables (index coefficient and thickness), L-M convergence is rapid. As shown above, results are fairly encouraging. Bumps near 870 nm were deleted from targets.

The optical properties of very thin metal layers are not well understood. Fitting with Bruggeman AIR-Cr is a preliminary result subject to further investigation. Our main purpose is to demonstrate how FSPlot extends Interactor plotting capabilities. An ability to plot %R from both sides seems especially useful in fenestration. Users who require assistance with the above code should contact FTG Software.


February 27    MEASURE and Unsupported Instruments
Updated 12 Apr 2022

Users with Shimadzu, Hitachi and other spectrophotometers not controllable by FilmStar are still able to take advantage of MEASURE's FilmStar BASIC, Workbook, FSPlot, and DESIGN compatibility. Most importantly, MEASURE normalizes %R spectra for dispersive standards, a capability not available in software intended for chemists. The Spectra Collector can also be utilized.

An example requires MEASURE version Mpe983.exe (2.51.1942 or newer) and Device = Server (Raw Data). Here we use data files as servers. Dialogs closely resemble those for an instrument directly controlled by MEASURE, except forr the Control Macros dialog shown below. While the same macros could be run from the Tools menu, this dialog links macro code with the Scan button. The same macro can be utilized for Baseline, Reference and Sample scans.

Upon clicking Scan, a dialog asks for a Baseline (often not required), Reference or Sample file. These are direct machine values and NOT normalized until imported by MEASURE. This requires MEASURE 2.51.1942 (26 Feb 2019) or newer in which Property DataType was updated. In the snippet below, the file being opened comprises comma separated Wavelength (nm), %R or %T pairs with 2 header rows. This is easily modified for similar readable spectra.

Open file$ For Input As #1  ' Open Shimadzu spectrum
For i = 1 To 2              ' Ignore 2 header lines
    Line Input #1, s$
Next i
Do While Not EOF(1)         ' Get # data points (k)
    Line Input #1, s$
    k = k + 1
Loop
Close #1
ReDim sf$(1 To k)           ' Create data array
Open file$ For Input As #1  ' Re-open Shimadzu spectrum
For i = 1 To 2              ' Ignore 2 header lines
    Line Input #1, s$
Next i
For i = 1 To k
    Line Input #1, sf$(k - i + 1) ' Sort in ascending wavelength order
Next i
Close #1
ReDim xDat(k), yDat(k)
For i = 1 To k   ' Sub Parse replaced by Function Split 11 Apr 22
    xDat(i) = Val(Split(sf$(i), ",")(0))       ' nm
    yDat(i) = .01 * Val(Split(sf$(i), ",")(1)) ' Convert 0-100% to 0-1.0
Next i
Spectrum_X = xDat: Spectrum_Y = yDat ' Transfer spectrum to MEASURE
If DataType = 1 Then DataReduce 
' Delete or disable when running from a Control
Replot                          
' Macro triggered by the Scan button

Modifying code for other file formats is straightforward as shown below in a modification (tab separator, no header lines, data range 0-1.0, increasing wavelength) for the Olis-Upcycled 983. Contact FTG Software if you require assistance. Another option is available for OLIS Excel files.

Open file$ For Input As #1  ' Open Olis 983 spectrum
Do While Not EOF(1)         ' Get # data points (k)
    Line Input #1, s$
    k = k + 1
Loop
Close #1
ReDim sf$(1 To k)           ' Create data array
Open file$ For Input As #1  ' Re-open Olis 983 spectrum
For i = 1 To k
    Line Input #1, sf$(i)
Next i
Close #1
ReDim xDat(k), yDat(k)
For i = 1 To k
    xDat(i) = Val(Split(sf$(i), vbTab)(0)) ' nm
    yDat(i) = Val(Split(sf$(i), vbTab)(1)) ' 0-1.0
Next i
Spectrum_X = xDat: Spectrum_Y = yDat ' Transfer spectrum to MEASURE
If DataType = 1 Then DataReduce 
' Delete or disable when running from a Control
Replot                          
' Macro triggered by the Scan button

You might prefer to implement QA procedures in BASIC code not assigned to Scan Method Control Macros. The main issue is that spectra be available in ASCII (readable) format. Excel XLS/XLSX should also work, using Sub XLinfo to determine the number of rows and Function XLcell to extract values. Should you be unable to import spectra, send spectral file examples to FTG Software.


March 5    Plotting vs. Thickness and Wavelength Simultaneously

A DESIGN user evaluates E-field vs. Thickness, hoping that varying some layers will minimize peaks. While it is possible (obscure, requiring the Workbook) to reduce absorption in specific layers (thereby reducing electric field), the resulting design may be unacceptable.

The Interactor lets us visualize how E-field varies with layer thickness. But how to display R/T vs. wavelength at the same time? Opening a second copy of DESIGN proves useful. Copy the design and paste it into DESIGN (2). Try it and you'll see it's quite tedious. We need an automatic procedure.
 


DESIGN E-field vs. Thickness


DESIGN (2) %T vs. Wavelength


A powerful feature of the Interactor is its Automation Macro. Here CalcDesign2.bas executes each time the design changes. The short code copies the design to the clipboard, activates the second instance of DESIGN and sends keystroke <Shift+F4> to trigger a DESIGN (2) macro.
 


DESIGN Interactor Detail
 

  ' CalcDesign2.bas
  ' Copyright © 2023 FTG Software

  Sub Main
      DesignCopy
      AppActivate "FilmStar DESIGN (2)"
      SendKeys "+{F4}" ' <Shift+F4>
  End Sub

Upon receiving <Shift+F4> via SendKeys, DESIGN (2) executes macro 'Paste and Calc' as shown below in the Tools...Macro Commands dialog.
 

We wonder if any users had already discovered this technique. It's success is due to the fact that SendKeys works well, which is not always the case. Need to plot %R and %T? Open a third copy of DESIGN and adjust CalcDesign2.bas accordingly.


April 23    MONITOR Crystal Only Mode

A FilmStar user relies on MONITOR to create and print crystal-based run-sheets. While we had not heard of this previously, it seems quite useful.

We realized that his task would be simplified by eliminating or modifying optics-related dialogs, menus and settings. MONITOR 2.54 therefore adds Crystal Only Mode.

Clicking Setup..Program Mode..Crystal Only deletes unused Worksheet columns. Menus are simplified and unused quantities suppressed. Film Indices and Parameters dialogs are adjusted. Run-time estimation and tooling (M/S) computations are still supported. Thickness can be displayed in kÅ, nm and Ångstroms.

Click File..Save Tab-Delimited to create a text file. It should be possible to directly upload layers via USB or network. Ask your coating equipment vendor to contact FTG Software.

Suggestions for additional columns in the Crystal Worksheet are welcome.


September 4    Group Velocity Dispersion (GVD)

We were recently asked about Group Velocity Dispersion. Click here for a thorough discussion.

Click here to download an instructive Excel workbook for calculating GVD for glasses described by the $SELLG equation. The workbook calculates second derivatives in two equivalent ways (differences and exact) and is modified for other glasses by pasting relevant coefficients from DESIGN Film Indices (Glass menu). In the case of materials defined by n,k tables the difference method is readily adapted. We created the Excel workbook as a prelude to possibly adding GVD to DESIGN and/or INDEX in future revisions.




October 21    Eliminating Side 2 (Uncoated) Reflectance
Revised November 12

Need to measure %R for an AR coating, but can't grind the uncoated (Side 2) surface or use tape, black paint, etc? 'Subtract' the surface with Excel workbook Refl-Side2.xlsm implementing Equation 21 in S Wilbrandt and O Stenzel, "Analytical elimination...", Applied Optics 55, 6983-6988 (2016). Five measurements are required. As verification, the DESIGN sheet computes % difference between FWD Ignore Side 2 and Equation 21. Note that an absorbing substrate must be treated as a massive layer when computing Side 2 film reflectance.

A version specifically for MEASURE/Scantraq (Refl-Side2-Scan.xlsm) simplifies operation with two options: run MEASURE hidden or visible (recommended). Two illustrative methods for Mpe983.exe: R380-780.scw and T380-780.scw. To modify the workbook for another version of MEASURE click Tool...References in the VBA editor. Test Mode ON (1) tests operation sequence without requiring MEASURE. The VBA code is unsecured and very instructive. Please contact FTG Software with any questions.

Hints: Reposition buttons as best fits your work flow. If prompts like "Transmission... Mount coated optic" are annoying, set Prompts = 0 in the Setup sheet. The Graph sheet is Protected to prevent deletion of one or both data series.

This is only one example of an Excel workbook (client) integrated with FilmStar MEASURE (server). Equivalent capability is not available in software supplied by instrument manufacturers such as PE and Agilent.



Advanced Users

The workbook gives the choice (Setup sheet) of running MEASURE silently (background) or visibly (recommended).

If 'visible' is selected, we need to verify that MEASURE is available. This is achieved with the compact function given below (discovered through Google search). The function can also be utilized in FilmStar BASIC.

Public Function IsRunning(p$) As Boolean
' Example: b = IsRunning("Mpe983.exe")
    Dim objList As Object
    Set objList = GetObject("winmgmts:").ExecQuery _
      ("select * from win32_process where name='" & p$ & "'")
    IsRunning = (objList.Count > 0)
End Function


Back to Technical Issues

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