About this document

 Top Next

written by W.Theiss

W. Theiss – Hard- and Software for Optical Spectroscopy

Dr.-Bernhard-Klein-Str. 110, D-52078 Aachen, Germany

Phone: + 49 241 5661390 Fax: + 49 241 9529100

e-mail: theiss@mtheiss.com web: www.mtheiss.com

January 2012


Introduction

 Top Previous Next

The Coating Designer (CODE) is an application to assist you in the optical design of thin film coatings. Originally designed for glass coatings it can be used quite generally whenever optical spectra have to be optimized for a certain application (such as optical filters, solar absorbers, ...). It is based on the SCOUT spectrum simulation software and adds some functions important for thin film design. In fact, Coating Designer contains a complete SCOUT. You can directly import SCOUT configurations by setting the import filter to the SCOUT file format.

This documentation is only about the additional features added to SCOUT. It is assumed that the reader is already an experienced user of SCOUT. Help on SCOUT is given in a separate document.

The CODE main window looks, except for the background picture, very much like that of SCOUT:

The introduction of the user guide gives an overview of the additional features of CODE with respect to SCOUT.


About the author

Responsible for all good and bad program features:

Wolfgang Theiss

Dr.-Bernhard-Klein-Str. 110

D-52078 Aachen

Germany

Phone: + 49 241 5661390

Fax: + 49 241 9529100

e-mail: theiss@mtheiss.com

web: www.mtheiss.com


Introduction

This guide shows how the additional features of CODE are applied - background information on the computed quantities are described in a later chapter.

There is one additional list of objects, the list of so-called 'integral quantities'. These quantities characterize optical properties of layer stacks and are often used as the only characterizing numbers for products. Typical examples are color coordinates or averaged transmission coefficients in certain spectral ranges.

Integral quantities can be displayed in views (the main window of CODE). Details are described in a separate section.

Several minor differences are summarized in the section 'Other differences to SCOUT' below.

In order to use OLE automation of both SCOUT and CODE on one machine, the OLE server name of the two programs is different. The programs also differ in the available OLE commands: CODE supports all SCOUT OLE automation features and adds some more. The additional commands and properties of the CODE OLE server are described in a separate section.


The list of integral quantities

The list of integral quantities looks like this:

Plese see the technical reference of the SCOUT manual for a description of the general handling of lists like this.

As usual, you create items, i.e. rows, by selecting the desired item type in the drop down box (labeled in the situation above with 'Color coordinate L*') and then press the '+' button.

The columns of the list have the following meanings:

Value

This is the actual, computed value of the integral quantity.

Type

Here the type of the quantity is indicated. There are several color coordinates that can be computed, and various other quantities of technical interest.

Spectrum

The name of the spectrum that is refered to when the integral quantity is computed. Certain types of integral quantities require spectral data in well-defined spectral ranges. The spectrum should cover the used spectral range completely. The usual interpolation and extrapolation is performed if the spectral data points in the spectrum do not match the points necessary for the computation of the integral quantity.

To select the spectrum you have to press the F4 function key. This lets you cycle through all entries of the spectrum list. Stop when you have reached the appropriate spectrum. By pressing the F5 function key you can move backwards in the spectrum list.

Sim/Exp

After the wanted spectrum is selected you can choose between the simulated spectrum and the experimental one for the computation of the integral quantity. Although usually you may be interested in the values for the simulated spectra only, there might be situations where you want to know the corresponding values for the experimental data also.

You toggle between the simulated and measured spectrum by pressing the F4 or F5 function key.

Optimize

This value can be switched between the states 'Off' and 'On'. If the setting is 'Off' nothing happens. If one of the entries is set to 'On' then WCD switches its fitting strategy: Whereas usually the goal is to decrease the deviation between simulated and measured data now the integral quantity is optimized with respect to its target value (see below). The fit deviation now is the sum of the squared differences between the 'value' and the 'target value' of those integral quantities that have their optimize column entry set to 'On'. Each square difference is multiplied by its individual weight (see below).

You can toggle between 'Off' and 'On' by pressing the F4 or F5 function key.

Target value

Here you set the target value for the fitting of the integral quantities.

Weight

Here you specify the weight that multiplies the squared difference between the value and the target value of the integral quantity.

Special menu commands:

Edit

This command activates a sequence of dialogs which can be used to modify the properties of integral quantities:

Here you can change the text used to identify the integral quantity in views etc., i.e. the name of the object. Instead of the long name 'a* / D65 / 2° (T, Simulation)' you could simply call this quantity 'a*'. If you leave the nickname blank the original default name will be used.

If you want to display the value of the integral unit together with a unit, you can enter the unit text in this dialog.

Use this dialog to set a scaling factor for the value of the integral quantity. If you want to display, for example, an averaged reflectance value (scaled between 0 and 1) in %, you should enter a scaling factor of 100 here. In addition, you should also use a proper unit (like % in this case) to indicate the scaling of the value.

This dialog sets the number of decimals used to display the computed value.

The sequence of dialogs shown above will appear for every integral quantity. Some objects require more selections. In this case, additional dialogs will show up and allow the user to make choices. The individual dialogs are discussed below.

Tables

Use this command to create tables of quantities such as the applied color-matching functions or the spectral distributions of the various illuminants. The table values are written to the workbook which opens automatically.


Color coordinates

Color coordinates have several options which are set in the following dialog:

You access this dialog by selecting the color coordinate you want to change and activating the menu item Edit (or by clicking with the right mouse button on the color coordinate).

The following color coordinate types are implemented at present:

X,Y,Z

x,y,z

L*, a*, b*

Lab

All are based on X,Y and Z which are computed using the selected illuminant and observation angle. At present the spectra called A, D65 and Care available. The observation angles are 2° and 10° for which color matching functions are defined.

Color view

Color view objects can be used to roughly visualize the 'color' of a spectrum. With the Edit command in the list of integral quantities the following window opens:

The window shows (after selection of an illuminating spectrum) the computed color coordinates X,Y, and Z and converts these to L*, a*, b* and RGB coordinates (Red, Green, Blue). The latter are used to display the color in the upper right half of the window. Since the conversion from X,Y,Z to RGB values is not very accurate the color view should not taken too seriously. Most PC screens are not calibrated properly anyway. So take the color impression just as a rough indication of the real color.

For dark colors with low L* values the visualization is quite useless since the color appears to be black on PC screens. For such cases the bottom rectangle can be used to display a brighter version of the color: It shows a visualization of a color with the same a* and b* values, but a user-defined L* value. Use the slider position to vary L* from 0 to 100. Note, that you must use the Update command in the list of integral quantities or in the main window of CODE in order to re-compute the color coordinates after you have changed the slider.

You can leave the color view window open while you change the optical model, e.g. while changing film thicknesses with sliders: The visualization is updated whenever the model is re-computed.

Color view objects can be displayed in a view in CODE's main window (see below).

Color angle variation

This object can be used to inspect and optimize the variation of a coating's color with angle of incidence. For a user-defined angle range, you can set target values for L*, a* and b*. For each angle, the object will compute L*, a* and b* using the actual coating. The mean square deviation between actual and target values is computed as the final number. You can set 0 as target for this deviation, and let CODE optimize parameters like film thicknesses in order to minimize the deviation, i.e. to achieve the wanted angular color variation. Be aware that for large angles the polarization of the incoming beam is important - in most cases the choice of unpolarized radiation in the corresponding spectrum object is most useful.

A view object showing a color angle variation object can display the angular dependence of L*, a* and b*. This is described below.

The Edit action for objects of this type first opens dialogs for the nickname, unit, scaling factor and decimals. Then two dialogs for graphics parameters are shown. These parameters are used by view objects that display object of type 'Color angle variation' in the main view. The first dialog sets the parameters for displaying L*, a* and b* vs. angle of incidence (set mode=2 in the view object to show this graph):

The second dialog sets parameters for a plot showing b* vs. a* (mode = 3 in the view object):

Then, in the final step, the following dialog lets you define the parameters of the computation:

In the top section the angular range is defined by setting the minimum and the maximum angle and the number of points used to scan the angle range. The example shown above means a scan of angles between 0° and 80° with a 10° resolution. If you check the option 'Count angles from backside normal' an angle of 0° means that the radiation is incident from the backside of the sample. In this case the scan from 0° to 80° covers incidence angles in the spectrum simulation object between 180° and 100°.

In the center section you can specify the wanted color variation with angle: For L*, a* and b* you have to enter an expression for the variation of the value with angle. The angle must be referred to as 'x'. The following example shows appropriate settings for a weak increase of L* with angle and constant a* and b* values:

You must enter a formula for the target values in each edit field before you close the dialog. Otherwise you will get a warning message.

The checkboxes labeled 'Use in computation' can be used to control if this quantity (L*, a* or b*) is taken into account for the computation of the deviation. In some cases it might be appropriate to leave L* out of consideration, and optimize only a* and b*.

If some angles are more important for the color appearance of a coating than others, you can express this using an angular dependent weight function. The squared deviation between actual and target values for each angle is multiplied with the weight function at this angle.

The settings of the checkboxes under 'Show in graph' determine wether this quantity is displayed in the view graph.

Color fluctuation

This quantity computes the variation of color in the case of fluctuating model parameters, such as thickness values. For each fluctuating quantity the color distance to the center color in L*a*b* space is computed for the upper and lower boundary of the fluctuation. The final value is the average color distance of all variations. This very simple computational scheme is used as a compromise between speed and accuracy.

In the case of large layer stacks with many fluctuating layer thickness values the use of color fluctuation objects may lead to quite large computational times. On the other hand, the design of 'stable' coating properties is quite easy with color fluctuation objects.

Dominant wavelength

The so-called dominant wavelength is computed by objects with the same name. Besides the computation of this quantity these objects also display the position of the color in the x-y-plane which is used to compute the dominant wavelength. With Edit or clicking the right mouse button a new window opens showing the following graph:

The blue line represents the position of pure spectral colors in the x-y-plane (380 to 700 nm wavelength). The black circle shows the position of 'white' whereas the blue circle shows the position of the current spectrum. If the model changes (e.g. by varying a layer thickness with a slider) the graphics is updated automatically: You can instantly see the blue circle moving through the x-y-plane. This is a very instructive tool for layer design.

Purity

This quantity closely related to the dominant wavelength is calculated by objects named 'Purity'. Purity objects feature the same graphics as dominant wavelength objects.


Virtual office tower

To inspect the appearance of coatings designed for architectural applications in an intuitive way you can equip a virtual office tower with your newly designed window panes.

Create an object of type 'Virtual tower' and set the wanted spectrum. To be as realistic as possible this should be a reflectance spectrum using unpolarized radiation. The layer stack used for the computation of this spectrum should be the one you want to test, i.e. including all panes, air gaps and coatings ordered exactly as they will be mounted in the building. You as observer look at the building from the outside. Do not forget to set the 'sim/exp' option to 'Simulation'. Finally, use the Edit command to open another window where the image of the new office tower will be generated. Activate the Build tower command and Code starts to compute for each window of the building the angle of incidence and the corresponding reflectance spectrum. In the end the complete building is drawn:

Use the command File|Save bitmap as ... to store the image in a bitmap file.

