Technical Issues - FilmStar News 2009
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:
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.
Recent versions of FilmStar compensate for this deficiency by automatically detecting the 120 DPI setting and adjusting Verdana 8 accordingly:
FilmStar now supports Segoe UI, a new Vista font designed for ClearType. Click File Configuration.. Preferences.. Screen Fonts to select.
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.
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.
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.
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.
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 1Sub 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
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.
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.
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
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.
1. New BASIC Function gMsgBox in FilmStar MEASURE supports message boxes containing graphics. Buttons can be OK-Cancel, Yes-No, Abort-Retry-Ignore, etc.
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.
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.
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.
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 CoatersAverage 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'.
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.
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
The following FilmStar MEASURE (Scantaq) BASIC example utilizes AveCalc for multiple wavelength ranges. We think this is the simplest way to specify multiple ranges.