Technical Issues - FilmStar News 2009

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

January 15    FilmStar Font Options

1. Further amplification on 96/120 DPI monitor settings as first discussed on Dec 11...

Users with new monitors, especially high resolution laptops, often find that fonts are too small:


Verdana 8 (default) FilmStar font at 96 DPI

A solution is to replace default 96 DPI with 120 DPI in Display Properties (Personalize Appearance in Vista). This may not work quite as expected in browsers and other software. In the screen shot below, we see that font size did not increase proportionally. The inability of Windows to correctly adjust for higher DPI is an issue that reportedly will be addressed in the next version of Windows.


Verdana 8 font at 120 DPI

Recent versions of FilmStar compensate for this deficiency by automatically detecting the 120 DPI setting and adjusting Verdana 8 accordingly:


Verdana 8 font at 120 DPI with auto-adjustment added Dec 2008

FilmStar now supports Segoe UI, a new font designed for ClearType. Click File Configuration.. Preferences.. Screen Fonts to select.


Segoe UI 9 (Vista) font at 120 DPI

At 120 DPI, FixedSys 9 font (used for grids and design editors) is especially ugly. We much prefer Lucida Sans Typewriter 9 or 10 and we prefer to use Vista with the 'Windows Classic' setting rather than the 'Windows Vista' setting shown above.

Users contemplating switching to 120 DPI might want to test all their important software programs for compatibility. Please notify FTG Software of any FilmStar issues. (Use Alt+Print Screen to capture the problematic window to the clipboard. Paste into Word or Excel and send the resultant document to us as an attachment.)

2. BASIC Sub DispBox displays a temporary message which can be auto-closed by code (no button to click). It is especially useful in FilmStar MEASURE/Scantraq where it provides status information and instructions to measurement technicians.

Sub Main
   DispBox "Waiting to stabilize", 48, "Heater"
   Wait 10           ' wait 10 seconds
   DispBox "", 0, "" ' remove the box
End Sub

In previous versions the message could easily be hidden by clicking on other windows. The box has now been altered to remain the topmost form which cannot be covered by other windows.


February 9

Dispersion calculations (GDD and TOD) have been modified (DESIGN 2.60.2221) for closer agreement with theory. Thanks to Dr. Muneo Sugiura of Tokai Optical for providing Excel files containing exact single layer values as well as calculated results for stacks. Note the use of FSPlot's zoom function in the screenshot below.


February 23    RGB Color Calculations

DESIGN 2.60.2222 addresses a subtle issue in the Interactor CIE capability. RGB color calculations (i.e. color boxes) utilize illuminant D65, even if a different illuminant is specified in CIE Setup Parameters.


Illuminant D65 always used in RGB color calculation

To utilize the illuminant specified in the CIE Setup Parameters dialog (say Illuminant A) within the interactive CIE graph, turn off RGB color boxes by selecting 'CIE Window' for CIE Colors; note that 'Illuminant A' is now displayed in the graph title.  Right-clicking on the CIE graph area activates the CIE Setup Parameters dialog.


Illuminant D65


Specified Illuminant

The bug in previous versions was that the graph title indicated 'Illuminant A' even when D65 was utilized in the calculations. In addition, CIE x,y coordinates were not plotted (green dot) unless a tolerance box was also specified.


April 6    Exporting Index Tables

Need to export layer thicknesses and n,k vs. wavelength tables? The problem is that dispersive functions may be utilized, so looking up FilmStar INDEX n,k tables doesn't always work.

Instead, tables are generated via BASIC Sub GetIndex, but this requires that we know the evaluation wavelength range. This is somewhat tricky because range may be specified according to axes type 'Wavelength', 'Wavelength Range' or 'Wavelength List' as specified in Setup Parameters. To simplify things we have therefore added new BASIC subroutine

Sub GetWaveRange(wMin!, wMax!) 

to return the current evaluation range in nm (DESIGN 2.60.2224). The following FilmStar DESIGN BASIC program illustrates its use. This code can easily be modified to create Excel files.

Option Explicit
Option Base 1
Sub Main
    Open "C:\Winfilm\Design.txt" For Output As #1
    DesignList: nkTableList
    Close #1
End Sub 
Sub DesignList
    Dim i%, nLayers%, q!(), qSymb$(), qDesc$()
    GetLayers nLayers, q(), qSymb$(), qDesc$()
    For i = 1 To nLayers
        Print #1, Format$(q(i), "0.0####") & qSymb$(i)
    Next i