If you have defined thickness fluctuations in your layer stack (see SCOUT technical manual), for every window of the building a different realization of the fluctuating parameters is used. Strong fluctuations may lead to 'designs' like the following:


Other quantities

In addition to color coordinates the following integral quantities may be computed:

Light transmittance

Light reflectance

Solar direct transmittance

Solar direct reflectance

Spectrum product

Photocurrent

g (total solar energy transmittance)

Ra (Color rendering index)

Emissivity (normal and effective)

Sheet resistance

U (Thermal transmittance)


Functions of integrals quantities

Starting with object generation 2.86, the list of integral quantities may contain objects of type 'Function of int. quant.'. These objects are used in cases where you want to compute functions of other integral quantities, such as differences, sums or ratios.

If you edit an object of type 'Function of int. quant.' you are guided through the sequence of dialogs to set the nickname, unit, scaling factor and decimals. Finally a dialog to set the function is displayed:

In this dialog you can refer to other integral quantities by the symbol iq(index). In the example, iq(1) refers to the first item of the list of integral quantities whereas iq(2) denotes the second item. You can refer to optical functions as well, using the symbol of(index). of(4), for example, refers to the 4th item of the list of optical functions.

The assignment of a spectrum to objects of type 'Function of int. quant.' is completely ignored in the computation.

Note that the order of integral quantities is important if you use functions of integral quantities: The computational routine in CODE computes the items of the integral quantity list from the top to the bottom. Functions that refer to items of this list should be placed underneath all the objects that are required for the computation. In the example above the function object may occur as the third item in the list or below.


Integral quantities in main window views

You can drag integral quantities like color coordinates from the list of integral quantities to a view list. If they carry a numerical value that value is displayed to the right of the name of the quantity. The format of the display is controlled by a mode parameter. If you select the view element and use the Edit command in the list of view elements, you are first asked to select the color for the text. Once the color dialog is closed, you are asked for the mode parameter in a dialog like this:

The name of the integral quantity (or the nickname, if you defined one) is shown, with left justification, inside the rectangle of the view element. If mode is set to 0, the numerical value is written to the right of the view object's rectangle, also left-justified. If mode equals 1, the numerical value is written right-justified with respect to the right side of the rectangle. Mode 1 is useful if you want to create tables of integral values in a view. The following example shows the difference between mode 0 and 1, with the gray rectangle indicating the width of the view objects' rectangles:

The following integral quantity objects are displayed in a special way when they are dragged into a view:

Color view

These objects are displayed in various ways, depending on the mode parameter of the view element. The following graph gives an overview:

Modes 4 and 5 convert the color coordinates a* and b* to a color name, according to the following scheme:

Virtual Office Tower

If you drag objects of type 'Virtual Office Tower' to a view be aware of the large computational work that has to be done to draw the image. The build-up of the view may take quite a long time on slow computers. Tower objects are drawn in views like this:

Color angle variation

Objects of this type are represented in views the same way as other integral quantities that produce a numerical value as output (see above, mode = 0 or mode = 1). If you set mode = 2 a graph is generated that fills the view element's rectangle:

The graphics parameters used for the plot are set in the dialog that follows the objects Edit command (see above).

