Custom Variable Configuration

Introduction :

The Gooey Delta Object can be used to create custom user variables that work with their custom MOP functions. The advantage of using the Gooey Delta Object is that the custom MOP function itself doesn’t have to be modified.

An example Optiscan system configuration is shown below:

delat_mop_system

The MOP function uses five custom variables:

  • width – Width of Target (custom scaler)
  • length – Length of Target (custom scaler)
  • num_samples – Number of Sample Points (custom scaler)
  • output_filename – The name of the output filename (custom string)
  • show_plot – Should a plot of the result be shown (custom choice)

The Gooey Delta Variable list looks like this:

variable_list

These Gooey Delta Variables are accessed in a custom MOP function using:

function [mop, curlink, simdata, errmsg] = custommop(action, mop, curlink, simdata)
%currently, there is no detected error, so there is no error message:

 

errmsg = ”;

 

%retrieve the delta variable structure with our variables:

 

delta_variables = get_deltavariables(mop)

 

%unmarshall the arguments with the “eval” statement.
%the second argument to “eval” is returned if the first
%argument does not “exist” (i.e. not set with the delta object):

 

width = eval(‘delta_variables.width’, ’10e-6′);
length = eval(‘delta_variables.length’, ’10e-6′);
output_filename = eval(‘delta_variables.output_filename’, ‘result.mat’);

 

%1==show plot; 2==dont show

 

plot

show_plot = eval(‘delta_variables.show_plot’, ‘1’)

 

%perform the calculations


Adding a MOP Variable :

Step 1 -click the add_button button on the variable_tool_tab.

Step 2 – click the “MOP Custom Variable” variable from the variable pick list:

select_custom_variable

Step 3 – choose the type of the custom variable, and then configure (more) it as desired :

scaler_configuration

The most important thing to configure is the variable’s name. This variable will be accessed using:

delta_variables.width in the custom MOP function.

Step 4 – click the create_button button.

Configuring MOP Variables (scaler | string | choice):

Custom Scaler Configuration :

scaler_configuration

Type – is the variable real or complex variables.

  • Min – the minimum value for the variable.
  • Max – the maximum value for the variable.

Custom String Configuration :

string_configuration

Custom Chioce Configuration :

choice_configuration

Descriptions – a semicolon separated list of descriptions. There should be a description for each choice. The description for “Yes” as shown in the Gooey Delta Variable Tool tab:

choice_desc
Choices – the choices as shown in the Gooey Delta Variable Tool tab:

choice_list