End Sub 
Sub nkTableList
    Dim i%, nMatl%, w!, w1!, w2!, xn!, xk!
    Dim nSymb$(), nTyp$(), nFile$(), nDesc$()
    GetIndexList nSymb$(), nTyp$(), nFile$(), nDesc$()
    nMatl = UBound(nFile$): GetWaveRange w1, w2
    For i = 1 To nMatl
        Print #1, vbCrLf & nSymb$(i) & ": " & nDesc$(i)
        For w = w1 To w2 Step 5  ' 5 nm interval
            GetIndex nSymb$(i), w, xn, xk
            Print #1, Format$(w, "0.00") & ", " & _
            Format$(xn, "0.0000") & ", " & Format$(xk, "0.00000")
        Next w
    Next i
End Sub

April 13    MEASURE Smooth Data Preview

1. Total page count can now be included in page numbers in MONITOR (2.50.0304) Run-Sheets and DESIGN (2.60.2225) and MEASURE (2.50.1321)Report Generator documents.

This is initiated by using "%d/n" instead of "%d" in the Print Setup Header or Footer field. Page numbers will print as '3/7', etc.

When the report is activated or the number of pages changed, pages are redrawn. This is because the actual number of pages needs to be determined before printing the header or footer. Online help has been updated accordingly.

In MONITOR the Header/Footer setup is stored with the Run-Sheet Template; in DESIGN it's stored with Graph Axes (or FILM Archive) and in MEASURE with Scan Method.

2. MEASURE's Spectrum...Smooth Data function has been improved by the addition of graphics preview, making it much easier to determine appropriate smoothing parameters.

The smoothed (red) curve is updated instantly when parameters are changed. Upon pressing OK you are given the choice to replace the spectrum currently in memory.


April 24    n,k for Films on Metallic Substrates


June 15    DESIGN Smooth Data Preview

Adapting the smoothing facility in MEASURE, DESIGN 2.60.2260 adds an interactive preview capability (Spectra...Smooth Data) for smoothing imported spectra and/or predicting the consequences of non-zero monochromator bandwidth. While these calculations were supported in previous versions, the interactive dialog makes it far easier to select smoothing parameters.

While Savitzky-Golay is superior (for the same number of points) at preserving spectral shape, Moving Average provides better noise reduction for relatively flat spectra.

BASIC program C:\Winfilm\Basic32\AddNoise.bas is useful for determining reasonable smoothing parameters for different film designs.


June 18    MEASURE Raw Data Plot

In recent conversations we realized that MEASURE users might not know that Baseline, Reference, Standard, Sample (Raw) and Sample (Processed) data can be plotted simultaneously in FSPlot. This facility was added years ago for a user who required that QA graphs show original scan data. While mentioned in online help, this capability is certainly not obvious.

Click Setup...Enable DAQ Plots to add a DAQ-Plot menu. That menu contains up to four commands for plotting raw data. Clicking the (bottom-right) Plot button adds the usual Sample (processed) plot.

Click Data...Save As to save all plots in a single .csv file (or Data...Copy to copy to the Windows clipboard). You can later replot the graph with Data...Open or Data...Paste. The sequence can be automated with FilmStar BASIC:

Sub Main
    PlotClose    ' In case already open
    PlotActivate ' Open FSPlot Module
    PlotDAQ 1    ' Baseline plot
    PlotDAQ 2    ' Reference plot
    PlotDAQ 4    ' Sample (RAW) plot
    PlotNext     ' Sample plot
    PlotDataSave "C:\Winfilm\Spectra\Test.csv"
End Sub

Examining Test.csv...

400,5.004788,80.34769,30.35657,33.64854
401,4.947096,80.37242,30.44829,33.80985
402,4.889404,80.39716,30.29085,33.64085
403,4.872091,80.19685,30.43738,33.94009
404,4.854778,79.99653,30.47413,34.0947
...

If you are familiar with FSPlot you know that plots must all have the same wavelength spacing. In DAQ-Plot this is automatically accomplished by interpolating Baseline, Reference and Standard data at Sample data spacing.


June 24    MEASURE Graphical Message Box

1. New BASIC Function gMsgBox in FilmStar MEASURE supports message boxes containing graphics. Buttons can be OK-Cancel, Yes-No, Abort-Retry-Ignore, etc.


Unlikely to use the wrong instrument, but just in case...

The capability was inspired by a user setting up procedures for inspecting optics with a PE Lambda 950 and Spectrum 100 Optica. Procedures will include photos (*.jpg) showing instrument setup (details on accessories, optic holders, etc.) and screen shots (*.jpg or *.gif) illustrating expected results.  While it is unlikely that a technician would mount an optic in the wrong instrument, consider the usefulness of "Does the spectrum look like the graph shown below?"