The solid lines in the graph represent the variation of L* (black), a* (blue) and b* (red) with angle of incidence. The dashed lines show the corresponding target values. If you choose to display the weight function (check the appropriate checkbox in the object's dialog) it is drawn green.

Setting mode = 3 generates a 'b* vs. a*' graph. The graphics parameters for this plot are also set in the Edit routine of the color angle variation object (see above).

You can generate several view objects that refer to the same color angle variation object like in the case below: The two graphs on the left show the same color angle variation object:


Other differences to SCOUT

In addition to the integral quantity list, there are some minor differences between CODE and SCOUT. These are summarized in this section.

Automatic loading of a start configuraton

After program start CODE looks in the program directory file for a configuration named 'Start.wcd'. If it exists it is loaded automatically.

Automatic display of spectra and sliders

In versions of CODE created after 2001 the automatic display of spectra and sliders after loading a new configuration can be set as option of the configuration.

Parameter variation

Like SCOUT, CODE computes the variation of optical spectra with a parameter variation. In addition, the variation of all integral quantities is computed as well. The additional data are stored in the worksheet 'Colors'.

Parameter fluctuation

As in the case of parameter variations, CODE computes in addition to all SCOUT work the fluctuation of all integral quantities and stores the results in the worksheet 'Colors fluctuation'. No automatic graphical display is generated. In some cases it might be useful to create graphs using objects of type 'Workbook display (rows)', e.g. in order to show color variations in a 'b* vs a*' plot. See the SCOUT manual for details about user-defined views.

Starting with object generation 2.55, we recommend the use of the new object type 'Color box' in the list of special computations (see SCOUT manual) in order to generate graphs of type 'b* vs. a*'.

Additional optical functions

The values of integral quantities can be displayed in the list of 'Optical functions' (see SCOUT technical manual). They will then appear in the workbook when you export results using the Export command. In the batch control window the values of optical functions are listed as well for every sample.

Just drag the wanted items from the list of integral quantities to the list of optical functions.


Introduction

Automatic installation

The installation of the OLE server is done by the CODE setup routine. It registers the application as OLE automation server named 'code.colors' which is after the setup procedure available to all OLE automation clients like LabView, Excel, C++, ... .

Manual registration

You can unregister and register OLE servers manually, using the Windows command line with administrator rights. In order to unregister CODE as OLE server, use the command

c:\program files\code\code.exe /unregserver

where the path to the executable file has to be adjusted, of course.

To manually register CODE please use the command

c:\program files\code\code.exe /regserver

CODE has all OLE commands and properties that our SCOUT software has, and some more in addition. This section lists all methods and properties, repeating all SCOUT items for completeness.

CODE as OLE server must be called as 'code.colors', like in the following line of a VisualBasic example:

Set wcd = CreateObject("code.colors")

The following sections describe the available OLE methods and properties. The application of OLE automation is demonstrated in an Excel VisualBasic example.


acquire

This command executes the global acquire command in CODE: All spectrometers are told to record new spectra.


add_layer_definition_on_top(stack_index : integer;definition : string)

A new layer is added on top of the current layer stack with index 'stack_index' in the list of layer stacks (stacks are counted 1, 2, 3, ...).

The new layer is specified by the string 'Definition'. The string may be composed by several terms, separated by tab characters. A tab character has the ASCII code 9 (In VisualBasic, for example, this is obtained by Chr(9)).

Possible layer definitions are

·"Simple layer" + tab + string specifiying the material + tab + string specifying the thickness in cm(!) + tab + string specifying the partial wave superposition ("coherent" or "incoherent")

·"Thin film" + tab + string specifiying the material + tab + string specifying the thickness in cm(!)

·"Thick layer" + tab + string specifiying the material + tab + string specifying the thickness in cm(!)

·"Variable thickness" + tab + string specifiying the material + tab + string specifying the thickness in cm(!) + tab + string specifying the thickness variation in cm (!) + tab + string specifying the thickness profile ("1" rectangular, "2" Gaussian)

·"Rough interface" + tab + string specifying the roughness formula + tab + string specifying the value of the c1 parameter + tab + string specifying the value of the c2 parameter

·'End superlattice' (no parameter)

·'Begin superlattice'+tab+'10' (the last partial string specifies the number of repetitions of the superlattice)

VisualBasic examples:

The VisualBasic code

wcd.clear_fit_parameters

wcd.clear_layer_stack (1)

wcd.clear_material_list

Call wcd.add_layer_definition_on_top(1, "End superlattice")

Call wcd.add_layer_definition_on_top(1, "Simple layer" + Chr(9) + "Si3N4" + Chr(9) + "0.0002" + Chr(9) + "coherent")

Call wcd.add_layer_definition_on_top(1, "Thin film" + Chr(9) + "Ag (JC)" + Chr(9) + "0.000001")

Call wcd.add_layer_definition_on_top(1, "Begin superlattice" + Chr(9) + "10")

Call wcd.add_layer_definition_on_top(1, "Thick layer" + Chr(9) + "Si3N4" + Chr(9) + "0.2")

Call wcd.add_layer_definition_on_top(1, "Rough interface" + Chr(9) + "c1*EXP(-X*X/C2/C2)" + Chr(9) + "0.93" + Chr(9) + "45000.0")

wcd.update_data

wcd.update_plot

creates the following layer stack:

Here is an VB example for the 'Variable thickness' layer type:

Call wcd.add_layer_definition_on_top(1, "Variable thickness" + Chr(9) + "Si3N4" + Chr(9) + "0.0006" + Chr(9) + "0.00004" + Chr(9) + "2")


add_layer_on_top (stack_index : integer; layer_type,material:string;thickness:real number; thickness_unit : string)

A new layer is added on top of the current layer stack with index 'stack_index' in the list of layer stacks (stacks are counted 1, 2, 3, ...).

The type of the layer is specified by the string 'layer_type'. Possible types are

·'Thin film' (coherent superposition of partial waves)

·'Thick layer' (incoherent superposition of partial waves)

The material assignment is given by the 'material' parameter. If the wanted material is found in the list of materials, it is taken from there. If not, the database is searched for the requested material. In the case of success, the material is transferred from the database to the list of materials and used for the layer stack assignment.

The thickness of the new layer is specified by the paramters 'thickness' (a real number) and 'thickness_unit' (a string). Possible values for the thickness unit are

·'nm'

·'micron'

·'mm'

·'m'

VisualBasic examples:

Call wcd.add_layer_on_top(1, "Thin film", "Si3N4", 0.45, "micron")

Call wcd.add_layer_on_top(1, "Thin film", "Ag (JC)", 19.4, "nm")


add_to_report(text : string)

Adds the submitted string to the CODE report window.


acquire_dark

Use this command to tell all spectrometers to record their dark spectrum.


acquire_reference

Use this command to tell all spectrometers to record their reference spectrum.


automatic_spectrum_scaling(i : index)

Executes automatic scaling of the graphics of the i-th spectrum.


batch_add_sample (name: string)

A new sample column is added to the 'Results' worksheet of the batch control workbook. In subsequent calls you have to specify the input spectra for this sample.

VBA example:

wcd.add_sample("S413 #1")


batch_clear_samples

Use this command to clear the 'Results' page of the batch control workbook, with the exception of the first column. All input spectra and results are deleted. This is used to prepare a new batch run. Using the batch_add_sample command you can add new samples afterwards.

VBA example:

wcd.batch_clear_samples


batch_go

Starts the batch fit based on the current batch control workbook settings. CODE will be busy with the batch fit activity for a while, but still respond to OLE commands. You can inspect the value of the property batch_status to find out if the batch fit operation is still active.

VBA example:

scout.batch_go


batch_restore_fit_results (sample : string)

Reloads the obtained batch fit parameters and the spectra for the specified sample.


clear_fit_parameters

This command deletes all items from the list of fit parameters.

VisualBasic example:

wcd.clear_fit_parameters


clear_layer_stack (index : integer)

Deletes all layers of a layer stack and assigns 'Vacuum' to the top and bottom halfspaces.

The position of the layer stack in the list of layer stacks is given by index (stacks are numbered 1, 2, 3, ...).

VisualBasic example:

wcd.clear_layer_stack (1)


clear_material_list

Clears the list of materials: All items are deleted, with the exception of 'Vacuum'.

VisualBasic example:

wcd.clear_material_list


clear_report

Clears the CODE report window to prepare it for subsequent entries.


create_fit_parameter (list, object, subobject, subsubobject, parameter : integer) (copy)

create_fit_parameter (list, object, subobject, subsubobject, parameter : integer)

 Top Previous Next

Creates a new fit parameter in the list of fit parameters. The parameters passed to this procedure have the following meaning:

list: the CODE list with the object the fit parameter of which is to be created

1 Materials

2 Layer stacks
3 Spectra list

4 Master parameter list

object: the index of the object in the list. The objects are counted 1, 2, 3, ...

subobject: if the object has subobjects this parameter specifies the index of the wanted subobject. This can be, for example, a susceptibility in the list of susceptibilities of a dielectric function model.

subsubobject: if the subobject has again subobjects of its own, this is the index of the wanted subobject.

parameter: the index of the parameter to be selected as fit parameter. If you are not sure about the index of a parameter you can drag the object to the fit parameter list and see which parameters are created in which order. The 'create_fit_parameter' OLE command uses exactly the same number and sequence of parameters.

Here is a simple example making use of the create_fit_parameter command:

'Excel VisualBasic demo of a remote fitting procedure using OLE automation

'This object is the SCOUT automation object

Public wcd As Object

Public Sub fit()

'Create the OLE server

Set wcd = CreateObject("code.colors")

'Load a pre-configured configuration with a suitable reflectance spectrum and spectral range

wcd.configuration_file = "c:\test\ole_test.wcd"

'Show SCOUT on the screen

wcd.Show

'Clear the layer stack - we will build up a new one in a moment

wcd.clear_layer_stack (1)

'Clear the list of materials - materials will be taken from the database

wcd.clear_material_list

'Create a thick layer with 2 mm thickness and fill it with BK7 glass, a material named "Glass Type BK7" must be in the database

Call wcd.add_layer_definition_on_top(1, "Thick layer" + Chr(9) + "Glass Type BK7" + Chr(9) + "0.2")

'Create a thin silver filme on top of the glass substrate, take the material "Ag model" from the database

Call wcd.add_layer_definition_on_top(1, "Thin film" + Chr(9) + "Ag model" + Chr(9) + "0.000001")

'Load a measured spectrum into the first spectrum object, using standard format

Call wcd.load_experiment(1, "C:\test\ag_10.std", 1)

'Clear the list of fitparameters

wcd.clear_fit_parameters

'From the list of layer stacks, take the first object

'and then the second subobject. This is the silver layer.

'Select parameter 1 as fit parameter (this is the thickness)

Call wcd.create_fit_parameter(2, 1, 2, 0, 1)

'From the list of materials, take the 3rd object which is the silver model

'(initially there was vacuum, then glass has been taken from the database,

'and finally, as 3rd object, the Ag model was loaded).

'Take the first susceptibility which is the Drude model.

'Take the 2nd parameter of the Drude model which is the damping constant and select

'it as fit parameter.

Call wcd.create_fit_parameter(1, 3, 1, 0, 2)

'Set boundaries for the damping constant which is fit parameter 2 now (after the layer thickness).

wcd.fit_parameter_value_min(2) = 100

wcd.fit_parameter_value_max(2) = 10000

'The silver model contains several Brendel oscillators in the list of susceptibilities.

'Take the 2nd, 3rd, 4th and 5th susceptibility and select for each one parameter

'2 as fit parameter, i.e. the oscillator strength.

'This is just for demonstration - it is not really reasonable to vary these parameters in the fit.

Call wcd.create_fit_parameter(1, 3, 2, 0, 2)

Call wcd.create_fit_parameter(1, 3, 3, 0, 2)

Call wcd.create_fit_parameter(1, 3, 4, 0, 2)

Call wcd.create_fit_parameter(1, 3, 5, 0, 2)

'Select - just for demonstration - parameter #1 of the first spectrum in the list of spectra.

'This is the angle of incidence of the reflectance spectrum.

Call wcd.create_fit_parameter(3, 1, 0, 0, 1)

'Select - also for demonstration only - the first master parameter as fitparameter.

Call wcd.create_fit_parameter(4, 1, 0, 0, 1)

'Re-compute the model and update the main view

wcd.update_data

wcd.update_plot

'Start the fit

wcd.start

'Start a waiting loop which will finish when SCOUT stops its fit (or you as a user

'press the STOP button in SCOUT.

While wcd.fitting = True

'Wait for 1 second

Application.Wait Now + TimeSerial(0, 0, 1)

Wend

'Write results to a worksheet range

'fit parameter #1 is the thickness

Range("results").Offset(1, 1) = wcd.fit_parameter_value(1)

'export the real part of the refractive index of the Ag model at 1000 nm wavelength

Range("results").Offset(1, 2) = wcd.refractive_index(3, 10000000 / 1000)

'export the imaginary part of the refractive index of the Ag model at 1000 nm wavelength

Range("results").Offset(1, 3) = wcd.kappa(3, 10000000 / 1000)

End Sub


df_load_from_file

df_load_from_file(n:integer, filename : string)

 Top Previous Next

Using this command the n-th dielectric function is told to import data from a standard file specified by the 'filename' parameter.

The n-th dielectric function should be of type 'imported dielectric function' (which is not checked at present).


df_load_from_file_2(n: Integer; const filename, unit_string:String);

Using this command the n-th dielectric function is told to import data from a standard file specified by the 'filename' parameter.

The n-th dielectric function should be of type 'imported dielectric function' (which is not checked at present).

You can specify the spectral unit of the file data by setting the unit_string parameter to one of the following:

String transmitted Spectral unit used

'cm^-1^' or '1/cm' > wavenumbers

'nm' > nanometers

'|m|m' or 'micron' > microns

'eV' > electron volts

'THz' > THz


df_load_from_x_n_k_table(n:integer; const filename : string);

Using this command the n-th dielectric function is told to import data from a testfile specified by the 'filename' parameter. The file must contain a table with three columns. The first column has to contain the spectral position, followed by n and k.

The n-th dielectric function should be of type 'imported dielectric function' (which is not checked at present).


df_load_from_x_n_k_table_2 (n:integer; const filename : string);

df_load_from_x_n_k_table(n:integer; const filename : string);

 Top Previous Next

Using this command the n-th dielectric function is told to import data from a testfile specified by the 'filename' parameter. The file must contain a table with three columns. The first column has to contain the spectral position, followed by n and k.

The n-th dielectric function should be of type 'imported dielectric function' (which is not checked at present).

You can specify the spectral unit of the file data by setting the unit_string parameter to one of the following:

String transmitted Spectral unit used

'cm^-1^' or '1/cm' > wavenumbers

'nm' > nanometers

'|m|m' or 'micron' > microns

'eV' > electron volts

'THz' > THz


df_to_clipboard (n : integer)

Tells the n-th material in the list of materials to copy its graphics to the clipboard.


export_measured_spectrum(n:integer; filename:string; format : integer)

Use this command to save the measured data of the n'th spectrum in the spectrum list to the file specified by filename. The format used for the datafile is given by the 'format' parameter.

The following values for the format are implemented up to now:

format File format

1 Standard

2 xy-format

4 SpectraCalc

VisualBasic example:

wcd.export_measured_spectrum(1,"c:/temp/dummy2.spc",4)


export_simulated_spectrum(n:integer; filename:string; format : integer)_2

export_simulated_spectrum(n:integer; filename:string; format : integer)

 Top Previous Next

Use this command to save the simulated data of the n'th spectrum in the spectrum list to the file specified by filename. The format used for the datafile is given by the 'format' parameter.

The following values for the format are implemented up to now:

format File format

1 Standard

2 xy-format

4 SpectraCalc

VisualBasic example:

wcd.export_measured_spectrum(1,"c:/temp/dummy2.spc",4)


grid_test

This procedure does the following: The fit parameter specified by the integer grid_test_para is varied from the value grid_test_min to the value given by grid_test_max. Grid_test_no_points are used to cover this parameter range. For each value the fit deviation is computed. After the procedure the fit parameter is set to the best value found on this grid of tried values. This feature can be used before an automatic fit to find good starting values for some of the fit parameters.


hide

Hides CODE from the screen.


hide_statusbar

Hides the status bar.


import_measured_data_via_variants(index : string; spectral_positions, spectral_data : variant; unit_string : string)

Use this command to pass experimental spectra to a CODE reflectance or transmittance spectrum.

The 'Index' parameter gives the index of the spectrum in the list of spectra (counted like 1, 2, 3, ...). The spectral positions (wavelengths, frequencies, wavenumbers, energies) and data (reflectance or transmittance) are passed through variant arrays - they must be 1-dimensional and of the same length. The parameter 'unit_string' sets the spectral unit (eV, 1/cm, THz, nanometer, wavenumber).


function import_measured_plate_spectra(stack_index, layer_index : integer; t, rt, rb : string;file_format, option_t,option_rt,option_rb : integer) : integer

This function is used to load measured spectra into a layer of type 'Measured plate'. The layer is specified by the index of the stack in which it exists (counting 1, 2, 3, ...) and the layer index (also counted like 1, 2, 3, ...).

The strings t, rt and rb are used to pass the filenames for the transmittance, top side reflectance and bottom side reflectance.

File_format sets the format of the file.

The integers option_t, option_rt and option_rb define file import options that are used if you are reading from a file containing several spectra. option_t=7 means that the transmittance spectra is the seventh spectrum in the file, for example.

The return value is 0 if the spectra have been successfully loaded. Otherwise a value larger than 0 is returned.

VisualBasic call:

dim r as integer

r = wcd.import_measured_plate_spectra(1,2,"c:\temp\t.spc","c:\temp\r_top.spc", "c:\temp\r_bottom.spc", 4, 1, 1, 1)

if r<>0 then

msgbox "Error importing measured plate spectra!"

endif


load_df(n : integer, filename : string)

Loads the n-th dielectric function from the specified file. The entries in the list of dielectric functions are numbered starting with 1.

Warnings:

·Be sure that the reading object and the file format are compatible.

·The content of the dielectric function object will be replaced by the data in the file.

VisualBasic example:

Call wcd.load_df(1, "c:/temp/df2.dfm")


load_experiment (n:integer, filename: string, format:integer)

Loads the file specified by filename into the n-th spectrum object, using the file format given by 'format'.


load_material_from_database (name : string)

This command loads a material from the database into the list of materials. The material is specified by the name parameter which must exactly match an item in the database.

VisualBasic example:

wcd.load_material_from_database ("Si3N4")


pane_wizard_divide_r_by_100

Divides the reflectance spectrum of the pane wizard by 100.


pane_wizard_divide_t_by_100

Divides the reflectance spectrum of the pane wizard by 100.


pane_wizard_export_results (material : string; version : float; username, comment : string)

The pane wizard analysis is done and the results are exported to the database. The filename is given by material, the file version by version. The database item is stored using the username and comment specified by the username and comment parameters.


pane_wizard_load_r (filename:string,file_format:integer,spectral_unit:string)

Loads a spectrum into the reflectance field of the pane wizard. The data are read from the file given by filename, using the file format specified with file_format. The spectral unit of the data must be given in spectral_unit.


pane_wizard_load_t (filename:string,file_format:integer,spectral_unit:string)

Loads a spectrum into the transmittance field of the pane wizard. The data are read from the file given by filename, using the file format specified with file_format. The spectral unit of the data must be given in spectral_unit.


pane_wizard_set_thickness (thickness : float)

Use this command to pass the thickness of the pane to the pane wizard. The thickness must be specified in micrometers.


pane_wizard_spectral_range (min, max : float; points : integer;spectral_unit : string)

Sets the spectral range of the pane wizard data analysis. The spectral unit is given by spectral_unit. The number of data points is specified by points, whereas the minimum and the maximum of the spectral range is set by min and max, respectively.


rename_material (old_name, new_name : string)

Renames the material called old_name to new_name.


report_to_clipboard

Copies the content of the CODE report window to the clipboard.


report_to_file(filename:string)

Saves the content of the CODE report window to a text file the name of which is the string passed to the method.


prepare_shutdown

This method performs internal clean-up actions which are required before you shutdown the OLE server.

There are 2 important rules applying this command:

Do never call this command when you want to continue to use the OLE server!

Do call this command before you shutdown the OLE server!


print_fit(i : integer)

Tells CODE to print the graphics of spectrum i in the list of spectra. The purpose, of course, is to get information on the fit quality.

VBA example:

scout.print_fit(2)


save_configuration(filename : string)

Saves the complete CODE configuration to the specified file.

Warning: An already existing file it will be overwritten without warning.

VisualBasic example:

wcd.save_configuration ("c:/temp/fit_sample1.wcd")


save_df(n : integer, filename : string)

save_df(n : integer; filename : string)

 Top Previous Next

Saves the n-th dielectric function to the specified file. The entries in the list of dielectric functions are numbered starting with 1.

Warning: An already existing file it will be overwritten without warning.

VisualBasic example:

Call wcd.save_df(2, "c:/temp/df2.dfm")


scout_normal

Show the program window like a normal window which can be hidden by other windows.


scout_on_top

Show the program window on top of other windows on the screen.


searchfiles(dir,pattern : string)

Executes a dialog to select multiple files that can be used afterwards for CODE actions.

In 'dir' you can provide the intial path for the search, 'pattern' specifies a filename search pattern.

The selected filenames can be used afterwards using the functions 'foundfiles' and 'found_filename'.


send_message(the_text : string)

Use this command to send a message to SCOUT. SCOUT will respond to the message with an action corresponding to the message.

Up to now this feature is not used.


set_bottom_halfspace_material (i : integer; name : string)

Assigns the material called name to the bottom halfspace of the i-th layer stack.

Stacks are counted 1, 2, 3, ...

A material called name must be in the list of materials. If it is not you can use the command load_material_from_database(name) in order to load the material from the database into the list of materials.


set_global_range(min, max : real number, no_points : integer, spectral_unit : string) )

