This example shows some additional capabilites of Formulas, which make it possible to extend ProSEM’s analysis capability to report what you need. If you are not familiar with the basics of Formulas, it may be useful to first read the prior example: Formulas 1 - Basic Shape Analysis.
In this example, some properties of gratings involving multiple shapes are computed, as well as demonstration of string handling such as extracting a variable value from the filename. The example also demonstrates using a Recipe, Measurement Validation, and a Summary Table.
Note: ProSEM v2.3.0 or higher is required for the formulas in this example.
The goal of this example is compute the Fill Fraction for a set of images which were exposed using a different exposure dose, so the linewidth varies for each image. Formulas are created to compute the Duty Cycle or the Fill Fraction of a grating, accessing the Group properties for each shape. Also the exposure dose for each image is extracted from each image filename using REGEXP string processing, and a Summary Table is used to produce a table of Fill Factor versus Exposure Dose.
The Fill Fraction here is defined as:
1) For this grating measurement, a single trench measurement is setup, then find similar is used to find the other features in the grating.
2) The Group heading is selected, and this found Group is then Set as the Current Recipe. This recipe is then applied to all other images in the project as a batch operation.
3) After the Batch Measurement using the Recipe has completed measuring all images, the results of each image are manually reviewed and validated. This is an optional step, but is helpful when images vary within a project, by ensuring all finds were successful.
4) Next a variable is created to compute the Fill Fraction, defined here as the width of the trench divided by the grating pitch, meaning the fraction of the grating that is trench. The formula is calculated for each trench in the image, however the pitch is not a property of an individual trench measurement. Instead, the grating pitch is a property of the grating or group which is made up of multiple trenches. So to compute the Fill Fraction, the formula needs to access the property of another object, the containing group. To access the property of another object, the path to that object must prepend the property name; in this case: group.GratingPitchMean refers to the mean pitch of the grating containing this measurement being computed. In the Context Browser, this is found by opening the "group" subheading in the Context branch. Another example of this context usage is shown later, where the Exposure Dose is extracted from the Image File Name.
The formula used here for the Fill Fraction is:
CDMean / group.GratingPitchMean
5) It might be more desirable to display this Fill Fraction value as a percentage, rather than a decimal fraction. To demonstrate displaying the value as a percentage, another variable is created, called Fill_Percentage, with the value:
(Fill_Fraction*100).toFixed(1) + "%"
In this example, the task is to extract the series of digits from between the literal characters "AD" and "uC". This first part of this formula, between the forward slash "/" characters, defines this pattern. \d+ is RegExp syntax for matching "one or more digit", the parentheses surround this indicate this is part of the filename string that is to be extracted, and the literal characters AD and uC indicte the desired string to extract are the digits between those two character strings. That RegExp pattern match is then applied (by the .exec method) to the property image.label, which is the filename of the image containing this meausurement being calculated. Finally, the  index extracts only the first grouped value from the regular expression operation, although in this case, there is only one value to be matched.
With the Fill_Fraction, Fill_Percentage, and Dose variables defined, the Lines & Spaces Data Table shows the value for each of these variables is computed for all measurements. Formulas are always computed for all measurements.
While having the fill fraction and dose for each measurement might be useful, it might be desirable to summarize and see the average fill fraction for each exposure dose. That's the function of a Summary Table.
The settings for this table are:
And when OK is clicked, the summary table is created:
This example demonstrate ProSEM formulas using groups of measured shapes, such as gratings and arrays. See other examples on this site for additional formula usage.