The following snippet shows what is required in FilmStar MEASURE BASIC.

Sub Main
    Msg$ = "Click Yes if the instrument you are standing next..."
    Pic$ = "C:\Winfilm\Pics\lambda650.jpg"
    Title$ = "Verify Spectrophotometer"
    Cap$ = "PerkinElmer Lambda 650"
    If gMsgBox(Msg$, vbYesNo, Title$, Pic$, Cap$) = vbNo Then End
End Sub

FSPlot graphs may be utilized, with PNG files converted to GIF. This is easily accomplished in many graphics editors. The graphic is displayed at 100% and must therefore be resized as necessary.

2. While developing gMsgBox we realized that the font size was too small for displaying long prompts. Compare the following with the above picture.

Since the graphics message box was based on the normal (non-graphic) FTG-style message box, we applied the improvements to all FilmStar programs. For users who might be interested, the following discussion provides the details. If you have ever wondered why some message boxes have 'Ja Nein' buttons and others 'Yes No' buttons, please read on.

Image #1 is the original FTG-style message box using the 'Dialogs' font specified in the Screens Fonts editor. The new 'Message' font provides a separate setting for message text (Image #2). Button text is in English and boxes are centered in the parent window.


Click File...Configuration...
Preferences...Screen Fonts

Check Use Windows message box (File.. Configuration.. Preferences) to select the native Windows message box (Image #3). Appearance is quite different in Vista unless Windows Classic look is selected.

The Windows message box is screen-centered,  button text is in local languages, and Windows sound settings are applied. The message font is adjusted in Windows Display Properties ('Personalize' in Vista).


1. FTG message box 8 pt Verdana


2. FTG box 10 pt Verdana (default)


3. Windows message box (9 pt Verdana)

July 21    DESIGN Component Files

1. Suppose you have a design for which you want to graph %R in the visible and %T in the IR. It's a pain to change Setup Parameters and then adjust Graph Axes. What you really need to do is open an appropriate Graph Axes file without changing anything else. Another example: you have a design that needs to be slightly reoptimized for production in a different coating chamber; so you want a new set of Film Indices without changing anything else. Here are options:

a. Temporarily switching from FILM Archive Mode to FILM Mode. In FILM Mode, design data is stored in five separate files: Graph Axes, Film Indices, Design (layer thickness), Targets, Variables. This option has been available for many years.

b. Use shortcut keys <Alt+Ctrl+G> to open Graph Axes previously saved via <Alt+Shift+G>. This works in FILM and FILM Archive Modes and is documented in Keyboard Commands.

c. But keyboard shortcuts are hard to remember and users may prefer to remain in FILM Archive Mode. For these reasons, DESIGN 2.60.2263 adds a checkbox in File.. Configuration.. Preferences:

When checked, File.. Open and File.. Save As commands expand as shown below. While an extra mouse click is required to open a FILM Archive, the keyboard shortcut <Ctrl+F12> is the same.

  
FILM Archive augmented File Menu in screen shot at right

d. Opening Graph Axes, Film Indices, etc. is also possible with BASIC's FileOpen command. Users can create a pull-down list of favorite graph configurations. This is a good exercise for anyone learning how to use FilmStar BASIC. Actually BASIC is not even needed as DDE macro command AxesOpen works as well.

2. If you use your computer primarily for FilmStar, you probably make little use of default My Computer, Desktop, etc. icons and shortcuts in File Open and File Save dialogs. You can easily change or eliminate the shortcuts in Windows file dialogs. (Note: modified 04 Jan 2010).

3. Finally, ever wonder why there's a FILM Mode and FILM Archive Mode? Originally FILM Mode saved space on 360K floppy disks. Later, users requested that components of a design be stored together. BASIC macro Archive.bas (find in C:\Winfilm\Basic32) combines FILM files into FILM Archive files. To be safe, be sure to backup data files before using the macro.


August 24    Multiple Spectra in FSPlot


September 29    Intellemetrics Monitor Support


October 9    MEASURE BASIC Sub AveCalc

1. FilmStar MEASURE adds BASIC Sub AveCalc which returns min, max and average %R/%T values over a wavelength range. As shown below, we calculate average %R between 550 and 650 nm. If ', 550, 650' is omitted, the calculation utilizes the full measurement range.

Sub Main
    Dim s$, yAve!, yMin!, yMax!
    AveCalc yMin, yMax, yAve, 550, 650
    s$ = Template ' Save template
    Template = Replace(Template, "R_AVE", Format$(yAve, "0.0") & "%")
    ReportShow    ' Open Report Generator
    Template = s$ ' Restore original template
End Sub

2. One way to insert calculated values into the Report Generator is by assigning BasText(0) to BasText(15) in BASIC and then inserting field codes <<BasText 0>> to <<BasText 15>> in the Report Template. The above BASIC code illustrates an alternative which might be more convenient. Consider the following Report Template:

<<Align 1>><<Name Arial>><<Bold 1>><<Size 18>>
Brave Optical Coaters 
Average Reflectance = R_AVE

BASIC's Replace substitutes the calculated average for R_AVE. The final step restores the original template so that it can be re-used. Variable names must not appear in normal text. If we had used "rave" instead of "R_AVE" it would have inserted %R into 'Brave Optical Coaters'.
 


October 12    More Macro Buttons Needed?

Users frequently ask whether additional macro buttons are possible in FilmStar. In response, we often suggest that the user implement a 'macro of macros' based on the BASIC ListBox object.

Sample BASIC code corresponding to the screen image is given below. Note that SetPath.bas and DefPath.bas are included in the standard FilmStar installation. Also see Mselect.bas.

Sub Main  ' Set Directories: user dialog example
    Dim Item$(0 To 1), Cmd$(0 To 1), p$, k%
    p$ = PgmPath & "\Basic32\"
    Item(0) = "Assign Directories": Cmd(0) = "SetPath.bas"
    Item(1) = "Default Directories": Cmd(1) = "DefPath.bas"
    On Error GoTo DoNothing  ' Cancelled
    Begin Dialog UserDialog 470,112,"Run FilmStar Macro" ' %GRID:10,7,1,1
        Text 40,14,150,14,"Macro &Description"
        ListBox 40,28,260,70,Item(),.MacRun
        OKButton 340,28,90,28
        CancelButton 340,63,90,28
    End Dialog    Dim dlg As UserDialog
    Dialog dlg
    k = dlg.MacRun
    BasChain p$ & Cmd(k)
DoNothing:
End Sub

As an alternative, BASIC's ShowPopupMenu method looks neater and requires less code and fewer keystrokes.

Sub Main   ' Set Directories: popup menu example
    Dim Item$(0 To 1), Cmd$(0 To 1), p$
    p$ = PgmPath & "\Basic32\"
    Item(0) = "&1 Assign Directories": Cmd(0) = "SetPath.bas"
    Item(1) = "&2 Default Directories": Cmd(1) = "DefPath.bas"
    k = ShowPopupMenu(Item)
    If k > -1 Then BasChain p$ & Cmd(k) ' Esc returns -1
End Sub

Instead of BasChain, one could use a Case statement and combine all code into a single program. This seems suitable for simple macros but quickly becomes unwieldy with increasing code complexity.

k = ShowPopupMenu(Item)
Select Case k
Case 0
    Call Sub1
Case 1
    Call Sub2
End Select

October 20    MEASURE BASIC Sub AveCalc II

The following FilmStar MEASURE (Scantaq) BASIC example utilizes AveCalc for multiple wavelength ranges. We think this is the simplest way to specify multiple ranges.


Much simpler than setting up custom
dialogs, but verification is very important
as typing errors are to be expected.

Option Explicit
Option Base 1
Sub Main
    Dim s$, Wave$, yAve!(), yMin!(), yMax!()
    Dim k%, kVals%, wMin!(), wMax()
    ' Get previous wavelength string from Measure.ini
    s$ = IniString("MultiAverage", "Current")
    ' Sample values illustrate format
    If s$ = "" Then s$ = "450, 550; 600, 650; 750, 780"
    On Error GoTo InputErr
    Wave$ = InputBox("Enter wavelengths (nm) in the following format:" _
                & vbLf & vbLf & "wMin1, wMax1; wMin2, wMax2..." , _
                "Specify ranges To average", s$)
    ' Save wavelength string in Measure.ini
    WriteIniString "MultiAverage", "Current", Wave$
    Do  ' Parse wavelengths
        k = InStr(Wave$, ";") ' ';' separates pairs
        If k > 0 Then
            s$ = Mid$(Wave$, 1, k-1): Wave$ = Mid$(Wave$, k+1)
        Else
            s$ = Wave$: Wave$ = ""
        End If
        k = InStr(s$, ",")     ' "," separates wMin, wMax	
        If k > 0 Then
            kVals = kVals + 1  ' Increment number of ranges
            ReDim Preserve yAve(kVals), yMin(kVals), yMax(kVals), _
                wMin(kVals), wMax(kVals)
            wMin(kVals) = Val(Trim$(Mid$(s$, 1, k - 1)))
            wMax(kVals) = Val(Trim$(Mid$(s$, k + 1)))
        End If
    Loop Until Wave$ = ""
    s$ = "Ranges to average:" & vbLf & vbLf
    For k = 1 To kVals
        s$ = s$ & "   Range " & CStr(k) & ": " & CStr(wMin(k)) & _
            " - " & CStr(wMax(k)) & " nm" & vbLf
    Next k
    s$ = s$ & vbLf & "Click OK to proceed, Cancel to quit"
    ' User must verify ranges
    If MsgBox(s$, vbOkCancel, "Verify") = vbOK Then
        s$ = "Computed averages: " & vbLf & vbLf
        For k = 1 To kVals
            AveCalc yMin(k), yMax(k), yAve(k), wMin(k), wMax(k)
            s$ = s$ & CStr(wMin(k)) & " - " & CStr(wMax(k)) _
                & " nm: " & Format$(yAve(k), "0.0") & "%" & vbLf
        Next k
        MsgBox s$, vbOkOnly, "Multi-Average"
    End If
    Exit Sub
InputErr:
    MsgBox "Data input error", vbCritical, "Multi-Average"
End Sub

October 26    Reports in Microsoft Word


Click for PDF

The FilmStar Report Generator is very useful for many purposes, but does not readily support complex formatting. It lacks tables, has problems with mixed fonts, etc. As complexity increases, the Report Template ultimately becomes unwieldy.

As an alternative, Microsoft Word can be utilized as print server. The process is relatively simple. A Word document with DocVariable fields (Insert.. Field.. Document Automation.. DocVariable)  is created as source document. These fields transfer FilmStar BASIC values to your document. FSPlot graphs are inserted with AddPicture. Click here for a step-by-step tutorial.

An illustrative Word template document (MeasureQA.doc) as well as its corresponding FilmStar macro (MeasureQA_Word.bas) have been added to the MEASURE installer and available here. These provide a framework for users requiring highly professional QA and marketing documents. (To test in DESIGN change 'Scan' to 'Calculate' and comment out 'AveCalc' in Sub SetTable.)

Documents can be printed directly, as if generated solely by FilmStar. Alternatively the Word print preview screen can be activated, thereby adding the ability to verify before printing. While we think the macro illustrates most required functions, users' suggestions are very welcome.

This will not work with the pre-installed
'Click-to-Run' version of Office 2010.
Click here for further information.
 


November 11    Schott and Ohara Glass


User-friendly glass selector

New Excel workbooks SchottGlass.xls and OharaGlass.xls (now included in FilmStar installers) add an Export worksheet and supporting VBA macros to the original Schott and Ohara versions.

n values are computed from the Sellmeier dispersion formula while k values are computed from internal transmittance (t) data. In some cases there is a choice between t values obtained with 10 or 25 mm samples. The final W,n,k table is at the wavelengths for which t is given.

Workbooks are automatically opened by INDEX macro SchottGlass.bas or OharaGlass.bas. (These macros are quite simple, as most of the work is performed by Excel VBA.) Workbooks can also be used standalone with W,n,k table automatically copied to the clipboard. Users might want to experiment with standalone mode in order to verify results.

As always, if an Excel-based FilmStar macro doesn't work, you need to re-establish the reference to the Microsoft Excel Object Library.


November 30    n,k Archive Mode to Tables


Film Indices n,k Archive mode


Index Table viewer

In DESIGN's FILM Archive mode click File...Archive n,k Data to enable n,k Archive mode. In this mode n,k data are stored in the design and not in separate material files. This is useful for creating permanent records and also for transferring designs to other FilmStar users or to FTG Software.

Open the Film Indices dialog and observe that entries are now fixed. Move the grid highlight to a row containing a Dispersion name; this enables the View n,k Data button. Click the button to active the Index Table viewer.

NEW...The viewer File menu now offers the option to save n,k data as an INDEX file (.itw). After creating n,k files, users can exit n,k Archive mode and modify indices.

The intention is to recreate files on a computer not having the original n,k files. The new .itw file contains only n,k data and no information about dispersive index functions. For this reason, an attempt to overwrite an existing file results in an error message.

Finally, the View menu in Film Indices offers the option to display k values in scientific notation. This option is carried over to the Index Table viewer.

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