Use this command to change the range of all spectral objects such as dielectric functions and computed spectra in one step. CODE reacts as if you had executed the Range command in the main window.

The new spectral range is defined by the mininum value min, the maximum value max, the number of data points no_points and the spectral unit. The spectral unit must be specified as one of the following strings:

String transmitted Spectral unit used by CODE

'cm^-1^' or '1/cm' > wavenumbers

'nm' > nanometers

'|m|m' or 'micron' > microns

'eV' > electron volts

'THz' > THz


set_spectrum_simulation_range(n : integer; min, mix : real number; no_points : integer; spectral_unit : string)

Use this command to change the range of one of the simulated spectra. CODE reacts as if you had executed the Range command in the window of the n-th spectrum. Spectra are counted starting with 1, i.e. 1, 2, 3 , ...

The new spectral range is defined by the mininum value min, the maximum value max, the number of data points no_points and the spectral unit. The spectral unit must be specified as one of the following strings:

String transmitted Spectral unit used by CODE

'cm^-1^' or '1/cm' > wavenumbers

'nm' > nanometers

'|m|m' or 'micron' > microns

'eV' > electron volts

'THz' > THz


set_top_halfspace_material (i : integer; name : string)

Assigns the material called name to the top halfspace of the i-th layer stack. Stacks are counted 1, 2, 3, ...

A material called name must be in the list of materials. If it is not you can use the command load_material_from_database(name) in order to load the material from the database into the list of materials.


show

Displays CODE on the screen.


show_maximized

Shows the main window maximized on the screen.


show_minimized

Minimizes the main window on the screen.


show_normal

Shows the window in its normal position and size, i.e. not maximized and not minimized.


show_statusbar

Shows the status bar.


smooth_data

smooth_data(n_spec : integer; wn_min, wn_max : real number, nt:integer)

 Top Previous Next

Smoothing of the experimental data using 3-point-averaging.

Parameters:

n_spec: number of the spectrum in the spectrum list

wn_min: wavenumber minimum of the spectral range

wn_max: wavenumber maximum of the spectral range

nt: number of smoothing iterations


smooth_data_like_batch_control

Smooth the experimental data using the settings of the batch control window for each spectrum.


spectrum_to_clipboard (n:integer)

Tells the n-th spectrum object to copy its graphics to the clipboard.


start

Starts the parameter fit using the current configuration.


stop

Stops the parameter fit.


update_data

Forces the re-computation of the CODE configuration. This command should be used after parameter changes to recalculate the optical model.


update_plot

Forces the re-drawing of all visible windows of CODE, including the main window displaying the current view.


view_to_clipboard_wmf

Sends the current view as metafile (vector graphics) to the clipboard.


view_to_clipboard_bmp

view_to_clipboard_wmp

Sends the current view as bitmap to the clipboard.


a_filename (string)

Executes the standard dialog to select a filename. Returns the selected name. VBA example:

Range("results").Offset(4 + i, 1) = wcd.a_filename;

Writing this property has no effect.


absorption_coefficient ...

absorption_coefficient(n : integer; wavenumber : real number) (real number)

 Top Previous Next

Returns the absorption coefficient of the n-th dielectric function in the dielectric function list at the wavenumber specified by the 'wavenumber' property. The unit of the absorption coefficient is 1/cm.

Writing this property has no effect.


average_time (real number)

Reading this number you obtain the average time (in seconds) used for one iteration of the fitting procedure.

VBA example:

Range("results").Offset(4 + i, 1) = scout.average_time;

Writing this property has no effect.


batch_configuration_file (string)

Setting the batch_configuration_file property you can load the content of the batch operation worksheets. You have to pass the name of an existing file (including the extension *.xls) as shown in the following VBA example:

wcd.batch_configuration_file = "f:\examples\batch_parameters.xls"

This statement causes the loading of the specified batch configuration file.


batch_fit_deviation (sample:string) (float)

After the performance of a batch fit you can use this command to get the obtained fit deviation for the specified sample.

VBA example:

quality = wcd.batch_fit_deviation("s413 #3")


batch_fitparameter_name (index: integer) (string)

Returns as a string the name of the batch fit parameter specified by the index parameter.

VBA example:

this_name = wcd.batch_fitparameter_name(5)


batch_fitparameter_value (sample: string, index: integer) (float)

Returns as floating point number the value of the batch fit parameter specified by index, obtained in the batch fit for the sample specified by the sample parameter.

VBA example:

this_value = wcd.batch_fitparameter_value("s413 #3", 5)


batch_input_path(index : integer) (string)

This property is the network path to the input spectra of the spectrum specified by the index parameter. The filenames of the input files are composed from the batch_input_path, the batch_spectrum_filename and the extension defined in the 'Input options' worksheet of the batch control workbook.

You can read or write the batch_input_path.

VBA example:

wcd.batch_input_path(1) = "C:\test\data\trans\"

wcd.batch_input_path(2) = "C:\test\data\refl\"


batch_name_of_spectrum (i : integer) (string)

Returns (as string) the name of the i-th spectrum in the batch control workbook. The spectra are labeled 1,2,..., n if there are n spectra for each sample.

VBA example:

my_spectrum_name = wcd.batch_name_of_spectrum(2)

Writing this property has no effect.


batch_number_of_spectra (integer)

Returns the number of spectra defined in the current batch control workbook. Use this number to iterate through all spectra in a loop.

VBA example:

nbs = wcd.batch_number_of_spectra

Writing this property has no effect.


batch_prefit_result(sample : string) (string)

Returns the pre-fit set found for the specified sample during the batch fit.

VBA example:

start_set = wcd.batch_prefit_result("s413 #3")


batch_sample_parameter(sample : string) (float)

Use this property to set or read the numeric parameter of a sample in batch control workbooks. Specify the sample by its name, and pass the numerical parameter as float.

VBA example:

wcd.batch_sample_parameter("s413 #3") = 13.56


batch_spectrum_filename (sample : string, index : integer) (string)

Specifies the input spectrum for the spectrum specified by the index parameter and the sample specified by the sample parameter. You can read or write this item. The input spectra are labeled 1, 2, ... n if there are n spectra for each sample.

VBA example:

wcd.batch_spectrum_filename("s413 #3",1) = "c:\test\s413_3_r"


batch_status (integer)

Inspect this value to find out if CODE is busy with a batch fit operation.

If the value of batch_status is 1 the batch fit is still active.

If the value is 0 the batch fit is finished and you can pick up the results.

VBA example:

This example starts the batch fit and then waits in a loop until the batch fit is done. Every 3 seconds the batch status is checked. Finally a message box indicates the termination of the batch fit.

wcd.batch_go

While wcd.batch_status <> 0

Application.Wait Now + TimeSerial(0, 0, 3)

Wend

msgbox "Batch finished"


color_coordinate(spectrum_index,simulated,color_type,illuminant,observation_angle) (float)

Computes the color coordinate of a spectrum.

The index of the spectrum in the list of spectra is given by the parameter 'spectrum_index'. The spectra are counted 1, 2, 3, ...

Depending on the parameter 'simulated' the color coordinate of the simulated or the measured spectrum is computed:

simulated = 0: The color coordinate of the measured spectrum is computed

simulated = 1: The color coordinate of the simulated spectrum is computed

The 'color_type' parameter selects the color coordinate to be computed. The following choices are possible:

0: L*

1: a*

2: b*

3: X

4: Y

5: Z

6: x

7: y

8: z

9: L

10: a

11: b

'Illuminant' selects one of the following illumination spectra:

0: A

1: D65

2: C

With 'observation angle' you can set the observation angle for which the color coordinate is computed:

0: 2°

1: 10°

Example:

Calling wcd.color_coordinate(1, 1, 1, 0, 1) returns a* of the first simulated spectrum in the list of spectra. It is computed for illuminant A and 10° observation angle.


compute_emissivity (spectrum, index : integer) (integer)

Returns or sets the 'emissivity computation flag' of the interface given by index in the spectrum object given by spectrum. A value of 1 indicates that the emissivity is to be computed, a value of 0 means the assigned fixed value is used (no computation is done).

Please note:

Spectra are counted 1, 2, 3, ...

