This article shows how to create an XMP measurement template and how to create and apply global rules.
Overview
The XMP measurement template using global rules once created can be exported and reused on different projects resulting in considerable time saving. Global rules can be leveraged to create XMP templates which can help to verify if the simulation meets the internal or regulatory requirements.
Prerequisites
Simulation results (XMP) are needed, in order to create a template for the first time.
Measurement Template Creation
Step 1: Overview of Measure tool
Open the XMP file that you have created through the simulation. Click on the Measure button. It opens a new window where you can create measurements and export it as a template.
Click on Add area or measure button to create a new measurement row. On measurement row, user has option to change the Shape of area, the Parameters for the area (center of area and overall height and width of area), as well as what to Measure (Maximum, Minimum, Average, etc.). The Threshold column can be used to set minimum and/or maximum threshold values to be considered for a particular measurement.
To create a new row for new area measurement, first click on the 'Shape' column and press 'Add area or measure' button. To add new measurement to same area, first click on 'Measure' column and press 'Add area or measure' button. First one creates a new row with new area while the second one creates new measure on the same area.
-
Shape: When selecting Shape, a drop-down list appears showing different options that can be chosen for measurement, including the option to use a line, point, polyline, etc.
-
Measure: When selecting Measure, a drop-down list appears showing different measurement options like Maximum, minimum, average, contrast etc.
-
Thresholds: The bottom left column shows options for Minium and Maximum threshold where user can input the values.
Step 2: Global rule application
In this example, two areas are created which will be used for global rules. These are renamed as ‘Area_1’ and ‘Area_2’, respectively.
-
To create a global rule, first click on ‘Area_2’ in this case, then click on
to create a new line for global rule.
-
In ‘Rule’ column you can specify the name for the rule, such as ‘addition’, ‘subtraction’, ‘division’, etc. The ‘Formula’ column lets you specify the formula that will be used to calculate. The calculated value will be reflected in ‘Rule’ column. Please note that space or dot(.) is not allowed in ‘Rule’ column.
-
In order to write a formula, you must follow a specific format. Standard practice to pull the variable into a formula is ‘Area_Name.Magnitude_type.Measure_type’ or ‘Area_Name.Measure_type’. In our example, our variable names will be ‘Area_1.luminance.Average’ or ‘Area_1.Average’ and ‘Area_2.luminance.Average’ or ‘Area_2.Average’. In this case, ‘Area_1’ and ‘Area_2’ are Area names that are given by the user; Magnitude is Luminance, while Measure is Average.
-
By using the above defined variables, the following rules are created for addition, subtraction, absolute, multiplication, division, etc.
-
If the rule has pass/fail criteria, the rows will be highlighted in green/red respectively based on outcome of formula.
-
More complex formulas can be created by combining variables with operands and specifying targets. In this example Minimum and Maximum values are found for the same area. The formula, Contrast = (max-min)/(max+min), is used to find the contrast value, which should be less than or equal to 1.
-
Once you are satisfied with the formula, you can go to File --> Export template... for future use, or to embed it in the original Speos sensor.
Step 3: Reusing the template
-
In order to use the template, go to sensor definition by double clicking on the sensor. XMP Template -> File -> Browse to select the exported template from Step 5. Rerun the simulation, open the result (XMP) file and go to Measure, you will see that the template is automatically applied for the XMP and rules are ran to show pass/fail based on the outcome
Additional Resources
More information about measurement analysis, global rules and operands can be found at Making Measures Analysis