Emissivity positions are counted according to the following scheme:

0 (external surface of the glazing)

1 (surface of the first pane pointing to the interior)

2 (surface of the second pane pointing to the exterior)

3 (surface of the second pane pointing to the interior)

.

.

.


configuration_file

configuration_file : string (read/write)

 Top Previous Next

Setting the configuration_file property you specify the optical analysis method that is stored in a complete configuration file. You have to pass the name of an existing file as shown in the following VBA example:

wcd.configuration_file = "f:\examples\test.wcd"

This statement causes the loading of the specified configuration file.

Reading this property returns the name of the configuration file that was loaded by CODE in the last 'load configuration' action.


database

Sets or returns the current database path.


delete_layer(stack_index,layer_index) (integer)

Deletes the layer with index layer_index in the stack specified by stack_index. Returns 0 if successful and a number <>0 if a problem has occured.


df_real_part(n : integer; wavenumber : real number) (real number)

Returns the value of the real part of the n-th dielectric function in the dielectric function list at the wavenumber specified by the 'wavenumber' property.

Writing this property has no effect.


df_real_part_nm

df_real_part_nm(n : integer, wavelength : float) : float (read only)

 Top Previous Next

Returns the value of the real part of the n-th dielectric function in the dielectric function list at the wavelength specified by the 'wavelength' property (in nm).


df_imag_part(n : integer; wavenumber : real number) (real number)

Returns the value of the imaginary part of the n-th dielectric function in the dielectric function list at the wavenumber specified by the 'wavenumber' property.

Writing this property has no effect.


df_imag_part_nm

df_imag_part_nm(i : integer, wavelength : float) : float (read only)

 Top Previous Next

Returns the value of the imaginary part of the n-th dielectric function in the dielectric function list at the wavelength specified by the 'wavelength' property (in nm).


dielectric_function_name(i:integer) (string)

Returns the name of the i th dielectric function. The following VBA command fills a certain cell with the name of the 5th dielectric function:

Range("results").Offset(5, 1) = wcd.dielectric_function_name(5)

Setting this property has no effect.


emissivity (spectrum, index : integer) (float)

Returns or sets the emissivity of the interface given by index in the spectrum object given by spectrum.

Please note:

Spectra are counted 1, 2, 3, ...

Emissivity positions are counted according to the following scheme:

0 (external surface of the glazing)

1 (surface of the first pane pointing to the interior)

2 (surface of the second pane pointing to the exterior)

3 (surface of the second pane pointing to the interior)

.

.

.


experimental_spectrum_comment(n:integer): string

Returns the comment of the n-th measured spectrum in the spectrum list.

Writing this property has no effect.


experimental_spectrum_value

experimental_spectrum_value(n : integer, wavenumber : float) : float (read only)

 Top Previous Next

Returns the value of the experimental spectrum that belongs to the n-th spectrum in the spectrum list at the wavenumber specified by the 'wavenumber' property.


fft_thickness

fft_thickness(n_spec : integer; wn_min, wn_max : real number, fft_np:integer, d_min, d_max, n : real number) (real number)

 Top Previous Next

Performs the FFT thickness analysis and returns the obtained thickness.

Parameters:

n_spec: number of the spectrum in the spectrum list

wn_min: wavenumber minimum of the used spectral range

wn_max: wavenumber maximum of the used spectral range

fft_np: number of data points used to sample the spectral range

d_min: expected thickness minimum

d_max: expected thickness maximum

n: refractive index of the layer

VisualBasic example: wcd.fft_thickness(1,650,7000,2048,5,50,2.0)


fft_strength

fft_strength(n_spec : integer):real number

Returns the height of the peak determined in the last fft_thickness routine for spectrum n_spec. This number can be used to get information on the qualitiy of the analysis.


file_format (integer)

Sets the file format for subsequent import actions.

The following values are implemented up to now:

format File format

1 Standard

2 xy-format

3 JCAMP

4 SpectraCalc

5 Perkin-Elmer

6 Zeiss

7 Opus


file_object_generation (real number)

Returns the object generation of the last configuration file that has been loaded into CODE.


fit_deviation (real number)

Returns the current fit deviation.

Dim this_deviation as single

this_deviation = wcd.fit_deviation

Setting this property has no effect.


fit_parameter_name

fit_parameter_name(n : integer) : string (read only)

 Top Previous Next

Returns the name of the n-th fit parameter. The following VBA command fills a certain Excel cell with the name of the selected fit parameter:

Range("results").Offset(4 + i, 1) = wcd.fit_parameter_name(i)


fit_parameter_mode

fit_parameter_mode(n : integer) : integer (read/write)

 Top Previous Next

Sets or reads the variation mode of the n-the fit parameter. The following values are implemented at present:

mode meaning

-1 Frozen

0 Downhill simplex

1 Computed from master parameters by formula

2 Fit on a grid with 10 points

3 Fit on a grid with 20 points

4 Fit on a grid with 50 points

5 Fit on a grid with 100 points


fit_parameter_set

fit_parameter_set : string (read/write)

 Top Previous Next

Setting the fit_parameter_set property you specify the file from which a fit parameter set is to be loaded.

Reading this property returns the name of the currently loaded fit parameter set.

VBA example:

wcd.fit_parameter_set = "f:\examples\thickness_fit.fps"


fit_parameter_value

fit_parameter_value(n : integer) : float (read/write)

 Top Previous Next

Returns the present value of the fit parameter n. The fit parameters are labeled starting at 1.

Dim my_value as single

my_value = wcd.fit_parameter_value(12)

Set this property to pass a value to a fit parameter in CODE:

Dim my_value as single

my_value=3.4

wcd.fit_parameter_value(12)=my_value


fit_parameter_value_max

fit_parameter_value_max(n : integer) : float (read/write)

 Top Previous Next

Sets the upper boundary (maximum) of the range of variation of the n-th fit parameter. Reading this quantity returns the current value of the upper boundary.


fit_parameter_value_min

fit_parameter_value_min(i : integer) : float (read/write)

 Top Previous Next

Sets the lower boundary (minimum) of the range of variation of the n-th fit parameter. Reading this quantity returns the current value of the lower boundary.


fitting

fitting : integer (read only)

 Top Previous Next

Returns information on the fit activity of CODE.

The value of fitting is 0 if there is no fit running, fitting is equal to 1 during the fit.

VBA example:

if wcd.fitting=1 then ...


foundfiles (integer)

Returns the number of files that were selected in the last 'searchfiles' action.

This number can be used to iterate through all the found filenames. The latter can be obtained by the found_filename function.


found_filename(i:integer) (string)

This function returns the complete filename of the i-th selected file in the last searchfile action.


get_sim_val1(n : integer; wavenumber : real number) (real number)

Returns the 1st simulated value of the n-th simulated spectrum in the spectrum list at the wavenumber specified by the 'wavenumber' property. If the spectrum is an ellipsometry spectrum, there are two simulated quantities: Psi and delta, or cos(psi) and tan(delta). In that case the 1st value is the psi-related quantity. The second quantity, related to delta, can be obtained using the function get_sim_val2.

Writing this property has no effect.


get_sim_val2(n : integer; wavenumber : real number) (real number)

Returns the 2nd simulated value of the n-th simulated spectrum in the spectrum list at the wavenumber specified by the 'wavenumber' property. This is used in cases like ellipsometry where there are two simulated quantitiesi: Psi and delta, or cos(psi) and tan(delta). In that case the 1st value (obtained by the function get_sim_val1) is the psi-related quantity. The second quantity is the one related to delta.

Writing this property has no effect.


grid_test_max (single)

This property sets or gets the minimum value of a parameter variation on a fixed grid.


grid_test_min (single)

This property sets or gets the minimum value of a parameter variation on a fixed grid.


grid_test_no_points (integer)

This property sets the number of points used in the parameter variation on a fixed grid.


grid_test_para (integer)

This property sets the fit parameter varied in a parameter variation on a fixed grid.


import_measured_plate_spectra

Loads measured spectra into a layer of type 'Plate measured'.

You have to specify the following parameters:

stack_index: Index of the layer stack (integer)

layer_index: Index of the layer in the stack (integer)

T : filename (including path) of the transmittance spectrum

R-Top: filename (including path) of the reflectance spectrum (top side)

R-Bottom: filename (including path) of the reflectance spectrum (bottom side)

file_format: File format as integer number (see file format specification)

option_t : file option for transmittance data

option_r_top : file option for reflectance data (top side)

option_r_bottom : file option for reflectance data (bottom side)

If you read the spectra from individual files which contain one spectrum only, all file options are 1.

If you read all spectra from a single file which contains all required data, you have to use the same filename for T, R-Top and R-Bottom and specify different values for option_t, option_r_top and option_r_bottom, depending of the sequence of the data in the file.


import_glass_coating_spectra

Loads measured spectra into a layer of type 'Glass coating'.

You have to specify the following parameters:

stack_index: Index of the layer stack (integer)

layer_index: Index of the layer in the stack (integer)

T : filename (including path) of the transmittance spectrum

R-air: filename (including path) of the reflectance spectrum (air side)

R-glass: filename (including path) of the reflectance spectrum (glass side)

file_format: File format as integer number (see file format specification)

option_t : file option for transmittance data

option_r_air : file option for reflectance data (air side)

option_r_glass : file option for reflectance data (glass side)

If you read the spectra from individual files which contain one spectrum only, all file options are 1.

If you read all spectra from a single file which contains all required data, you have to use the same filename for T, R-Top and R-Bottom and specify different values for option_t, option_r_top and option_r_bottom, depending of the sequence of the data in the file.


incidence_angle

incidence_angle(n : integer) : float (read/write)

 Top Previous Next

Returns the angle of incidence of the n-th spectrum. The following VBA command fills a certain Excel cell with the angle of incidence of the 2nd spectrum:

Range("results").Offset(2, 1) = wcd.incidence_angle(2)

Setting this property sets the value of the incidence angle of the n-th spectrum in the spectrum list.


insert_layer_definition (stack_index, layer_index : integer, layer_definition : string) (integer)

Insert a new layer in the stack given by stack_index. The new layer is added below the one specified by layer_index. The layer is generated using the information given in layer_definition.

Returns 0 if no problem is found. Otherwise a value <> 0 is returned.


kappa(n : integer; wavenumber : real number) (real number)

Returns the imaginary part of the refractive index of the n-th dielectric function in the dielectric function list at the wavenumber specified by the 'wavenumber' property.

Writing this property has no effect.


layer_material

layer_material(n, m : integer) : string (read)

 Top Previous Next

This function returns the name of the material assigned to layer m in the layer stack n (stacks and layers are counted 1,2,3, ...).


layer_thickness

layer_thickness(n, m : integer) : float (read/write)

 Top Previous Next

Sets the thickness of the m-th layer in the n-th layer stack to the value passed to the property. Both the layer stacks and the layers in a layer stack are counted starting at 1. Reading this property returns the current value of the layer thickness.


layer_type(n,m : integer) (string)

This function returns the type of layer m in the layer stack n (stacks and layers are counted 1,2,3, ...).


main_window_height

Height of the main window.


main_window_left

Screen coordinate (x) of the main window's upper left corner.


main_window_top

Screen coordinate (y) of the main window's upper left corner.


main_window_width

Width of the main window.


material_is_in_database

material_is_in_database (material_name : string): integer

Returns 1 if material_name is an object in the current database, 0 if not.


material_is_in_material_list

material_is_in_material_list(material_name : string) : integer

 Top Previous Next

Returns 1 if material_name is an object in the current list of material, 0 if not.


measurement(i:integer) (string)

Setting this string to an appropriate filename will cause CODE to import the experimental spectrum of the i-th spectrum in the spectrum list from the specified file. The expected format of the measured data must be set before using the file_format property.


mutlidimensional_gridfit (integer)

Returns or sets the option 'multidimensional gridfit'.

A value of 0 means 'multidimensional gridfit' is switched off, a value of 1 stands for 'multidimensional gridfit' is switched on.

VBA examples:

wcd.multidimensional_gridfit=1

.

.

.

check = wcd.multidimensional_gridfit


number_of_dielectric_functions (integer)

Returns the number of dielectric functions in the present CODE configuration. The dielectric functions are counted from 1 to number_of_dielectric_functions.

Dim np as integer

np = wcd.number_of_dielectric_functions

Setting this property has no effect.


number_of_fit_parameters

number_of_fit_parameters : integer (read only)

 Top Previous Next

Returns the number of fit parameters used at present. This can be used to write loops with some action executed for all fit parameters. For example, you could create a table with the fit parameter names and current values.

Dim np as integer

np = wcd.number_of_fit_parameters


number_of_fp_sets

Geben Sie hier den Text ein.


number_of_layers_in_stack

number_of_layers_in_stack(n : integer): integer (read)

 Top Previous Next

Returns the number of layers in the n-th layer stack (stacks are counted 1,2,3, ...).


number_of_layer_stacks

number_of_layer_stacks: integer (read)

 Top Previous Next

Returns the number of layer stacks.


number_of_spectra

number_of_spectra : integer (read only)

 Top Previous Next

Returns the number of spectra in the present configuration. The spectra are counted from 1 to number_of_spectra.

Dim np as integer

np = wcd.number_of_spectra


number_of_tec_values

number_of_tec_values : integer (read only)

 Top Previous Next

This integer gives you the number of technical values in the present CODE configuration, i.e. number of rows in the list of integral quantities. Use this number to iterate through all values in a loop.


object_generation (real number)

Returns the object generation of the CODE program.


optical_function(a_string : string) (real number)

Returns the value of the optical function defined by the text passed in the string a_string. If the optical function cannot be evaluated a value of 0 is returned.

Example:

x1 = wcd.optical_function("SiN(n at 400 nm)")

Setting this property has no effect.


optical_function_by_index(i : integer) (real number)

Returns the value of the i-th optical function in the current list of optical functions in SCOUT.

Example:

x1 = wcd.optical_function_by_index(3)

Setting this property has no effect.


parameter (i:integer) (real value)

Sets or reads the value of the i th parameter.

Defined for future use. Until now no parameters are used in CODE.


rating_theshold (level_index:integer) (float)

Returns or sets the rating threshold for the rating level specified by level_index.


rating_description (level_index:integer) (string)

Returns or sets the string for the rating level specified by level_index.


reference_spectrum(n:integer;formal:integer):string

Setting this string to an appropriate filename will cause CODE to import the reference spectrum of the i-th spectrum in the spectrum list from the specified file. The format of the measured data must be set by the format parameter.

The following values for the format are implemented up to now:

format File format

1 Standard

2 xy-format

3 JCAMP

4 SpectraCalc

5 Perkin-Elmer

6 Zeiss

7 Opus

VisualBasic example:

wcd.reference_spectrum(1, 4) = "c:/temp/dummy2.spc"


refractive_index(n : integer; wavenumber : real number) (real number)

Returns the refractive index of the n-th dielectric function in the dielectric function list at the wavenumber specified by the 'wavenumber' property.

Writing this property has no effect.


sample_description: string

Read and write the sample description which is used in some views.


set_spectrum_y_axis(i : integer; min, max, tick_spacing : float)

Use this command to set the range of the y-axis of the i-th spectrum (counted 1,2,3,...): min will be the minimum, max the maximum, and tick_spacing will be used as interval between the 'ticks'.


simulated_spectrum_value

simulated_spectrum_value(n : integer, wavenumber : float) : float (read only)

 Top Previous Next

Returns the value of the n-th simulated spectrum in the spectrum list at the wavenumber specified by the 'wavenumber' property.


simulated_spectrum_value_nm

simulated_spectrum_value_nm(i : integer, wavelength : float) : float (read only)

 Top Previous Next

Returns the value of the n-th simulated spectrum in the spectrum list at the wavelength specified by the 'wavelength' parameter (in nm).


simulation_exportfile(n:integer;formal:integer):string

Assigning a filename to simulation_exportfile will cause CODE to save the simulated data of the n'th spectrum in the spectrum list to the specified file. The format used for the datafile is given by the 'format' parameter.

The following values for the format are implemented up to now:

format File format

1 Standard

2 xy-format

4 SpectraCalc

VisualBasic example:

wcd.simulation_exportfile(1, 4) = "c:/temp/dummy2.spc"


spectrum_name(i:integer) (string)

Returns the name of the i th spectrum.

The following VBA command fills a certain cell with the name of the 2nd spectrum:

Range("results").Offset(2, 1) = wcd.spectrum_name(2)

Setting this property has no effect.


tec_value

tec_value(i : integer) : float (read only)

 Top Previous Next

Returns the present value of the i'th integral quantity.


tec_value_name

tec_value_name(i : integer) : string (read only)

 Top Previous Next

Returns the name of the i'th integral quantity.


tec_value_nickname (tec_index : integer) (string)

tec_value_nickname (tec_index : integer): string (readonly)

 Top Previous Next

Returns the nickname of the integral quantity with index tec_index. The index is counted 1, 2, 3, ...

If the integral quantity has no nickname its name is given as result of this function.


tec_value_optimize (tec_index : integer) (integer)

Returns or sets the status of the optimization_flag of the technical value given by tec_index. A value of 1 means optimization is on, 0 stand for optimization off.


tec_value_target_value (tec_index : integer) (integer)

tec_value_target_value (tec_index : integer) (float)

 Top Previous Next

Returns or sets the target value of the technical value given by tec_index.


tec_value_weight (tec_index : integer) (float)

Returns or sets the weight of the technical value given by tec_index.


tolerance (real number)

Use this property to read and to set the tolerance which is used for terminating the downhill simplex fitting method.


weight_formula (spectrum_index, subindex : integer) (string)

Returns or sets the weight formula of the spectrum given by spectrum_index. If the spectrum object is an ellipsometry object you have to set subindex to 1 to refer to the weight_formula for psi. Using a value of 2 for subindex selects the weight formula for delta.


Example

OLE example: Excel worksheet computes technical data for different layer thicknesses

This example shows a rather common task: You want to investigate how some technical values of a coating depend on the individual layer thicknesses. What you need to do is to compute for each set of thickness values all the wanted quantities and collect them in appropriate tables. You can do this quite easily with Excel which provides the required table structures, a macro language to express your wishes and the ability to control CODE as OLE automation server.

Before you start the Excel part of the work you have to setup a CODE configuration containing a complete model (optical constants, definition of the layer stack, definition of the spectra that are to be computed). Select those model parameters as fit parameters which shall be modified from Excel. In our example these are three layer thicknesses.

The Excel file containing the prepared macros (see below) looks like this (in the beginning):

The cell named configuration_file will be used by the macro that starts CODE to load the CODE configuration that we are going to work with. To start CODE and load the configuration you can use the CODE menu item WCD|Start and load configuration which has been added to the Excel sheet. After the configuration loading the Excel enters the names of the CODE fit parameters and the CODE technical values in the first column called WCD names. Now the sheet looks the following way:

There are 3 fit parameters (thicknesses) and 9 technical values. In the second column you can enter comments that describe the quantities in your way. For example, you could place here internal terms for the layers or quantities of interest:

Now it's time to enter the values for the thicknesses that you want to include in your computation. Give a name (which can be just a number) for the set in the cells to the right of the term Comments and enter below the parameter values. The macros that performs the computation looks if there is a name in the third row of the worksheet. If so, it expects thickness values below that name. The macro continues to work through the columns from left to right until it cannot find a name anymore, i.e. if it reaches an empty name cell. For large series of values it would be reasonable to write a short VisualBasic macro that creates the input values for you. A prepared worksheet could be this one:

Now execute the computation macro by the menu item WCD|Compute data and watch how Excel fills up the table:

The Visual Basic macros used in this example:

' The wcd object is the global object representing the Windows Coating Designer OLE server

Dim wcd As Object

' This macro creates the wcd object and loads the configuration file that is specified in the

' Excel worksheet "colors" (cell named "configuration_file")

' This configuration must have been created before for the layer stack that is going to be inspected

' _______________________________________________________________

Sub start_wcd()

'Create the wcd object

Set wcd = CreateObject("code.colors")

'Load the configuration file

wcd.configuration_file = Range("colors!configuration_file").Value

'Show the WCD program on the screen

wcd.Show

row_offset = 2

'Get the number of fit parameters (i.e. layer thicknesses) from WCD

no_paras = wcd.number_of_fit_parameters

'Get the number of integral values (e.g. color coordinates) from the WCD list of integral values

no_tec_values = wcd.number_of_tec_values

'Enter the names of the fit parameters and integral quantities to be computed into the Excel worksheet

'in column 1 (A)

For i = 1 To no_paras

Range("colors!origin").Offset(row_offset + i, 0).Value = wcd.fit_parameter_name(i)

Next i

For i = 1 To no_tec_values

Range("colors!origin").Offset(row_offset + no_paras + 1 + i, column_count).Value = wcd.tec_value_name(i)

Next i

End Sub

' _______________________________________________________________

'This macro deletes the OLE server from memory

Sub delete_wcd()

wcd.prepare_shutdown

Set wcd = Nothing

End Sub

' _______________________________________________________________

'This macro displays the WCD main window if it was hidden

Sub show_wcd()

wcd.Show

End Sub

' _______________________________________________________________

'This macro hides the WCD main window

Sub hide_wcd()

wcd.Hide

End Sub

' _______________________________________________________________

'This macro computes the wanted integral quantities

'

Sub compute_values()

Dim fitpara_count As Integer

Dim tecdata_count As Integer

Dim no_paras As Integer

Dim no_tec_values As Integer

row_offset = 2

' Get the number of fit parameters from WCD

no_paras = wcd.number_of_fit_parameters

' Get the number of integral quantities from WCD

no_tec_values = wcd.number_of_tec_values

column_count = 2

' Check if there is another set of thicknesses to process

While Range("colors!origin").Offset(row_offset, column_count).Value <> ""

'If so take the values for the fit parameter from the Excel worksheet

For i = 1 To no_paras

'If the fit parameter is a layer thickness (fit parameter mode =2), convert the value in nanometers used in the Excel sheet to microns which is the

'unit expected by WCD

If wcd.fit_parameter_mode(i) = 2 Then

wcd.fit_parameter_value(i) = 0.001 * Range("colors!origin").Offset(row_offset + i, column_count).Value

Else

wcd.fit_parameter_value(i) = Range("colors!origin").Offset(row_offset + i, column_count).Value

End If

Next i

'Recompute everything in WCD with the new set of parameters

wcd.update_data

' Get from WCD the new values of the integral quantities

For i = 1 To no_tec_values

Range("colors!origin").Offset(row_offset + no_paras + 1 + i, column_count).Value = wcd.tec_value(i)

Next i

'Proceed to the next column

column_count = column_count + 1

Wend

End Sub


Using CODE in LabView

You must have object generation 3.60 for the mechanism described below!

If you develop automation solutions with LabView you can access CODE in your LabView projects. A typical application would be a scanning spectrometer system, used to obtain one- or two-dimensional thickness profiles. If LabView is used to control the mechanical motion and the data acquisition of the spectrometer hardware, it would be advantageous to control CODE by LabView as well. After a measurement, LabView could pass the recorded spectra to CODE, start the thickness determination, and pick-up the results in order to generate appropriate operator displays.

Here is how you get access to CODE within LabView:

oGenerate a control of type 'Automation refnum'

oRight-click on the control and select the command 'Select ActiveX class/Browse'

oA dialog for the selection of a type library opens

oSearch for the type library 'CODE library' in the dropdown list

oIf you do not find it click on the 'Browse' button to the right and select the CODE program file code.exe (in order to see the program file you may have to set the file type to 'All files (*.*)' in the file dialog)

oThe dialog should now look like this:

oCheck the ckeckbox 'Show Creatable Objects Only' and select the only remaining line 'scoutole (scout.scoutole)':

oThen press OK to leave this dialog.

oIn the LabView Block diagram, right-click the new object and select the command 'ActiveX palette' to generate a new object of type 'Automation open'. Connect the 2 objects like shown below:

oFrom now on you can use all OLE properties and procedures of CODE. In order to check if you can really access CODE commands generate a small test sequence: Show CODE on the screen ('show' command), execute a file selection dialog (by calling the property 'a_filename') and finally call the routine 'prepare_shutdown' to prepare the death of the CODE server.

Before you do any real work in LabView, please test if you can get this sequence to execute properly.


Background information

This section gives background information (theory, formulas, tables) for some computed quantities.

At present you find information about

Color coordinates XYZ

Color coordinates xyz

Color coordinates L*a*b*

Color coordinates Lab

Color-matching functions

Ra (color rendering index)

Light transmittance

Light reflectance

Solar direct transmittance

Solar direct reflectance

Spectrum product

Photocurrent

g (total solar energy transmittance)

Emissivity

Sheet resistance

U (Thermal resistance)

A spectrum

D65 spectrum

C spectrum

Solar spectral distribution

AM 1.5 spectrum


Color coordinates XYZ

The color coordinates X,Y,Z are computed according to DIN 5033.

The following steps are taken:

In case of reflectance or transmittance spectra the illuminant D65 with relative spectral distribution S (as given in the table below) is used to compute the intermediate quantity k:

The tristimulus values X, Y and Z are calculated according to the following equations:

where τ is the transmittance of the layer stack. The color-matching functions are given below.

The given expressions are for 2° observation. For 10° the corresponding values for the color-matching functions are taken. These are also given below.


Color coordinates x,y,z

The chromaticity coordinates x,y, and z are computed from X,Y, and Z using the relations


Color coordinates L*a*b*

The color coordinates L*,a*,b* (CIELAB) are computed according to DIN 5033. They are based on X,Y,Z (see above).

The following equations are used:

If the arguments of the cubic roots are smaller than 0.008856 then the cubic root is replaced by the expression 7.787*argument+16/116 .


Color coordinates Lab

The quantities L, a, and b are computed according to

The coordinates X,Y, and Z are defined above.


Ra (color rendering index)

This quantity is computed according to standard EN 410. It requires the range of the spectrum to cover 380 ... 780 nm.


Light transmittance

The light transmittance is computed according to the following equation (DIN 67 504):

The values of the product S*V of the relative spectral distribution of the light source (here: D65) and the spectral luminous efficiency are these:

They are taken from the following table (also from DIN 67504):

Wavelength [nm] S*V

380 0.0000

390 0.0005

400 0.0030

410 0.0103

420 0.0352

430 0.0948

440 0.2274

450 0.4192

460 0.6663

470 0.9850

480 1.5189

490 2.1336

500 3.3491

510 5.1393

520 7.0523

530 8.7990

540 9.4427

550 9.8077

560 9.4306

570 8.6891

580 7.8994

590 6.3306

600 5.3542

610 4.2491

620 3.1502

630 2.0812

640 1.3810

650 0.8070

660 0.4612

670 0.2485

680 0.1255

690 0.0536

700 0.0276

710 0.0146

720 0.0057

730 0.0035

740 0.0021

750 0.0008

760 0.0001

770 0.0000

780 0.0000

For other illuminants than D65 the product S*V is divided by the intensity of the D65 light source and multipied by the intensity of the chosen illuminant.


Light reflectance

The light reflectance is computed according to the following equation (DIN 67 504):

The values of the product S*V of the relative spectral distribution of the light source and the spectral luminous efficiency are the same as used for the computation of the light transmittance (see above).


Solar direct transmittance

The solar direct transmittance τe is computed (according to DIN 67507, EN 410 or ISO9050:2003) as

The set of numbers Sλ⋅Δλ (Din 67507) used for the integration is given below.


Solar direct reflectance

The solar direct reflectance ρe is computed (according to DIN 67507, EN 410 or ISO9050:2003) as

The set of numbers Sλ⋅Δλ used for the integration is given below.


Spectrum product

This quantity is the integration over the product of the selected spectrum and a so-called 'Input spectrum'. The latter can be set in a window which is opened by the 'Edit' command of the 'Spectrum product' object. Here you can import the spectrum from a datafile.

The spectral range used for the integration is that of the input spectrum. The required values of the selected spectrum are computed by linear interpolation or extrapolation.


Photocurrent

Objects of type 'Photocurrent' compute the current density generated by absorption of light in a layer. You must assign a spectrum of type 'Charge carrier generation' to a photocurrent object to make it work correctly. Please see the 'SCOUT technical manual' for documentation of this spectrum type.

When you edit a photocurrent object, you should set its unit to 'mA / cm^2'. The Edit procedure will ask you to specify the total illumination power (in W/m^2). Afterwards you have to set the spectral distribution of the illuminating radiation in the following window:

The example shows the normalized AM 1.5 spectrum. You do not have to care about normalization of the input spectrum - photocurrent objects normalize the distribution function before they use it for their computation.

Photocurrent objects compute for each spectral point the number of generated charge carriers and integrate over the whole input spectrum. The final number is the current density in mA / cm^2.

Application example

The following example shows the optimization of a simple solar cell layer stack. The illuminating beam is incident from the top through a 4 mm glass pane. Underneath a transparent conductive layer (TCO) of several 100 nm thickness the active layer which is to convert sunlight to electrical current is placed. A aluminum layer at the bottom of the stack provides electrical contact on the backside of the active layer.

The active layer is equipped with a fictitious material which absorbs in the visible spectral range. Its complex refractive index shows two main absorption bands around 500 and 700 nm wavelength:

The light absorption of the active layer with 150 nm thickness (TCO thickness is 500 nm) is this:

Usually not all absorbed photons generate a charge carrier. The conversion efficiency may be much less than 1 and depend on details like the thickness of the active layer. In order to take into account a thickness dependent efficiency, the efficiency of the charge carrier generation spectrum is computed according to a user-defined formula. In this case the efficiency is simply a constant C1 where C1 is one of the possible fit parameters of the efficiency object.

With the help of a master parameter called 'Absorber_thickness' the coupling of layer thickness and efficiency can be expressed in CODE. The fit parameters for the optimization of the photocurrent are the following:

As shown above, the thickness of the layer is simply computed as Absorber_thickness, whereas the efficiency linearly decreases with thickness following the relation 0.7-Absorber_thickness/600.

Setting a target value of 10 mA/cm^2 for the current density in the list of integral quantities, the fit optimizes both the TCO and the active layer thickness with the following best result:

The upper right curve showing the relation of absorber thickness and photocurrent with fixed TCO thickness has been obtained using the 'Parameter variation' mechanism (see SCOUT manual) and a view object which displays workbook data (the results of the parameter variation).


g (total solar energy transmittance)

The total solar energy transmittance (or solar factor) g is computed according to DIN 67 507, EN 410 or ISO9050:2003. CODE can handle single, double and triple glazings. A gas like air or Ar has to be used between two panes.

In order to compute g CODE has to use some physical properties of the filling gas. The properties of the gases air, Argon, SF6, Krypton and Xenon have been taken from EN 673 and stored in the database. Please use these materials in your layer stack

g is the sum of the solar direct transmittance τe and the secondary internal heat transfer factor qi. The quantity qi as well as the corresponding quantity qe (the secondary external heat transfer factor) are also available as integral quantities.

g can only be calculated for simulated spectra, not for measured spectra. CODE needs to compute the emissivities from parts of the layer stack. This is not possible in the case of experimental data.

CODE needs to compute the emissivity of the coated glass panes in the far infrared (200 ... 1800 1/cm). Make sure that your optical model is valid in this spectra range. If you do not have optical constants in this spectral range you can still compute g if you know the emissivity of the involved surfaces. In this case, Edit the g quantity in the list of integral quantities. This dialog will open:

Note that the individual layers are not drawn in the dialog's sketch.

Using the checkboxes at the interfaces you can decide if CODE should compute the emissivity at this interface from the optical model. If the option is unchecked you can type in the emissivity to be used for this interface. If the option is checked CODE will indicate (in gray) the computed value of the emissivity.


Emissivity

The emissivity (both the normal and effective emissivity can be calculated in CODE) is computed following standard EN 673.

Warning: Note that the spectrum must be known in the infrared region 5500 ... 50000 nm or 200 ... 1820 1/cm. Make sure that you have reliable optical constants in this range!


Sheet resistance

This function returns the sheet resistance of the layer stack that is assigned to the selected spectrum.

Note the following:

The sheet resistance is computed taking into account all layers which have a non-vanishing conductivity.

You can introduce electrical conductivity to a material in the following ways:

·Use an optical constant model and introduce a Drude model or an extended Drude model. This is the most flexible and recommended way.

·Assign a value for the electrical conductivity using the menu item Property|Electrical conductivity.


U (Thermal transmittance)

This quantity is calculated according to standard EN 673. Please read the remarks about the computation rules of g above.


A spectrum

The A spectrum used in some calculations is this:

Here is a table of the values:

Wavelength[nm] Intensity

380 9.8

385 10.9

390 12.1

395 13.4

400 14.7

405 16.1

410 17.7

415 19.3

420 21.0

425 22.8

430 24.7

435 26.6

440 28.7

445 30.9

450 33.1

455 35.4

460 37.8

465 40.3

470 42.9

475 45.5

480 48.2

485 51.0

490 53.9

495 56.8

500 59.9

505 62.9

510 66.1

515 69.3

520 72.5

525 75.8

530 79.1

535 82.5

540 85.9

545 89.4

550 92.9

555 96.4

560 100.0

565 103.6

570 107.2

575 110.8

580 114.4

585 118.1

590 121.7

595 125.4

600 129.0

605 132.7

610 136.4

615 140.0

620 143.6

625 147.2

630 150.8

635 154.4

640 158.0

645 161.5

650 165.0

655 168.5

660 172.0

665 175.4

670 178.8

675 182.1

680 185.4

685 188.7

690 191.9

695 195.1

700 198.3

705 201.4

710 204.4

715 207.4

720 210.4

725 213.3

730 216.1

735 218.9

740 221.7

745 224.4

750 227.0

755 229.6

760 232.1

765 234.6

770 237.0

775 239.4

780 214.7


D65 spectrum

The D65 spectrum used in some calculations is this:

Here is a table of the values:

Wavelength[nm] Intensity

380 50.0

385 52.3

390 54.6

395 68.7

400 82.8

405 87.1

410 91.5

415 92.5

420 93.4

425 90.1

430 86.7

435 95.8

440 104.9

445 110.9

450 117.0

455 117.4

460 117.8

465 116.3

470 114.9

475 115.4

480 115.9

485 112.4

490 108.8

495 109.1

500 109.4

505 108.6

510 107.8

515 106.3

520 104.8

525 106.2

530 107.7

535 106.0

540 104.4

545 104.2

550 104.0

555 102.0

560 100.0

565 98.2

570 96.3

575 96.1

580 95.8

585 92.2

590 88.7

595 89.3

600 90.0

605 89.8

610 89.6

615 88.6

620 87.7

625 85.5

630 83.3

635 83.5

640 83.7

645 81.9

650 80.0

655 80.1

660 80.2

665 81.2

670 82.3

675 80.3

680 78.3

685 74.0

690 69.7

695 70.7

700 71.6

705 73.0

710 74.3

715 68.0

720 61.6

725 65.7

730 69.9

735 72.5

740 75.1

745 69.3

750 63.6

755 55.0

760 46.4

765 56.6

770 66.8

775 65.1

780 63.4


C spectrum

The C spectrum used in some calculations is this:

Here is a table of the values:

Wavelength[nm] Intensity

380 31.3

385 37.9

390 45.0

395 52.4

400 60.1

405 68.2

410 76.5

415 85.0

420 93.2

425 100.5

430 106.7

435 111.8

440 115.4

445 117.2

450 117.8

455 117.4

460 116.9

465 117.1

470 117.6

475 117.8

480 117.7

485 116.7

490 114.6

495 111.0

500 106.5

505 101.6

510 97.2

515 93.8

520 92.0

525 91.9

530 93.1

535 94.9

540 97.0

545 98.7

550 99.9

555 100.3

560 100.0

565 98.9

570 97.2

575 95.1

580 92.9

585 90.6

590 88.5

595 86.6

600 85.2

605 84.4

610 83.9

615 83.8

620 83.7

625 83.6

630 83.6

635 83.4

640 83.4

645 83.6

650 83.8

655 83.8

660 82.5

665 82.8

670 82.0

675 81.0

680 79.8

685 78.1

690 76.2

695 74.3

700 72.5

705 70.6

710 68.8

715 66.9

720 64.9

725 63.0

730 61.2

735 59.6

740 58.4

745 57.2

750 56.2

755 55.6

760 55.2

765 55.1

770 55.3

775 55.6

780 56.1


Color-matching functions

The color-matching functions for 2° used for the computation of color coordinates are these:

The values are taken from DIN 5033:

Wavelength [nm] xbar ybar zbar

380 0.0014 0.0000 0.0065

385 0.0022 0.0001 0.0105

390 0.0042 0.0001 0.0202

395 0.0076 0.0002 0.0362

400 0.0143 0.0004 0.0679

405 0.0232 0.0006 0.1102

410 0.0435 0.0012 0.2074

415 0.0776 0.0022 0.3713

420 0.1344 0.0040 0.6456

425 0.2148 0.0073 1.0391

430 0.2839 0.0116 1.3856

435 0.3285 0.0168 1.6230

440 0.3483 0.0230 1.7471

445 0.3481 0.0298 1.7826

450 0.3362 0.0380 1.7721

455 0.3187 0.0480 1.7441

460 0.2908 0.0600 1.6692

465 0.2511 0.0739 1.5281

470 0.1954 0.0910 1.2876

475 0.1421 0.1126 1.0419

480 0.0956 0.1390 0.8130

485 0.0580 0.1693 0.6162

490 0.0320 0.2080 0.4652

495 0.0147 0.2586 0.3533

500 0.0049 0.3230 0.2720

505 0.0024 0.4073 0.2123

510 0.0093 0.5030 0.1582

515 0.0291 0.6082 0.1117

520 0.0633 0.7100 0.0782

525 0.1096 0.7932 0.0573

530 0.1655 0.8620 0.0422

535 0.2257 0.9149 0.0298

540 0.2904 0.9540 0.0203

545 0.3597 0.9803 0.0134

550 0.4334 0.9950 0.0087

555 0.5121 1.0000 0.0057

560 0.5945 0.9959 0.0039

565 0.6784 0.9786 0.0027

570 0.7621 0.9520 0.0021

575 0.8425 0.9154 0.0018

580 0.9163 0.8700 0.0017

585 0.9786 0.8163 0.0014

590 1.0263 0.7570 0.0011

595 1.0567 0.6949 0.0010

600 1.0622 0.6310 0.0008

605 1.0456 0.5668 0.0006

610 1.0026 0.5030 0.0003

615 0.9384 0.4412 0.0002

620 0.8544 0.3810 0.0002

625 0.7514 0.3210 0.0001

630 0.6424 0.2650 0.0000

635 0.5419 0.2170 0.0000

640 0.4479 0.1750 0.0000

645 0.3608 0.1382 0.0000

650 0.2835 0.1070 0.0000

655 0.2187 0.0816 0.0000

660 0.1649 0.0610 0.0000

665 0.1212 0.0446 0.0000

670 0.0874 0.0320 0.0000

675 0.0636 0.0232 0.0000

680 0.0468 0.0170 0.0000

685 0.0329 0.0119 0.0000

690 0.0227 0.0082 0.0000

695 0.0158 0.0057 0.0000

700 0.0114 0.0041 0.0000

705 0.0081 0.0029 0.0000

710 0.0058 0.0021 0.0000

715 0.0041 0.0015 0.0000

720 0.0029 0.0010 0.0000

725 0.0020 0.0007 0.0000

730 0.0014 0.0005 0.0000

735 0.0010 0.0004 0.0000

740 0.0007 0.0002 0.0000

745 0.0005 0.0002 0.0000

750 0.0003 0.0001 0.0000

755 0.0002 0.0001 0.0000

760 0.0002 0.0001 0.0000

765 0.0001 0.0000 0.0000

770 0.0001 0.0000 0.0000

775 0.0001 0.0000 0.0000

780 0.0000 0.0000 0.0000

For 10° the values are the following:

Wavelength [nm] xbar10 ybar10 zbar10

380 0.0002 0.0000 0.0007

385 0.0007 0.0001 0.0029

390 0.0024 0.0003 0.0105

395 0.0072 0.0008 0.0323

400 0.0191 0.0020 0.0860

405 0.0434 0.0045 0.1971

410 0.0847 0.0088 0.3894

415 0.1406 0.0145 0.6568

420 0.2045 0.0214 0.9725

425 0.2647 0.0295 1.2825

430 0.3147 0.0387 1.5535

435 0.3577 0.0496 1.7985

440 0.3837 0.0621 1.9673

445 0.3867 0.0747 2.0273

450 0.3707 0.0895 1.9948

455 0.3430 0.1063 1.9007

460 0.3023 0.1282 1.7454

465 0.2541 0.1528 1.5549

470 0.1956 0.1852 1.3176

475 0.1323 0.2199 1.0302

480 0.0805 0.2536 0.7721

485 0.0411 0.2977 0.5701

490 0.0162 0.3391 0.4153

495 0.0051 0.3954 0.3024

500 0.0038 0.4608 0.2185

505 0.0154 0.5314 0.1592

510 0.0375 0.6067 0.1120

515 0.0714 0.6857 0.0822

520 0.1177 0.7618 0.0607

525 0.1730 0.8233 0.0431

530 0.2365 0.8752 0.0305

535 0.3042 0.9238 0.0206

540 0.3768 0.9620 0.0137

545 0.4516 0.9822 0.0079

550 0.5298 0.9918 0.0040

555 0.6161 0.9991 0.0011

560 0.7052 0.9973 0.0000

565 0.7938 0.9824 0.0000

570 0.8787 0.9556 0.0000

575 0.9512 0.9152 0.0000

580 1.0142 0.8689 0.0000

585 1.0743 0.8256 0.0000

590 1.1185 0.7774 0.0000

595 1.1343 0.7204 0.0000

600 1.1240 0.6583 0.0000

605 1.0891 0.5939 0.0000

610 1.0305 0.5280 0.0000

615 0.9507 0.4618 0.0000

620 0.8563 0.3981 0.0000

625 0.7549 0.3396 0.0000

630 0.6475 0.2835 0.0000

635 0.5351 0.2283 0.0000

640 0.4316 0.1798 0.0000

645 0.3437 0.1402 0.0000

650 0.2683 0.1076 0.0000

655 0.2043 0.0812 0.0000

660 0.1526 0.0603 0.0000

665 0.1122 0.0441 0.0000

670 0.0813 0.0318 0.0000

675 0.0579 0.0226 0.0000

680 0.0409 0.0159 0.0000

685 0.0286 0.0111 0.0000

690 0.0199 0.0077 0.0000

695 0.0138 0.0054 0.0000

700 0.0096 0.0037 0.0000

705 0.0066 0.0026 0.0000

710 0.0046 0.0018 0.0000

715 0.0031 0.0012 0.0000

720 0.0022 0.0008 0.0000

725 0.0015 0.0006 0.0000

730 0.0010 0.0004 0.0000

735 0.0007 0.0003 0.0000

740 0.0005 0.0002 0.0000

745 0.0004 0.0001 0.0000

750 0.0003 0.0001 0.0000

755 0.0002 0.0001 0.0000

760 0.0001 0.0000 0.0000

765 0.0001 0.0000 0.0000

770 0.0001 0.0000 0.0000

775 0.0000 0.0000 0.0000

780 0.0000 0.0000 0.0000


Solar spectral distribution

The product Sλ⋅Δλ used for the computation of the solar direct transmittance and reflectance is given for the required wavelengths in the following (DIN 67 507):

Wavelength [nm] Sλ⋅Δλ

300 0.0050

340 0.0240

380 0.0320

420 0.0500

460 0.0650

500 0.0630

540 0.0580

580 0.0540

620 0.0550

660 0.0490

700 0.0460

740 0.0410

780 0.0370

900 0.1390

1100 0.0970

1300 0.0580

1500 0.0390

1700 0.0260

1900 0.0180

2500 0.0440


AM 1.5 spectrum

 Top Previous

The relative spectral intensity of solar radiation in Europe is approximately given by the AM 1.5 spectrum: